예제 #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__Octets  (Data, 0, -1);
			Buffer.Debug ("Data");

			// Default is false
			if (Critical != false) {
				Buffer.Encode__Boolean (Critical, 4, -1);
				}
			Buffer.Debug ("Critical");

			Buffer.Encode__OIDRef  (ObjectIdentifier, 0, -1);
			Buffer.Debug ("ObjectIdentifier");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #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 ();

			if (Attributes == null || Attributes.Count == 0) {
				Buffer.Encode__Object (null, 1, 0);
				}
			else {
				int XPosition = Buffer.Encode__Set_Start();
				foreach (Goedel.Cryptography.PKIX.AttributeTypeValues  _Index in Attributes) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Set_End(XPosition, 1, 0);
			}
			Buffer.Debug ("Attributes");

			Buffer.Encode__Octets  (PrivateKey, 0, -1);
			Buffer.Debug ("PrivateKey");

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

			Buffer.Encode__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #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 (TBSEndorsement, 0, -1);
			Buffer.Debug ("TBSEndorsement");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #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 ();

			// Default is 1
			if (Iterations != 1) {
				Buffer.Encode__Integer (Iterations, 0, -1);
				}
			Buffer.Debug ("Iterations");

			Buffer.Encode__Octets  (MacSalt, 0, -1);
			Buffer.Debug ("MacSalt");

			Buffer.Encode__Object (MAC, 0, -1);
			Buffer.Debug ("MAC");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #5
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__Octets  (EncryptedContent, 5, 0);
			Buffer.Debug ("EncryptedContent");

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

			Buffer.Encode__OIDRef  (ContentType, 0, -1);
			Buffer.Debug ("ContentType");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #6
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__Integer  (Maximum, 0, 1);
			Buffer.Debug ("Maximum");

			Buffer.Encode__Integer  (Minimum, 0, 0);
			Buffer.Debug ("Minimum");

			Buffer.Encode__Object (Base, 0, -1);
			Buffer.Debug ("Base");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #7
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__Object (MacData, 4, -1);
			Buffer.Debug ("MacData");

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

			Buffer.Encode__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #8
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);
            }
예제 #9
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 (Attributes == null || Attributes.Count == 0) {
				Buffer.Encode__Object (null, 1, 0);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.AttributeTypeValues  _Index in Attributes) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 1, 0);
			}
			Buffer.Debug ("Attributes");

			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__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #10
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 (CrlEntryExtensions == null || CrlEntryExtensions.Count == 0) {
				Buffer.Encode__Object (null, 6, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.Extension  _Index in CrlEntryExtensions) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 6, -1);
			}
			Buffer.Debug ("CrlEntryExtensions");

			Buffer.Encode__Time  (RevocationDate, 0, -1);
			Buffer.Debug ("RevocationDate");

			Buffer.Encode__BigInteger  (UserCertificate, 0, -1);
			Buffer.Debug ("UserCertificate");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #11
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__Object (Value, 0, -1);
			Buffer.Debug ("Value");

			Buffer.Encode__OIDRef  (Type, 0, -1);
			Buffer.Debug ("Type");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #12
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 (CrlExtensions == null || CrlExtensions.Count == 0) {
				Buffer.Encode__Object (null, 2, 0);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.Extension  _Index in CrlExtensions) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 2, 0);
			}
			Buffer.Debug ("CrlExtensions");

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

			Buffer.Encode__Time  (NextUpdate, 4, -1);
			Buffer.Debug ("NextUpdate");

			Buffer.Encode__Time  (ThisUpdate, 0, -1);
			Buffer.Debug ("ThisUpdate");

			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__Integer  (Version, 4, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #13
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__Object (Signature, 0, -1);
			Buffer.Debug ("Signature");

			Buffer.Encode__Object (TBSCertList, 0, -1);
			Buffer.Debug ("TBSCertList");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #14
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__Time  (NotAfter, 0, -1);
			Buffer.Debug ("NotAfter");

			Buffer.Encode__Time  (NotBefore, 0, -1);
			Buffer.Debug ("NotBefore");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #15
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__Integer  (PathLenConstraint, 4, -1);

			// Default is false
			if (CA != false) {
				Buffer.Encode__Boolean (CA, 0, -1);
				}
			Buffer.Encode__Sequence_End (Position);
            }
