From 4fccb8f490eefe7181558b2c3376ab23c33632ee Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 18 Nov 2021 13:46:18 +0700 Subject: ASN.1: Port of bc-java TYPE instances - we use Meta.Instance here due to syntax restrictions - also reworked some ASN.1 string types --- crypto/src/asn1/ocsp/CertStatus.cs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'crypto/src/asn1/ocsp') diff --git a/crypto/src/asn1/ocsp/CertStatus.cs b/crypto/src/asn1/ocsp/CertStatus.cs index 7dd99b844..8a4d2242d 100644 --- a/crypto/src/asn1/ocsp/CertStatus.cs +++ b/crypto/src/asn1/ocsp/CertStatus.cs @@ -34,22 +34,23 @@ namespace Org.BouncyCastle.Asn1.Ocsp this.value = value; } - public CertStatus( - Asn1TaggedObject choice) + public CertStatus(Asn1TaggedObject choice) { this.tagNo = choice.TagNo; switch (choice.TagNo) { - case 1: - value = RevokedInfo.GetInstance(choice, false); - break; - case 0: - case 2: - value = DerNull.Instance; - break; - default: - throw new ArgumentException("Unknown tag encountered: " + choice.TagNo); + case 0: + value = Asn1Null.GetInstance(choice, false); + break; + case 1: + value = RevokedInfo.GetInstance(choice, false); + break; + case 2: + value = Asn1Null.GetInstance(choice, false); + break; + default: + throw new ArgumentException("Unknown tag encountered: " + Asn1Utilities.GetTagText(choice)); } } -- cgit 1.4.1