fix: 证书校验规则修改 (#788)

pull/791/head^2
ssongliu 2 years ago committed by GitHub
parent 2d31c5b005
commit 14cc97eb44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -326,7 +326,11 @@ func checkCertValid(domain string) error {
if _, err = tls.X509KeyPair(certificate, key); err != nil {
return err
}
certObj, err := x509.ParseCertificate(certificate)
certBlock, _ := pem.Decode(certificate)
if certBlock == nil {
return err
}
certObj, err := x509.ParseCertificate(certBlock.Bytes)
if err != nil {
return err
}

Loading…
Cancel
Save