mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
python ovs: Fix SSL exceptions with pyOpenSSL v0.13
Centos provides pyOpenSSL version pyOpenSSL-0.13.1-3.el7.x86_64. There are 2 issues using this version, which this patch fixes - The test case "simple idl verify notify - SSL" is skipped. This is because "python -m OpenSSL.SSL" is used to detect the presence of pyOpenSSL package. pyOpenSSL v0.13 has C python modules because of which the above command returns 1. So this patch fixes this by using 'python -c "import OpenSSL.SSL"'. - The SSL.Context class does not have the function "set_session_cache_mode" defined. Our usage here was only relevant for server-side connections, (pssl), which is not yet supported by python-ovs, so just remove the usage of this function. The default cache mode (server) will just be ignored. I have not tested with older versions (< 0.13) of pyOpenSSL. Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Acked-by: Lance Richardson <lrichard@redhat.com> Tested-by: Marcin Mirecki <mmirecki@redhat.com> Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
committed by
Russell Bryant
parent
66a8b4beaa
commit
ca9c2c56ff
@@ -767,7 +767,6 @@ class SSLStream(Stream):
|
||||
ctx = SSL.Context(SSL.SSLv23_METHOD)
|
||||
ctx.set_verify(SSL.VERIFY_PEER, SSLStream.verify_cb)
|
||||
ctx.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)
|
||||
ctx.set_session_cache_mode(SSL.SESS_CACHE_OFF)
|
||||
# If the client has not set the SSL configuration files
|
||||
# exception would be raised.
|
||||
ctx.use_privatekey_file(Stream._SSL_private_key_file)
|
||||
|
Reference in New Issue
Block a user