Add an argument check to test-ovsdb.py to ensure that the user has provided the private key, the certificate, and the peer CA certificate needed to set up an SSL connection.
Signed-off-by: Jakub Sitnicki <[email protected]> --- tests/test-ovsdb.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py index 45341dfdf..8dba9f85f 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -555,6 +555,11 @@ def do_idl(schema_file, remote, *commands): track_notify = False if remote.startswith("ssl:"): + if len(commands) < 3: + sys.stderr.write("SSL connection requires private key, " + "certificate for private key, and peer CA " + "certificate as arguments\n") + sys.exit(1) ovs.stream.Stream.ssl_set_private_key_file(commands[0]) ovs.stream.Stream.ssl_set_certificate_file(commands[1]) ovs.stream.Stream.ssl_set_ca_cert_file(commands[2]) -- 2.14.3 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
