1
0
mirror of https://github.com/golang/go synced 2024-09-29 22:14:29 -06:00

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 <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
This commit is contained in:
Alexander Rakoczy 2019-11-26 13:45:15 -05:00
parent ae7cd5c029
commit 4f020a52c5

View 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)