Validity
Inheritance: Goedel.ASN1.Root
 /// <summary>
 /// Create a TBSCertificate item from a X509Certificate2 object.
 /// </summary>
 /// <param name="X509Cert"></param>
 public TBSCertificate(X509Certificate2 X509Cert) {
     Version = X509Cert.Version;
     SerialNumber = BaseConvert.FromBase16String(X509Cert.SerialNumber);
     Signature = new AlgorithmIdentifier(X509Cert.SignatureAlgorithm);
     Issuer = Parse(X509Cert.IssuerName);
     Validity = new Validity(X509Cert.NotBefore, X509Cert.NotAfter);
     Subject = Parse(X509Cert.SubjectName);
     Extensions = new List<Extension>();
     foreach (var Extension in X509Cert.Extensions) {
         Extensions.Add(Parse(Extension));
         }
     }
 /// <summary>
 /// Set the validity interval to the specified NotBefore and NotAfter times.
 /// </summary>
 /// <param name="NotBefore">First time instant that the certificate is valid.</param>
 /// <param name="NotAfter">Last time instant that the certificate is valid.</param>
 public void SetValidity(DateTime NotBefore, DateTime NotAfter) {
     Validity = new Validity(NotBefore, NotAfter);
     }