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

Commit

Permalink
use tls.CertificateVerificationError instead of redefining it
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Aug 4, 2023
1 parent a8e6814 commit 484dd43
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 484dd43

Please sign in to comment.