diff options
Diffstat (limited to 'crypto/src/tls/TrustedAuthority.cs')
-rw-r--r-- | crypto/src/tls/TrustedAuthority.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/src/tls/TrustedAuthority.cs b/crypto/src/tls/TrustedAuthority.cs index cd564ebfa..b82666450 100644 --- a/crypto/src/tls/TrustedAuthority.cs +++ b/crypto/src/tls/TrustedAuthority.cs @@ -107,8 +107,10 @@ namespace Org.BouncyCastle.Tls case Tls.IdentifierType.x509_name: { byte[] derEncoding = TlsUtilities.ReadOpaque16(input, 1); - Asn1Object asn1 = TlsUtilities.ReadDerObject(derEncoding); - identifier = X509Name.GetInstance(asn1); + Asn1Object asn1 = TlsUtilities.ReadAsn1Object(derEncoding); + X509Name x509Name = X509Name.GetInstance(asn1); + TlsUtilities.RequireDerEncoding(x509Name, derEncoding); + identifier = x509Name; break; } default: |