Search code examples
pythonpython-2.7opensslfips

call to ssl.wrap_socket fails with the error Invalid SSL protocol variant specified


I have built python with fips capable openssl, all things seem to be working fine but call to wrap_socketfails with the error "Invalid SSL protocol variant specified" when fips mode is enabled. This call succeeds when not in fips mode

Debugging through the code it was found that the call to SSL_CTX_new(SSLv3_method() in _ssl.c is returning null in fips mode as a result of which the above mentioned error is occurring

Any idea as to what might be causing this, is it possible that some non fips components are getting called ?


Solution

  • Only Tls protocol is supported in Fips mode.

    Following Dr. Stephen Henson's comment in the below link resolved my issue

    http://openssl.6102.n7.nabble.com/Having-problem-using-SSL-td27038.html