diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-04-16 16:56:28 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-04-16 16:56:28 (GMT) |
commit | 94a5b663bf39a130fcd8b437aded6e7a7c396cff (patch) | |
tree | 01b283bc5fdd84e1855aa20d6ac409197faf1173 /Lib/ssl.py | |
parent | 0fba0c3ebfc8f5feed517783231bdff1e4a3e1a7 (diff) | |
download | cpython-94a5b663bf39a130fcd8b437aded6e7a7c396cff.zip cpython-94a5b663bf39a130fcd8b437aded6e7a7c396cff.tar.gz cpython-94a5b663bf39a130fcd8b437aded6e7a7c396cff.tar.bz2 |
Issue #20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not PROTOCOL_SSLv3, for maximum compatibility.
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -922,7 +922,7 @@ def PEM_cert_to_DER_cert(pem_cert_string): d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)] return base64.decodebytes(d.encode('ASCII', 'strict')) -def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None): +def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. |