Example #1
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {
			int Position = Buffer.Encode__Sequence_Start ();

			Buffer.Encode__Bits  (Signature, 0, -1);
			Buffer.Debug ("Signature");

			Buffer.Encode__Object (SignatureAlgorithm, 0, -1);
			Buffer.Debug ("SignatureAlgorithm");

			Buffer.Encode__Object (TBSEndorsement, 0, -1);
			Buffer.Debug ("TBSEndorsement");
			Buffer.Encode__Sequence_End (Position);
            }
Example #2
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {
			int Position = Buffer.Encode__Sequence_Start ();

			Buffer.Encode__Bits  (SubjectPublicKey, 0, -1);
			Buffer.Debug ("SubjectPublicKey");

			Buffer.Encode__OIDRef  (Algorithm, 0, -1);
			Buffer.Debug ("Algorithm");
			Buffer.Encode__Sequence_End (Position);
            }
Example #3
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {
			int Position = Buffer.Encode__Sequence_Start ();

			Buffer.Encode__Bits  (Signature, 0, -1);
			Buffer.Debug ("Signature");

			Buffer.Encode__Object (SignatureAlgorithm, 0, -1);
			Buffer.Debug ("SignatureAlgorithm");

			Buffer.Encode__Object (CertificationRequestInfo, 0, -1);
			Buffer.Debug ("CertificationRequestInfo");
			Buffer.Encode__Sequence_End (Position);
            }
Example #4
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {
			int Position = Buffer.Encode__Sequence_Start ();

			if (Extensions == null || Extensions.Count == 0) {
				Buffer.Encode__Object (null, 6, 3);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.Extension  _Index in Extensions) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 6, 3);
			}
			Buffer.Debug ("Extensions");

			Buffer.Encode__Bits  (SubjectUniqueID, 5, 2);
			Buffer.Debug ("SubjectUniqueID");

			Buffer.Encode__Bits  (IssuerUniqueID, 5, 1);
			Buffer.Debug ("IssuerUniqueID");

			Buffer.Encode__Object (SubjectPublicKeyInfo, 0, -1);
			Buffer.Debug ("SubjectPublicKeyInfo");

			if (Subject == null || Subject.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.Name  _Index in Subject) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 0, -1);
			}
			Buffer.Debug ("Subject");

			Buffer.Encode__Object (Validity, 0, -1);
			Buffer.Debug ("Validity");

			if (Issuer == null || Issuer.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.Name  _Index in Issuer) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 0, -1);
			}
			Buffer.Debug ("Issuer");

			Buffer.Encode__Object (Signature, 0, -1);
			Buffer.Debug ("Signature");

			Buffer.Encode__BigInteger  (SerialNumber, 0, -1);
			Buffer.Debug ("SerialNumber");

			Buffer.Encode__Integer  (Version, 2, 0);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }