summary refs log tree commit diff
path: root/crypto/src/asn1/DerGeneralString.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-06-21 18:02:12 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-06-21 18:02:12 +0700
commit4465dd325cfec9c80fec084399f80070557ecbc0 (patch)
tree9d66da98adac9a740e2ce99b926d3f99fc02678a /crypto/src/asn1/DerGeneralString.cs
parentASN.1: GetTagged method for all universal types (diff)
downloadBouncyCastle.NET-ed25519-4465dd325cfec9c80fec084399f80070557ecbc0.tar.xz
ASN.1: GetOptional for universal types should not convert
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/DerGeneralString.cs6
1 files changed, 0 insertions, 6 deletions
diff --git a/crypto/src/asn1/DerGeneralString.cs b/crypto/src/asn1/DerGeneralString.cs
index a65eb669b..f2740eb54 100644
--- a/crypto/src/asn1/DerGeneralString.cs
+++ b/crypto/src/asn1/DerGeneralString.cs
@@ -61,12 +61,6 @@ namespace Org.BouncyCastle.Asn1
             if (element is DerGeneralString existing)
                 return existing;
 
-            if (element is IAsn1Convertible asn1Convertible && !(element is Asn1Object) &&
-                asn1Convertible.ToAsn1Object() is DerGeneralString converted)
-            {
-                return converted;
-            }
-
             return null;
         }