diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-25 00:13:45 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-25 00:13:45 +0700 |
commit | 11b4d6a7afeb6f3be906a1a0ddf132df3f255b4a (patch) | |
tree | f76b51eae3e754f33c61dde13c7dd429e0f70753 /crypto/src/x509 | |
parent | fixed refactored class names in pqc/utils (diff) | |
download | BouncyCastle.NET-ed25519-11b4d6a7afeb6f3be906a1a0ddf132df3f255b4a.tar.xz |
Add Asn1GeneralizedTime and use
Diffstat (limited to 'crypto/src/x509')
-rw-r--r-- | crypto/src/x509/X509V2AttributeCertificateGenerator.cs | 4 | ||||
-rw-r--r-- | crypto/src/x509/X509V2CRLGenerator.cs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs index 1cb239e87..3a0a02ea9 100644 --- a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs +++ b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs @@ -54,13 +54,13 @@ namespace Org.BouncyCastle.X509 public void SetNotBefore( DateTime date) { - acInfoGen.SetStartDate(new DerGeneralizedTime(date)); + acInfoGen.SetStartDate(new Asn1GeneralizedTime(date)); } public void SetNotAfter( DateTime date) { - acInfoGen.SetEndDate(new DerGeneralizedTime(date)); + acInfoGen.SetEndDate(new Asn1GeneralizedTime(date)); } /// <summary>Add an attribute.</summary> diff --git a/crypto/src/x509/X509V2CRLGenerator.cs b/crypto/src/x509/X509V2CRLGenerator.cs index dc3f8c662..a57383613 100644 --- a/crypto/src/x509/X509V2CRLGenerator.cs +++ b/crypto/src/x509/X509V2CRLGenerator.cs @@ -79,7 +79,8 @@ namespace Org.BouncyCastle.X509 int reason, DateTime invalidityDate) { - tbsGen.AddCrlEntry(new DerInteger(userCertificate), new Time(revocationDate), reason, new DerGeneralizedTime(invalidityDate)); + tbsGen.AddCrlEntry(new DerInteger(userCertificate), new Time(revocationDate), reason, + new Asn1GeneralizedTime(invalidityDate)); } /** |