[issue11220] https sslv3 error 14077417: illegal parameter

Senthil Kumaran report at bugs.python.org
Wed Feb 16 10:47:48 CET 2011


Senthil Kumaran <orsenthil at gmail.com> added the comment:

The problem is the server strictly accepts SSLv3 only and urllib and http.client send SSLv23 protocol.

(In http/client.py, line 1077)
             if context is None:
                 # Some reasonable defaults
                 context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
                 context.options |= ssl.OP_NO_SSLv2
             will_verify = context.verify_mode != ssl.CERT_NONE


However, in order to use only SSLv3, one can set the context to ssl.PROTOCOL_SSLv3 in the HTTPSHandler and use it.

import urllib.request
import ssl
https_sslv3_handler = urllib.request.HTTPSHandler(context=ssl.SSLContext(ssl.PROTOCOL_SSLv3))
opener = urllib.request.build_opener(https_sslv3_handler)
urllib.request.install_opener(opener)
urllib.request.urlopen('https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11220>
_______________________________________


More information about the Python-bugs-list mailing list