Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit 484dd43

Browse files
use tls.CertificateVerificationError instead of redefining it
1 parent a8e6814 commit 484dd43

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

common.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,16 +1451,4 @@ func isSupportedSignatureAlgorithm(sigAlg SignatureScheme, supportedSignatureAlg
14511451
}
14521452

14531453
// CertificateVerificationError is returned when certificate verification fails during the handshake.
1454-
type CertificateVerificationError struct {
1455-
// UnverifiedCertificates and its contents should not be modified.
1456-
UnverifiedCertificates []*x509.Certificate
1457-
Err error
1458-
}
1459-
1460-
func (e *CertificateVerificationError) Error() string {
1461-
return fmt.Sprintf("tls: failed to verify certificate: %s", e.Err)
1462-
}
1463-
1464-
func (e *CertificateVerificationError) Unwrap() error {
1465-
return e.Err
1466-
}
1454+
type CertificateVerificationError = tls.CertificateVerificationError

0 commit comments

Comments
 (0)