Message ID | 20180418160115.16204-2-jkbs@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | Run Python IDL checks using SSL | expand |
On Wed, Apr 18, 2018 at 06:01:10PM +0200, Jakub Sitnicki wrote: > 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 <jkbs@redhat.com> Applied to master, thanks!
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])
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 <jkbs@redhat.com> --- tests/test-ovsdb.py | 5 +++++ 1 file changed, 5 insertions(+)