]> Cypherpunks.ru repositories - gostls13.git/commitdiff
crypto/x509: correct error message for trailing issuer data
authorAlexander Rakoczy <alex@golang.org>
Tue, 26 Nov 2019 18:45:15 +0000 (13:45 -0500)
committerAlexander Rakoczy <alex@golang.org>
Fri, 21 Feb 2020 18:28:52 +0000 (18:28 +0000)
The error message for trailing data after the X.509 issuer should
correctly state "issuer" instead of "subject", which appears just above
this code.

Fixes #35841

Change-Id: Iea2605ce97f2b084eb78e88f2c27d7d43749d022
Reviewed-on: https://go-review.googlesource.com/c/go/+/208978
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
src/crypto/x509/x509.go

index 013f1c996d9a0c735cfb8ae9139dc8f724432a68..aaf2e684fa52546f5e7f59be05ef9756f74b64d9 100644 (file)
@@ -1374,7 +1374,7 @@ func parseCertificate(in *certificate) (*Certificate, error) {
        if rest, err := asn1.Unmarshal(in.TBSCertificate.Issuer.FullBytes, &issuer); err != nil {
                return nil, err
        } else if len(rest) != 0 {
-               return nil, errors.New("x509: trailing data after X.509 subject")
+               return nil, errors.New("x509: trailing data after X.509 issuer")
        }
 
        out.Issuer.FillFromRDNSequence(&issuer)