[New-bugs-announce] [issue24545] Issue with ssl package

Kayne report at bugs.python.org
Wed Jul 1 15:40:52 CEST 2015

New submission from Kayne:

I tried to use cert = ssl.get_server_certificate((XXXX, 443)) and it crashed with following error:

Traceback (most recent call last):
  File "PeerCertChainQuery.py", line 107, in <module>
    cert = ssl.get_server_certificate((options.host, 443))
  File "/opt/lib/python2.7/ssl.py", line 965, in get_server_certificate
    with closing(context.wrap_socket(sock)) as sslsock:
  File "/opt/lib/python2.7/ssl.py", line 350, in wrap_socket
  File "/opt/lib/python2.7/ssl.py", line 566, in __init__
  File "/opt/lib/python2.7/ssl.py", line 788, in do_handshake
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:581)

Note that the configuration of apache server on the host XXXX has disabled ssl3 support and it only supports TLSV1, TLVS1.1, AND TLSV1.3.

This also happened on Python 3.4.3. 

    Much appreciated if you could have a look at what happened or suggest me how to get around this.

components: Library (Lib)
messages: 246037
nosy: kxl561
priority: normal
severity: normal
status: open
title: Issue with ssl package
type: crash
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list