From 484dd43ea2899cf1c8a9a7d485a1d3b1dc438363 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 3 Aug 2023 20:16:20 -0400 Subject: [PATCH] use tls.CertificateVerificationError instead of redefining it --- common.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/common.go b/common.go index 6690163..841c1a4 100644 --- a/common.go +++ b/common.go @@ -1451,16 +1451,4 @@ func isSupportedSignatureAlgorithm(sigAlg SignatureScheme, supportedSignatureAlg } // CertificateVerificationError is returned when certificate verification fails during the handshake. -type CertificateVerificationError struct { - // UnverifiedCertificates and its contents should not be modified. - UnverifiedCertificates []*x509.Certificate - Err error -} - -func (e *CertificateVerificationError) Error() string { - return fmt.Sprintf("tls: failed to verify certificate: %s", e.Err) -} - -func (e *CertificateVerificationError) Unwrap() error { - return e.Err -} +type CertificateVerificationError = tls.CertificateVerificationError