From c46b386708a48cefaf0507c43c51a954070646c9 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sun, 17 Mar 2019 15:13:24 +0000 Subject: Remove the alert level from the TLSv1.3 alert callback. In TLSv1.3 the alert level is effectively meaningless and the record layer has already checked that it is appropriate. As such, drop it from the alert callback. ok tb@ --- lib/libssl/tls13_internal.h | 5 ++--- lib/libssl/tls13_lib.c | 4 ++-- lib/libssl/tls13_record_layer.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/libssl/tls13_internal.h b/lib/libssl/tls13_internal.h index f3cccc14a67..1fe8f547a15 100644 --- a/lib/libssl/tls13_internal.h +++ b/lib/libssl/tls13_internal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_internal.h,v 1.25 2019/02/28 17:56:43 jsing Exp $ */ +/* $OpenBSD: tls13_internal.h,v 1.26 2019/03/17 15:13:23 jsing Exp $ */ /* * Copyright (c) 2018 Bob Beck * Copyright (c) 2018 Theo Buehler @@ -36,8 +36,7 @@ __BEGIN_HIDDEN_DECLS #define TLS13_IO_WANT_POLLIN -2 #define TLS13_IO_WANT_POLLOUT -3 -typedef void (*tls13_alert_cb)(uint8_t _alert_level, uint8_t _alert_desc, - void *_cb_arg); +typedef void (*tls13_alert_cb)(uint8_t _alert_desc, void *_cb_arg); typedef int (*tls13_post_handshake_cb)(void *_cb_arg); typedef ssize_t (*tls13_read_cb)(void *_buf, size_t _buflen, void *_cb_arg); typedef ssize_t (*tls13_write_cb)(const void *_buf, size_t _buflen, diff --git a/lib/libssl/tls13_lib.c b/lib/libssl/tls13_lib.c index 60fa3729447..81325cd86fe 100644 --- a/lib/libssl/tls13_lib.c +++ b/lib/libssl/tls13_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_lib.c,v 1.10 2019/03/04 16:46:44 millert Exp $ */ +/* $OpenBSD: tls13_lib.c,v 1.11 2019/03/17 15:13:23 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -62,7 +62,7 @@ tls13_cipher_hash(const SSL_CIPHER *cipher) } static void -tls13_alert_received_cb(uint8_t alert_level, uint8_t alert_desc, void *arg) +tls13_alert_received_cb(uint8_t alert_desc, void *arg) { struct tls13_ctx *ctx = arg; SSL *s = ctx->ssl; diff --git a/lib/libssl/tls13_record_layer.c b/lib/libssl/tls13_record_layer.c index 71ce4a81ae0..66e201fcbca 100644 --- a/lib/libssl/tls13_record_layer.c +++ b/lib/libssl/tls13_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_record_layer.c,v 1.8 2019/02/26 17:38:39 jsing Exp $ */ +/* $OpenBSD: tls13_record_layer.c,v 1.9 2019/03/17 15:13:23 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -234,7 +234,7 @@ tls13_record_layer_process_alert(struct tls13_record_layer *rl) return TLS13_IO_FAILURE; } - rl->alert_cb(alert_level, alert_desc, rl->cb_arg); + rl->alert_cb(alert_desc, rl->cb_arg); err: return ret; -- cgit v1.2.3