diff options
Diffstat (limited to 'crypto/src/asn1/ocsp/BasicOCSPResponse.cs')
-rw-r--r-- | crypto/src/asn1/ocsp/BasicOCSPResponse.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/src/asn1/ocsp/BasicOCSPResponse.cs b/crypto/src/asn1/ocsp/BasicOCSPResponse.cs index e6aa1f86b..45dadba4f 100644 --- a/crypto/src/asn1/ocsp/BasicOCSPResponse.cs +++ b/crypto/src/asn1/ocsp/BasicOCSPResponse.cs @@ -123,15 +123,9 @@ namespace Org.BouncyCastle.Asn1.Ocsp */ public override Asn1Object ToAsn1Object() { - Asn1EncodableVector v = new Asn1EncodableVector( - tbsResponseData, signatureAlgorithm, signature); - - if (certs != null) - { - v.Add(new DerTaggedObject(true, 0, certs)); - } - - return new DerSequence(v); + Asn1EncodableVector v = new Asn1EncodableVector(tbsResponseData, signatureAlgorithm, signature); + v.AddOptionalTagged(true, 0, certs); + return new DerSequence(v); } } } |