summaryrefslogtreecommitdiff
path: root/tests/dhex509self.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2018-03-13 15:46:16 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-03-19 17:19:18 +0100
commit80f182e8c205d3b25fedbc629d71abcd2483739e (patch)
tree4958e8376546928ee63f8181fcf8a0342b399927 /tests/dhex509self.c
parent671826acc0893f05712266a49dac4851c6523bb7 (diff)
downloadgnutls-80f182e8c205d3b25fedbc629d71abcd2483739e.tar.gz
tests: updated for TLS1.3 inclusion
This moves the test to use a specific version or test multiple TLS versions if applicable. Resolves #413 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/dhex509self.c')
-rw-r--r--tests/dhex509self.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/dhex509self.c b/tests/dhex509self.c
index bf5d0b25df..8a21ba097a 100644
--- a/tests/dhex509self.c
+++ b/tests/dhex509self.c
@@ -99,7 +99,7 @@ static void client(int sd)
gnutls_init(&session, GNUTLS_CLIENT);
/* Use default priorities */
- gnutls_priority_set_direct(session, "NORMAL:-KX-ALL:+DHE-RSA", NULL);
+ gnutls_priority_set_direct(session, "NORMAL:-VERS-ALL:+VERS-TLS1.2:-KX-ALL:+DHE-RSA", NULL);
/* put the x509 credentials to the current session
*/
@@ -217,7 +217,7 @@ static gnutls_session_t initialize_tls_session(void)
/* avoid calling all the priority functions, since the defaults
* are adequate.
*/
- gnutls_priority_set_direct(session, "NORMAL:-KX-ALL:+DHE-RSA", NULL);
+ gnutls_priority_set_direct(session, "NORMAL:-VERS-ALL:+VERS-TLS1.2:-KX-ALL:+DHE-RSA", NULL);
gnutls_handshake_set_timeout(session, 20 * 1000);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);
@@ -385,8 +385,11 @@ void doit(void)
server(sockets[0]);
wait(&status);
- } else
+ check_wait_status(status);
+ } else {
client(sockets[1]);
+ exit(0);
+ }
}
#endif /* _WIN32 */