diff options
Diffstat (limited to 'crypto/src/asn1/x509/ObjectDigestInfo.cs')
-rw-r--r-- | crypto/src/asn1/x509/ObjectDigestInfo.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/crypto/src/asn1/x509/ObjectDigestInfo.cs b/crypto/src/asn1/x509/ObjectDigestInfo.cs index 9cd9a5f4c..190243cc6 100644 --- a/crypto/src/asn1/x509/ObjectDigestInfo.cs +++ b/crypto/src/asn1/x509/ObjectDigestInfo.cs @@ -162,18 +162,12 @@ namespace Org.BouncyCastle.Asn1.X509 * * </pre> */ - public override Asn1Object ToAsn1Object() + public override Asn1Object ToAsn1Object() { Asn1EncodableVector v = new Asn1EncodableVector(digestedObjectType); - - if (otherObjectTypeID != null) - { - v.Add(otherObjectTypeID); - } - - v.Add(digestAlgorithm, objectDigest); - - return new DerSequence(v); + v.AddOptional(otherObjectTypeID); + v.Add(digestAlgorithm, objectDigest); + return new DerSequence(v); } } } |