summary refs log tree commit diff
path: root/crypto/src/asn1/ocsp
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-11-18 13:46:18 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-11-18 13:46:18 +0700
commit4fccb8f490eefe7181558b2c3376ab23c33632ee (patch)
treefe8c1877bb5567cb4823823af77e5c8a38423db8 /crypto/src/asn1/ocsp
parentASN.1: Staged encoding (diff)
downloadBouncyCastle.NET-ed25519-4fccb8f490eefe7181558b2c3376ab23c33632ee.tar.xz
ASN.1: Port of bc-java TYPE instances
- we use Meta.Instance here due to syntax restrictions
- also reworked some ASN.1 string types
Diffstat (limited to 'crypto/src/asn1/ocsp')
-rw-r--r--crypto/src/asn1/ocsp/CertStatus.cs23
1 files changed, 12 insertions, 11 deletions
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));
             }
         }