]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tlsfuzzer: use random port for tls-fuzzer-cert test
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Wed, 26 Sep 2018 20:34:16 +0000 (23:34 +0300)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Wed, 26 Sep 2018 21:37:03 +0000 (00:37 +0300)
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>
tests/suite/tls-fuzzer/gnutls-cert.json
tests/suite/tls-fuzzer/tls-fuzzer-cert.sh

index 781ac2db549d7de469434f4e4cc79e744f672e12..fe2b39f2c2e687d87ad243a1c687ed0594151b12 100644 (file)
@@ -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@"]
         }
      ]
     }
index 30cfe25c3856cb46867e12b284371d44bf2a5736..761363b7a22f53514cb2f580ebdd1e17c5b93e55 100755 (executable)
@@ -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