mirror of https://github.com/1Panel-dev/1Panel
fix: 证书校验规则修改 (#788)
parent
2d31c5b005
commit
14cc97eb44
|
@ -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…
Reference in New Issue