summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNuman Siddique <nusiddiq@redhat.com>2017-05-15 21:09:25 +0530
committerRussell Bryant <rbryant@redhat.com>2017-05-23 13:34:03 -0400
commitca9c2c56ff95ec44d264d817d636c1b5eb027f57 (patch)
tree6842965401424984db46c1fc8d5a6cad883e477e /tests
parent66a8b4beaa825e699cf12b16c494667e1ef76668 (diff)
downloadopenvswitch-ca9c2c56ff95ec44d264d817d636c1b5eb027f57.tar.gz
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovsdb-idl.at2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
index d28dfc11e..4eaf87f86 100644
--- a/tests/ovsdb-idl.at
+++ b/tests/ovsdb-idl.at
@@ -1185,7 +1185,7 @@ m4_define([OVSDB_CHECK_IDL_NOTIFY_SSL_PY],
[AT_SETUP([$1 - SSL])
AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
AT_SKIP_IF([test $HAVE_PYTHON = no])
- $PYTHON -m OpenSSL.SSL
+ $PYTHON -c "import OpenSSL.SSL"
SSL_PRESENT=$?
AT_SKIP_IF([test $SSL_PRESENT != 0])
AT_KEYWORDS([ovsdb server idl Python notify - ssl socket])