diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-09-26 23:34:16 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-09-27 00:37:03 +0300 |
commit | 444c729e71f10a494edbb32ed31dbab796de0165 (patch) | |
tree | c2bec7138813d212663a1205e51decf7ef419966 | |
parent | 815c17ede4dc9033a8fc34d2d66f35ff47291b84 (diff) | |
download | gnutls-444c729e71f10a494edbb32ed31dbab796de0165.tar.gz |
tlsfuzzer: use random port for tls-fuzzer-cert test
Like the rest of tls-fuzzer tests, pass "-p PORT" to subtests, allowing
usage of random port for server.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-rw-r--r-- | tests/suite/tls-fuzzer/gnutls-cert.json | 23 | ||||
-rwxr-xr-x | tests/suite/tls-fuzzer/tls-fuzzer-cert.sh | 7 |
2 files changed, 17 insertions, 13 deletions
diff --git a/tests/suite/tls-fuzzer/gnutls-cert.json b/tests/suite/tls-fuzzer/gnutls-cert.json index 781ac2db54..fe2b39f2c2 100644 --- a/tests/suite/tls-fuzzer/gnutls-cert.json +++ b/tests/suite/tls-fuzzer/gnutls-cert.json @@ -6,41 +6,50 @@ "--priority=@PRIORITY@", "--port=@PORT@"], "environment": {"PYTHONPATH" : "."}, + "server_hostname": "localhost", + "server_port": @PORT@, "tests" : [ {"name": "test-rsa-sigs-on-certificate-verify.py", "arguments" : ["-k", "tests/clientX509Key.pem", - "-c", "tests/clientX509Cert.pem"] + "-c", "tests/clientX509Cert.pem", + "-p", "@PORT@"] }, {"name" : "test-certificate-verify.py", "arguments" : ["-k", "tests/clientX509Key.pem", - "-c", "tests/clientX509Cert.pem"] + "-c", "tests/clientX509Cert.pem", + "-p", "@PORT@"] }, {"name" : "test-certificate-verify-malformed.py", "arguments" : ["-k", "tests/clientX509Key.pem", - "-c", "tests/clientX509Cert.pem"] + "-c", "tests/clientX509Cert.pem", + "-p", "@PORT@"] }, {"name" : "test-certificate-verify-malformed-sig.py", "arguments" : ["-k", "tests/clientX509Key.pem", - "-c", "tests/clientX509Cert.pem"] + "-c", "tests/clientX509Cert.pem", + "-p", "@PORT@"] }, {"name" : "test-certificate-request.py", "comment" : "tlsfuzzer doesn't like our set of algorithms", "arguments" : ["-k", "tests/clientX509Key.pem", "-c", "tests/clientX509Cert.pem", - "-e", "check sigalgs in cert request"] + "-e", "check sigalgs in cert request", + "-p", "@PORT@"] }, {"name" : "test-rsa-pss-sigs-on-certificate-verify.py", "arguments" : ["-k", "tests/clientX509Key.pem", "-c", "tests/clientX509Cert.pem", "-e", "check CertificateRequest sigalgs", - "-n", "100"] + "-n", "100", + "-p", "@PORT@"] }, {"name": "test-certificate-malformed.py", "comment" : "tlsfuzzer doesn't like the alerts we send", "arguments" : ["-k", "tests/clientX509Key.pem", "-c", "tests/clientX509Cert.pem", "-e", "fuzz empty certificate - overall 7, certs 4, cert 1", - "-e", "fuzz empty certificate - overall 8, certs 5, cert 2"] + "-e", "fuzz empty certificate - overall 8, certs 5, cert 2", + "-p", "@PORT@"] } ] } diff --git a/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh b/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh index 30cfe25c38..761363b7a2 100755 --- a/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh +++ b/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh @@ -27,11 +27,7 @@ TMPFILE=tls-fuzzer-cert.$$.tmp . "${srcdir}/../scripts/common.sh" -# We hard-code the port because of limitations in tlsfuzzer -#eval "${GETPORT}" -PORT=4433 - -$LOCKFILE +eval "${GETPORT}" pushd tls-fuzzer @@ -68,5 +64,4 @@ rm -f ${TMPFILE} popd popd -$UNLOCKFILE exit $retval |