x509: fix error message

This commit is contained in:
Sun Yimin 2022-08-02 15:09:34 +08:00 committed by GitHub
parent 8d0ee45571
commit 2071214f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1019,7 +1019,7 @@ func ParseCertificates(der []byte) ([]*Certificate, error) {
func ParseCertificatePEM(data []byte) (*Certificate, error) { func ParseCertificatePEM(data []byte) (*Certificate, error) {
block, _ := pem.Decode(data) block, _ := pem.Decode(data)
if block == nil { if block == nil {
return nil, errors.New("failed to decode PEM block containing CSR") return nil, errors.New("x509: failed to decode PEM block containing certificate")
} }
return ParseCertificate(block.Bytes) return ParseCertificate(block.Bytes)
} }