예제 #16
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 (Value == null || Value.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Set_Start();
				foreach (byte []   _Index in Value) {
		
			Buffer.Encode__Any  (_Index, 0, 0);
					}
				Buffer.Encode__Set_End(XPosition, 0, -1);
			}
			Buffer.Debug ("Value");

			Buffer.Encode__OIDRef  (Type, 0, -1);
			Buffer.Debug ("Type");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #17
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__Object (ExcludedSubtrees, 0, 1);

			Buffer.Encode__Object (PermittedSubtrees, 0, 0);
			Buffer.Encode__Sequence_End (Position);
            }
예제 #18
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__BigInteger  (PublicExponent, 0, -1);
			Buffer.Debug ("PublicExponent");

			Buffer.Encode__BigInteger  (Modulus, 0, -1);
			Buffer.Debug ("Modulus");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #19
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) {

			if (KeyPurpose == null || KeyPurpose.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (int []   _Index in KeyPurpose) {
		
			Buffer.Encode__OIDRef  (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 0, -1);
			}
            }
예제 #20
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__Integer  (AuthorityCertSerialNumber, 12, 2);

			if (AuthorityCertIssuer == null || AuthorityCertIssuer.Count == 0) {
				Buffer.Encode__Object (null, 12, 1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.GeneralName  _Index in AuthorityCertIssuer) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 12, 1);
			}

			Buffer.Encode__Octets  (KeyIdentifier, 12, 0);
			Buffer.Encode__Sequence_End (Position);
            }
예제 #21
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__Any  (Content, 2, 0);
			Buffer.Debug ("Content");

			Buffer.Encode__OIDRef  (ContentType, 0, -1);
			Buffer.Debug ("ContentType");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #22
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) {

			if (Value == null || Value.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.PolicyInformation  _Index in Value) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 0, -1);
			}
            }
예제 #23
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__Object (EncryptedContent, 0, -1);
			Buffer.Debug ("EncryptedContent");

			Buffer.Encode__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #24
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 (PolicyQualifiers == null || PolicyQualifiers.Count == 0) {
				Buffer.Encode__Object (null, 4, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.PolicyQualifierInfo  _Index in PolicyQualifiers) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 4, -1);
			}
			Buffer.Debug ("PolicyQualifiers");

			Buffer.Encode__OIDRef  (PolicyIdentifier, 0, -1);
			Buffer.Debug ("PolicyIdentifier");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #25
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__Octets  (EncryptedData, 0, -1);
			Buffer.Debug ("EncryptedData");

			Buffer.Encode__Object (EncryptionAlgorithm, 0, -1);
			Buffer.Debug ("EncryptionAlgorithm");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #26
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__Any  (Qualifier, 0, -1);
			Buffer.Debug ("Qualifier");

			Buffer.Encode__OIDRef  (PolicyQualifierId, 0, -1);
			Buffer.Debug ("PolicyQualifierId");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #27
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__BigInteger  (Coefficient, 0, -1);
			Buffer.Debug ("Coefficient");

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

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

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

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

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

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

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

			Buffer.Encode__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #28
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) {

			if (Names == null || Names.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Sequence_Start();
				foreach (Goedel.Cryptography.PKIX.GeneralName  _Index in Names) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Sequence_End(XPosition, 0, -1);
			}
            }
예제 #29
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, 0, -1);
				}
			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, 0, -1);
			}
			Buffer.Debug ("Extensions");

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

			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__Octets  (SubjectKeyIdentifier, 0, -1);
			Buffer.Debug ("SubjectKeyIdentifier");

			Buffer.Encode__Octets  (IssuerKeyIdentifier, 0, -1);
			Buffer.Debug ("IssuerKeyIdentifier");

			Buffer.Encode__Time  (Issued, 0, -1);
			Buffer.Debug ("Issued");

			Buffer.Encode__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
예제 #30
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);
            }