summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-07 12:34:02 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-07 12:34:02 +0700
commit44cbbe9d31ed9ef5169a66aa57188df15a25633c (patch)
tree1ff09900f1982ea471d0bf4f31780631b6f16eb2
parentMerge branch 'sparkle' into 'master' (diff)
downloadBouncyCastle.NET-ed25519-44cbbe9d31ed9ef5169a66aa57188df15a25633c.tar.xz
CHOICE cannot be implicitly tagged
-rw-r--r--crypto/src/asn1/crmf/ProofOfPossession.cs3
-rw-r--r--crypto/src/asn1/x509/DistributionPoint.cs1
2 files changed, 3 insertions, 1 deletions
diff --git a/crypto/src/asn1/crmf/ProofOfPossession.cs b/crypto/src/asn1/crmf/ProofOfPossession.cs
index 8957169d7..7ba7251a1 100644
--- a/crypto/src/asn1/crmf/ProofOfPossession.cs
+++ b/crypto/src/asn1/crmf/ProofOfPossession.cs
@@ -28,7 +28,8 @@ namespace Org.BouncyCastle.Asn1.Crmf
                 break;
             case 2:
             case 3:
-                obj = PopoPrivKey.GetInstance(tagged, false);
+                // CHOICE so explicit
+                obj = PopoPrivKey.GetInstance(tagged, true);
                 break;
             default:
                 throw new ArgumentException("unknown tag: " + tagNo, "tagged");
diff --git a/crypto/src/asn1/x509/DistributionPoint.cs b/crypto/src/asn1/x509/DistributionPoint.cs
index 077c9321e..4dcfc5668 100644
--- a/crypto/src/asn1/x509/DistributionPoint.cs
+++ b/crypto/src/asn1/x509/DistributionPoint.cs
@@ -42,6 +42,7 @@ namespace Org.BouncyCastle.Asn1.X509
 				switch (t.TagNo)
                 {
                 case 0:
+                    // CHOICE so explicit
                     m_distributionPoint = DistributionPointName.GetInstance(t, true);
                     break;
                 case 1: