From 5828176f009e4c68c65518c32845ae5ef9ed60da Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 26 May 2017 08:50:01 +0700 Subject: X.509 certificates in TLS Certificate message allowed to be BER --- crypto/src/crypto/tls/Certificate.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/src') diff --git a/crypto/src/crypto/tls/Certificate.cs b/crypto/src/crypto/tls/Certificate.cs index c59616c95..e0479997a 100644 --- a/crypto/src/crypto/tls/Certificate.cs +++ b/crypto/src/crypto/tls/Certificate.cs @@ -115,8 +115,8 @@ namespace Org.BouncyCastle.Crypto.Tls IList certificate_list = Platform.CreateArrayList(); while (buf.Position < buf.Length) { - byte[] derEncoding = TlsUtilities.ReadOpaque24(buf); - Asn1Object asn1Cert = TlsUtilities.ReadDerObject(derEncoding); + byte[] berEncoding = TlsUtilities.ReadOpaque24(buf); + Asn1Object asn1Cert = TlsUtilities.ReadAsn1Object(berEncoding); certificate_list.Add(X509CertificateStructure.GetInstance(asn1Cert)); } -- cgit 1.5.1