diff options
author | 2020-01-25 13:11:20 +0000 | |
---|---|---|
committer | 2020-01-25 13:11:20 +0000 | |
commit | 6b92931a9aaead96ef757f62c150bafa50900ba6 (patch) | |
tree | 6e58c0a20f164b61eeab76e19713d2a272403cab /lib/libssl/tls13_handshake.c | |
parent | Correct value for SSL_TLSEXT_MSG_HRR. (diff) | |
download | wireguard-openbsd-6b92931a9aaead96ef757f62c150bafa50900ba6.tar.xz wireguard-openbsd-6b92931a9aaead96ef757f62c150bafa50900ba6.zip |
Support legacy message callbacks. First step for SSL_set_msg_callback(3)
support. Makes openssl s_client -msg work for handshake messages.
ok beck jsing
Diffstat (limited to 'lib/libssl/tls13_handshake.c')
-rw-r--r-- | lib/libssl/tls13_handshake.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libssl/tls13_handshake.c b/lib/libssl/tls13_handshake.c index ed70ec1f4b7..1528bd5e2ae 100644 --- a/lib/libssl/tls13_handshake.c +++ b/lib/libssl/tls13_handshake.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_handshake.c,v 1.45 2020/01/25 06:37:30 beck Exp $ */ +/* $OpenBSD: tls13_handshake.c,v 1.46 2020/01/25 13:11:20 tb Exp $ */ /* * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> @@ -363,6 +363,9 @@ tls13_handshake_send_action(struct tls13_ctx *ctx, return TLS13_IO_FAILURE; } + if (ctx->handshake_message_sent_cb != NULL) + ctx->handshake_message_sent_cb(ctx, &cbs); + tls13_handshake_msg_free(ctx->hs_msg); ctx->hs_msg = NULL; @@ -399,6 +402,9 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx, if (!tls1_transcript_record(ctx->ssl, CBS_data(&cbs), CBS_len(&cbs))) return TLS13_IO_FAILURE; + if (ctx->handshake_message_recv_cb != NULL) + ctx->handshake_message_recv_cb(ctx, &cbs); + /* * In TLSv1.3 there is no way to know if you're going to receive a * certificate request message or not, hence we have to special case it |