summaryrefslogtreecommitdiff
path: root/tests/scripts/common.sh
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2020-12-28 16:16:53 +0100
committerDaiki Ueno <ueno@gnu.org>2021-01-26 11:01:09 +0100
commit40203390a48b8fa01d72c6a9739d963cf24556b8 (patch)
treee2b5234a263dc7066c7fc8df3a7914fca2b5c35f /tests/scripts/common.sh
parentc2e39386e5df376620264b820fde2994b12d035d (diff)
downloadgnutls-40203390a48b8fa01d72c6a9739d963cf24556b8.tar.gz
testpkcs11: use datefudge to trick certificate expiry
The certificates stored in tests/testpkcs11-certs expired on 2020-12-13. To avoid verification failure due to that, use datefudge to set custom date when calling gnutls-cli, gnutls-serv, and certtool. Based on the patch by Andreas Metzler: https://gitlab.com/gnutls/gnutls/-/issues/1135#note_469682121 Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'tests/scripts/common.sh')
-rw-r--r--tests/scripts/common.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
index 6ae19fa586..69b5fd612a 100644
--- a/tests/scripts/common.sh
+++ b/tests/scripts/common.sh
@@ -187,6 +187,11 @@ launch_bare_server() {
${SERV} $* >${LOGFILE-/dev/null} &
}
+launch_bare_server2() {
+ wait_for_free_port "$PORT"
+ "$@" >${LOGFILE-/dev/null} &
+}
+
wait_server() {
local PID=$1
trap "test -n \"${PID}\" && kill ${PID};exit 1" 1 15 2