summaryrefslogtreecommitdiffstats
path: root/test/sslapitest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-04-19 16:44:52 +0200
committerMatt Caswell <matt@openssl.org>2018-04-20 12:46:12 +0200
commit033c181ba690ef234812c51d4c6cb7d8dd337cb7 (patch)
tree9cb2ab43689ccf57fe8ad73128936bc01712b60f /test/sslapitest.c
parentMake sure SSL_in_init() returns 0 at SSL_CB_HANDSHAKE_DONE (diff)
downloadopenssl-033c181ba690ef234812c51d4c6cb7d8dd337cb7.tar.xz
openssl-033c181ba690ef234812c51d4c6cb7d8dd337cb7.zip
Test the state of SSL_in_init() from the info_callback
Check that in a handshake done event SSL_in_init() is 0 (see #4574) Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6019)
Diffstat (limited to 'test/sslapitest.c')
-rw-r--r--test/sslapitest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c
index c4c0868a2b..25230c889e 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -4269,6 +4269,12 @@ static void sslapi_info_callback(const SSL *s, int where, int ret)
info_cb_failed = 1;
return;
}
+
+ /* Check that, if we've got SSL_CB_HANDSHAKE_DONE we are not in init */
+ if ((where & SSL_CB_HANDSHAKE_DONE) && SSL_in_init((SSL *)s) != 0) {
+ info_cb_failed = 1;
+ return;
+ }
}
/*