diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-08-21 14:23:38 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-08-21 14:42:42 +0200 |
commit | 0fe3ec96370fa94cd103b0dd64259b5c4a30af90 (patch) | |
tree | f1b450d91c25433b37e91b797e7825f1f1679d9c /tests/resume-dtls.c | |
parent | 6d59fb3a2a01237624d029a84b7fa64b4ed0bb73 (diff) | |
download | gnutls-0fe3ec96370fa94cd103b0dd64259b5c4a30af90.tar.gz |
tests: corrected resumption tests to disable tickets when needed
That is, perform the tests that require no tickets, with tickets disabled.
Diffstat (limited to 'tests/resume-dtls.c')
-rw-r--r-- | tests/resume-dtls.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/resume-dtls.c b/tests/resume-dtls.c index 04108c2bfd..be70795f26 100644 --- a/tests/resume-dtls.c +++ b/tests/resume-dtls.c @@ -120,21 +120,22 @@ static void client(int sds[], struct params_res *params) /* Initialize TLS session */ gnutls_init(&session, - GNUTLS_CLIENT | GNUTLS_DATAGRAM | - GNUTLS_NO_EXTENSIONS); + GNUTLS_CLIENT | GNUTLS_DATAGRAM); /* Use default priorities */ - gnutls_priority_set_direct(session, + if (params->enable_session_ticket_client) + gnutls_priority_set_direct(session, "NONE:+VERS-DTLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-DH", NULL); + else + gnutls_priority_set_direct(session, + "NONE:+VERS-DTLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-DH:%NO_TICKETS", + NULL); /* put the anonymous credentials to the current session */ gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred); - if (params->enable_session_ticket_client) - gnutls_session_ticket_enable_client(session); - if (t > 0) { /* if this is not the first time we connect */ gnutls_session_set_data(session, session_data.data, |