diff options
-rw-r--r-- | crypto/src/x509/X509Certificate.cs | 2 | ||||
-rw-r--r-- | crypto/src/x509/X509Crl.cs | 2 | ||||
-rw-r--r-- | crypto/test/src/asn1/test/CertificateTest.cs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index 4487232f0..c323fc8f1 100644 --- a/crypto/src/x509/X509Certificate.cs +++ b/crypto/src/x509/X509Certificate.cs @@ -376,7 +376,7 @@ namespace Org.BouncyCastle.X509 protected override X509Extensions GetX509Extensions() { - return c.Version == 3 + return c.Version >= 3 ? c.TbsCertificate.Extensions : null; } diff --git a/crypto/src/x509/X509Crl.cs b/crypto/src/x509/X509Crl.cs index 1746960fb..0679cb240 100644 --- a/crypto/src/x509/X509Crl.cs +++ b/crypto/src/x509/X509Crl.cs @@ -64,7 +64,7 @@ namespace Org.BouncyCastle.X509 protected override X509Extensions GetX509Extensions() { - return Version == 2 + return c.Version >= 2 ? c.TbsCertList.Extensions : null; } diff --git a/crypto/test/src/asn1/test/CertificateTest.cs b/crypto/test/src/asn1/test/CertificateTest.cs index 532e81aba..7fcb1fffa 100644 --- a/crypto/test/src/asn1/test/CertificateTest.cs +++ b/crypto/test/src/asn1/test/CertificateTest.cs @@ -212,7 +212,7 @@ namespace Org.BouncyCastle.Asn1.Tests + " got " + tbsCert.Subject.ToString()); } - if (tbsCert.Version == 3) + if (tbsCert.Version >= 3) { X509Extensions ext = tbsCert.Extensions; if (ext != null) |