summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-10-03 14:17:52 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-10-03 14:17:56 +0200
commit8497db7636fdda6876240a71b02525a65b6f7ff3 (patch)
tree1e72773392849acbe36b2d185514f4620f49889a
parent0f0033b89b61f5baa4e433df6db6835885fff250 (diff)
downloadgnutls-8497db7636fdda6876240a71b02525a65b6f7ff3.tar.gz
tests: provable-dh was split into two programs
This allows the test to be run more efficiently when run in parallel.
-rw-r--r--tests/cert-tests/Makefile.am2
-rwxr-xr-xtests/cert-tests/provable-dh19
-rwxr-xr-xtests/cert-tests/provable-dh-default51
3 files changed, 53 insertions, 19 deletions
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index a5b38cab71..d240f3479b 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -62,7 +62,7 @@ EXTRA_DIST = data/ca-no-pathlen.pem data/no-ca-or-pathlen.pem data/aki-cert.pem
dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \
pkcs7 pkcs7-broken-sigs privkey-import name-constraints certtool-long-cn crl provable-privkey \
- provable-dh userid sha2-test sha2-dsa-test
+ provable-dh userid sha2-test sha2-dsa-test provable-dh-default
if !ENABLE_FIPS140
dist_check_SCRIPTS += pkcs12
diff --git a/tests/cert-tests/provable-dh b/tests/cert-tests/provable-dh
index efdaee961e..d1c1546b5f 100755
--- a/tests/cert-tests/provable-dh
+++ b/tests/cert-tests/provable-dh
@@ -23,7 +23,7 @@
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
DIFF="${DIFF:-diff}"
-OUTFILE=provable-dh.tmp
+OUTFILE=provable-dh$$.tmp
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
@@ -62,23 +62,6 @@ if test "${rc}" != "0"; then
exit 1
fi
-#DH parameters - no seed
-${VALGRIND} "${CERTTOOL}" --generate-dh-params --provable --outfile "$OUTFILE"
-rc=$?
-
-if test "${rc}" != "0"; then
- echo "test2: Could not generate DH parameters"
- exit 1
-fi
-
-${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE"
-rc=$?
-
-if test "${rc}" != "0"; then
- echo "test2: Could not verify the generated parameters"
- exit 1
-fi
-
rm -f "$OUTFILE"
exit 0
diff --git a/tests/cert-tests/provable-dh-default b/tests/cert-tests/provable-dh-default
new file mode 100755
index 0000000000..517e2267b0
--- /dev/null
+++ b/tests/cert-tests/provable-dh-default
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Copyright (C) 2016 Red Hat, Inc.
+#
+# This file is part of GnuTLS.
+#
+# GnuTLS is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# GnuTLS is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GnuTLS; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+#set -e
+
+srcdir="${srcdir:-.}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
+DIFF="${DIFF:-diff}"
+OUTFILE=provable-dh$$.tmp
+
+if ! test -z "${VALGRIND}"; then
+ VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+fi
+
+#DH parameters - no seed
+${VALGRIND} "${CERTTOOL}" --generate-dh-params --provable --outfile "$OUTFILE"
+rc=$?
+
+if test "${rc}" != "0"; then
+ echo "test2: Could not generate DH parameters"
+ exit 1
+fi
+
+${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE"
+rc=$?
+
+if test "${rc}" != "0"; then
+ echo "test2: Could not verify the generated parameters"
+ exit 1
+fi
+
+rm -f "$OUTFILE"
+
+exit 0