diff options
author | tb <> | 2020-01-25 13:11:20 +0000 |
---|---|---|
committer | tb <> | 2020-01-25 13:11:20 +0000 |
commit | 86fa7dbef6291a76e73bd9c163c231b69eadd883 (patch) | |
tree | 48c626b473eedc7776d00eb4f94585206f94d7be /src/lib/libssl/tls13_handshake.c | |
parent | ff4beffa12a4af5188e6f26149972d4f4fa633f7 (diff) | |
download | openbsd-86fa7dbef6291a76e73bd9c163c231b69eadd883.tar.gz openbsd-86fa7dbef6291a76e73bd9c163c231b69eadd883.tar.bz2 openbsd-86fa7dbef6291a76e73bd9c163c231b69eadd883.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 'src/lib/libssl/tls13_handshake.c')
-rw-r--r-- | src/lib/libssl/tls13_handshake.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index ed70ec1f4b..1528bd5e2a 100644 --- a/src/lib/libssl/tls13_handshake.c +++ b/src/lib/libssl/tls13_handshake.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_handshake.c,v 1.45 2020/01/25 06:37:30 beck Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.c,v 1.46 2020/01/25 13:11:20 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> |
4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> |
@@ -363,6 +363,9 @@ tls13_handshake_send_action(struct tls13_ctx *ctx, | |||
363 | return TLS13_IO_FAILURE; | 363 | return TLS13_IO_FAILURE; |
364 | } | 364 | } |
365 | 365 | ||
366 | if (ctx->handshake_message_sent_cb != NULL) | ||
367 | ctx->handshake_message_sent_cb(ctx, &cbs); | ||
368 | |||
366 | tls13_handshake_msg_free(ctx->hs_msg); | 369 | tls13_handshake_msg_free(ctx->hs_msg); |
367 | ctx->hs_msg = NULL; | 370 | ctx->hs_msg = NULL; |
368 | 371 | ||
@@ -399,6 +402,9 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx, | |||
399 | if (!tls1_transcript_record(ctx->ssl, CBS_data(&cbs), CBS_len(&cbs))) | 402 | if (!tls1_transcript_record(ctx->ssl, CBS_data(&cbs), CBS_len(&cbs))) |
400 | return TLS13_IO_FAILURE; | 403 | return TLS13_IO_FAILURE; |
401 | 404 | ||
405 | if (ctx->handshake_message_recv_cb != NULL) | ||
406 | ctx->handshake_message_recv_cb(ctx, &cbs); | ||
407 | |||
402 | /* | 408 | /* |
403 | * In TLSv1.3 there is no way to know if you're going to receive a | 409 | * In TLSv1.3 there is no way to know if you're going to receive a |
404 | * certificate request message or not, hence we have to special case it | 410 | * certificate request message or not, hence we have to special case it |