diff options
author | Matt Caswell <matt@openssl.org> | 2018-04-04 14:17:10 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-04-17 16:51:03 +0100 |
commit | c2c1d8a495d540e0b1b61f20c2c14f0c7ab7a8f0 (patch) | |
tree | 8950112ff841eea82340eb0bb8c9899a79d99367 /ssl | |
parent | ded4a83d31f8271e5a74e6fbf357f9975d4878ec (diff) |
Call the info callback on all handshake done events
Fixes #5721
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5874)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/statem/statem_lib.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 44c9c2c856..a17dec9dcb 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1033,6 +1033,10 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) && s->post_handshake_auth == SSL_PHA_REQUESTED) s->post_handshake_auth = SSL_PHA_EXT_SENT; + /* + * Only set if there was a Finished message and this isn't after a TLSv1.3 + * post handshake exchange + */ if (s->statem.cleanuphand) { /* skipped if we just sent a HelloRequest */ s->renegotiate = 0; @@ -1069,11 +1073,6 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) &discard, s->session_ctx->lock); } - if (s->info_callback != NULL) - cb = s->info_callback; - else if (s->ctx->info_callback != NULL) - cb = s->ctx->info_callback; - if (cb != NULL) cb(s, SSL_CB_HANDSHAKE_DONE, 1); @@ -1086,6 +1085,14 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) } } + if (s->info_callback != NULL) + cb = s->info_callback; + else if (s->ctx->info_callback != NULL) + cb = s->ctx->info_callback; + + if (cb != NULL) + cb(s, SSL_CB_HANDSHAKE_DONE, 1); + if (!stop) return WORK_FINISHED_CONTINUE; |