From 033c181ba690ef234812c51d4c6cb7d8dd337cb7 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 19 Apr 2018 15:44:52 +0100 Subject: [PATCH] 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 (Merged from https://github.com/openssl/openssl/pull/6019) --- test/sslapitest.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; + } } /* -- 2.25.1