summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-11-22 00:39:58 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-11-22 00:39:58 +0700
commit9b3f2f786a9b5622440a7c1a60decb687d767b54 (patch)
tree4227e18a1f1bbe48c8d614a2cf3901e650fb96fc /crypto/src/asn1
parentRenaming (diff)
downloadBouncyCastle.NET-ed25519-9b3f2f786a9b5622440a7c1a60decb687d767b54.tar.xz
Use Meta for checked casts
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/DERExternal.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/src/asn1/DERExternal.cs b/crypto/src/asn1/DERExternal.cs
index 28d5cc46a..b8987d53e 100644
--- a/crypto/src/asn1/DERExternal.cs
+++ b/crypto/src/asn1/DERExternal.cs
@@ -246,11 +246,9 @@ namespace Org.BouncyCastle.Asn1
             switch (tagNo)
             {
             case 1:
-                //return ASN1OctetString.TYPE.checkedCast(externalContent);
-                return (Asn1OctetString)externalContent;
+                return Asn1OctetString.Meta.Instance.CheckedCast(externalContent);
             case 2:
-                //return ASN1BitString.TYPE.checkedCast(externalContent);
-                return (DerBitString)externalContent;
+                return DerBitString.Meta.Instance.CheckedCast(externalContent);
             default:
                 return externalContent;
             }