diff options
author | Christian Heimes <christian@python.org> | 2017-09-08 19:00:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-08 19:00:19 (GMT) |
commit | b3ad0e5127bdeb6e506301e0d65403fa23c4177b (patch) | |
tree | 279f6060d6dc24a2b23a0d17d8ff57ed57762fce /Doc | |
parent | af8d6b90723daa943c5cd0a38ee7564790d8687a (diff) | |
download | cpython-b3ad0e5127bdeb6e506301e0d65403fa23c4177b.zip cpython-b3ad0e5127bdeb6e506301e0d65403fa23c4177b.tar.gz cpython-b3ad0e5127bdeb6e506301e0d65403fa23c4177b.tar.bz2 |
bpo-28182: Expose OpenSSL verification results (#3412)
The SSL module now raises SSLCertVerificationError when OpenSSL fails to
verify the peer's certificate. The exception contains more information about
the error.
Original patch by Chi Hsuan Yen
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/ssl.rst | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 031c361..200ab04 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -129,11 +129,26 @@ Functions, Constants, and Exceptions .. versionadded:: 3.3 +.. exception:: SSLCertVerificationError + + A subclass of :exc:`SSLError` raised when certificate validation has + failed. + + .. versionadded:: 3.7 + + .. attribute:: verify_code + + A numeric error number that denotes the verification error. + + .. attribute:: verify_message + + A human readable string of the verification error. + .. exception:: CertificateError Raised to signal an error with a certificate (such as mismatching hostname). Certificate errors detected by OpenSSL, though, raise - an :exc:`SSLError`. + an :exc:`SSLCertVerificationError`. Socket creation |