mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
x509: fix error message
This commit is contained in:
parent
8d0ee45571
commit
2071214f1f
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user