mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add SSLCertVerificationError for 3.7+ (#2729)
As of 3.7, ssl.CertificateError became an alias for the new SSLCertVerificationError.
This commit is contained in:
committed by
Sebastian Rittau
parent
2ea8abc1c7
commit
0854df365d
@@ -27,7 +27,13 @@ class SSLWantReadError(SSLError): ...
|
||||
class SSLWantWriteError(SSLError): ...
|
||||
class SSLSyscallError(SSLError): ...
|
||||
class SSLEOFError(SSLError): ...
|
||||
class CertificateError(Exception): ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
class SSLCertVerificationError(SSLError, ValueError): ...
|
||||
|
||||
CertificateError = SSLCertVerificationError
|
||||
else:
|
||||
class CertificateError(ValueError): ...
|
||||
|
||||
|
||||
def wrap_socket(sock: socket.socket, keyfile: Optional[str] = ...,
|
||||
|
||||
Reference in New Issue
Block a user