summary refs log tree commit diff
path: root/crypto/src/tls/CertificateRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/tls/CertificateRequest.cs')
-rw-r--r--crypto/src/tls/CertificateRequest.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/src/tls/CertificateRequest.cs b/crypto/src/tls/CertificateRequest.cs
index 1abf01aed..8005731f4 100644
--- a/crypto/src/tls/CertificateRequest.cs
+++ b/crypto/src/tls/CertificateRequest.cs
@@ -263,8 +263,10 @@ namespace Org.BouncyCastle.Tls
                     do
                     {
                         byte[] derEncoding = TlsUtilities.ReadOpaque16(bis, 1);
-                        Asn1Object asn1 = TlsUtilities.ReadDerObject(derEncoding);
-                        certificateAuthorities.Add(X509Name.GetInstance(asn1));
+                        Asn1Object asn1 = TlsUtilities.ReadAsn1Object(derEncoding);
+                        X509Name ca = X509Name.GetInstance(asn1);
+                        TlsUtilities.RequireDerEncoding(ca, derEncoding);
+                        certificateAuthorities.Add(ca);
                     }
                     while (bis.Position < bis.Length);
                 }