diff options
Diffstat (limited to 'crypto/src/ocsp/BasicOCSPResp.cs')
-rw-r--r-- | crypto/src/ocsp/BasicOCSPResp.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/src/ocsp/BasicOCSPResp.cs b/crypto/src/ocsp/BasicOCSPResp.cs index 6c8ad9eee..3e22931af 100644 --- a/crypto/src/ocsp/BasicOCSPResp.cs +++ b/crypto/src/ocsp/BasicOCSPResp.cs @@ -117,10 +117,11 @@ namespace Org.BouncyCastle.Ocsp { foreach (Asn1Encodable ae in certs) { - if (ae != null && ae.ToAsn1Object() is Asn1Sequence s) - { - result.Add(new X509Certificate(X509CertificateStructure.GetInstance(s))); - } + var c = X509CertificateStructure.GetInstance(ae); + if (c != null) + { + result.Add(new X509Certificate(c)); + } } } |