summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-04-17 13:32:18 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-05-26 04:12:04 +0000
commit4d2c44d049cd360d8cb925d8e40645d4c6b44cfc (patch)
tree3131f611b73a1033dbc5dfaa5234e8296297752c /tests/scripts
parentf6b1a99b05c590d4f9d43a0891e6ddb70886926e (diff)
downloadgnutls-4d2c44d049cd360d8cb925d8e40645d4c6b44cfc.tar.gz
tests: exercise TLS 1.3 session resumption
This requires a few changes to the resume.c test: because NewSessionTicket is a post-handshake message, gnutls_session_get_data2() needs to be called after sending the first application data. Also, when GNUTLS_E_AGAIN, gnutls_record_recv() needs to retry. Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/common.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
index 4615770f6b..8662d93cf1 100644
--- a/tests/scripts/common.sh
+++ b/tests/scripts/common.sh
@@ -195,3 +195,14 @@ else
LOCKFILE="lockfile global.lock"
UNLOCKFILE="rm -f global.lock"
fi
+
+create_testdir() {
+ local PREFIX=$1
+ d=`mktemp -d -t ${PREFIX}.XXXXXX`
+ if test $? -ne 0; then
+ d=${TMPDIR}/${PREFIX}.$$
+ mkdir "$d" || exit 1
+ fi
+ trap "test -e \"$d\" && rm -rf \"$d\"" 1 15 2
+ echo "$d"
+}