From 5f8f9e28b0e1a4c703500552e678a4335bca5039 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 7 May 2017 01:58:29 +0000 Subject: Add a test that calls tls_handshake() on a connection that has already completed a TLS handshake. This should return a failure, but currently succeeds (hence the regress currently fails). --- src/regress/lib/libtls/tls/tlstest.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/regress/lib/libtls/tls/tlstest.c b/src/regress/lib/libtls/tls/tlstest.c index 1f75232dd9..21b25701eb 100644 --- a/src/regress/lib/libtls/tls/tlstest.c +++ b/src/regress/lib/libtls/tls/tlstest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tlstest.c,v 1.6 2017/05/07 01:56:24 jsing Exp $ */ +/* $OpenBSD: tlstest.c,v 1.7 2017/05/07 01:58:29 jsing Exp $ */ /* * Copyright (c) 2017 Joel Sing * @@ -396,6 +396,12 @@ do_tls_ordering_tests(void) goto done; } + if (tls_handshake(client) != -1) { + printf("FAIL: TLS handshake succeeded twice\n"); + failure = 1; + goto done; + } + if (do_client_server_close("ordering", client, server_cctx) != 0) { failure = 1; goto done; -- cgit v1.2.3-55-g6feb