summaryrefslogtreecommitdiff
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2017-09-08 12:00:19 -0700
committerGitHub <noreply@github.com>2017-09-08 12:00:19 -0700
commitb3ad0e5127bdeb6e506301e0d65403fa23c4177b (patch)
tree279f6060d6dc24a2b23a0d17d8ff57ed57762fce /Lib/ssl.py
parentaf8d6b90723daa943c5cd0a38ee7564790d8687a (diff)
downloadcpython-git-b3ad0e5127bdeb6e506301e0d65403fa23c4177b.tar.gz
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 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 1f3a31a9b7..062e802118 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -104,7 +104,7 @@ from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION
from _ssl import _SSLContext, MemoryBIO, SSLSession
from _ssl import (
SSLError, SSLZeroReturnError, SSLWantReadError, SSLWantWriteError,
- SSLSyscallError, SSLEOFError,
+ SSLSyscallError, SSLEOFError, SSLCertVerificationError
)
from _ssl import txt2obj as _txt2obj, nid2obj as _nid2obj
from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes