From: Alexander Rakoczy Date: Tue, 26 Nov 2019 18:45:15 +0000 (-0500) Subject: crypto/x509: correct error message for trailing issuer data X-Git-Tag: go1.15beta1~1157 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4f020a52c5830a490d7e0f76b221ac51d32f1305;p=gostls13.git crypto/x509: correct error message for trailing issuer data 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 TryBot-Result: Gobot Gobot Reviewed-by: Katie Hockman --- diff --git a/src/crypto/x509/x509.go b/src/crypto/x509/x509.go index 013f1c996d..aaf2e684fa 100644 --- a/src/crypto/x509/x509.go +++ b/src/crypto/x509/x509.go @@ -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)