summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2019-03-17 15:13:23 +0000
committerjsing <>2019-03-17 15:13:23 +0000
commit053bde557c5f57a91664558a9e44f1368c444de5 (patch)
tree18e703669702d4597d0c1cd1ae14e0b0d203bcef /src
parenta8451e4ce9acd74a5da3bf7e569a617a26cf3a25 (diff)
downloadopenbsd-053bde557c5f57a91664558a9e44f1368c444de5.tar.gz
openbsd-053bde557c5f57a91664558a9e44f1368c444de5.tar.bz2
openbsd-053bde557c5f57a91664558a9e44f1368c444de5.zip
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@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/tls13_internal.h5
-rw-r--r--src/lib/libssl/tls13_lib.c4
-rw-r--r--src/lib/libssl/tls13_record_layer.c4
3 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h
index f3cccc14a6..1fe8f547a1 100644
--- a/src/lib/libssl/tls13_internal.h
+++ b/src/lib/libssl/tls13_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_internal.h,v 1.25 2019/02/28 17:56:43 jsing Exp $ */ 1/* $OpenBSD: tls13_internal.h,v 1.26 2019/03/17 15:13:23 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2018 Bob Beck <beck@openbsd.org>
4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
@@ -36,8 +36,7 @@ __BEGIN_HIDDEN_DECLS
36#define TLS13_IO_WANT_POLLIN -2 36#define TLS13_IO_WANT_POLLIN -2
37#define TLS13_IO_WANT_POLLOUT -3 37#define TLS13_IO_WANT_POLLOUT -3
38 38
39typedef void (*tls13_alert_cb)(uint8_t _alert_level, uint8_t _alert_desc, 39typedef void (*tls13_alert_cb)(uint8_t _alert_desc, void *_cb_arg);
40 void *_cb_arg);
41typedef int (*tls13_post_handshake_cb)(void *_cb_arg); 40typedef int (*tls13_post_handshake_cb)(void *_cb_arg);
42typedef ssize_t (*tls13_read_cb)(void *_buf, size_t _buflen, void *_cb_arg); 41typedef ssize_t (*tls13_read_cb)(void *_buf, size_t _buflen, void *_cb_arg);
43typedef ssize_t (*tls13_write_cb)(const void *_buf, size_t _buflen, 42typedef ssize_t (*tls13_write_cb)(const void *_buf, size_t _buflen,
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c
index 60fa372944..81325cd86f 100644
--- a/src/lib/libssl/tls13_lib.c
+++ b/src/lib/libssl/tls13_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_lib.c,v 1.10 2019/03/04 16:46:44 millert Exp $ */ 1/* $OpenBSD: tls13_lib.c,v 1.11 2019/03/17 15:13:23 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -62,7 +62,7 @@ tls13_cipher_hash(const SSL_CIPHER *cipher)
62} 62}
63 63
64static void 64static void
65tls13_alert_received_cb(uint8_t alert_level, uint8_t alert_desc, void *arg) 65tls13_alert_received_cb(uint8_t alert_desc, void *arg)
66{ 66{
67 struct tls13_ctx *ctx = arg; 67 struct tls13_ctx *ctx = arg;
68 SSL *s = ctx->ssl; 68 SSL *s = ctx->ssl;
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c
index 71ce4a81ae..66e201fcbc 100644
--- a/src/lib/libssl/tls13_record_layer.c
+++ b/src/lib/libssl/tls13_record_layer.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_record_layer.c,v 1.8 2019/02/26 17:38:39 jsing Exp $ */ 1/* $OpenBSD: tls13_record_layer.c,v 1.9 2019/03/17 15:13:23 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -234,7 +234,7 @@ tls13_record_layer_process_alert(struct tls13_record_layer *rl)
234 return TLS13_IO_FAILURE; 234 return TLS13_IO_FAILURE;
235 } 235 }
236 236
237 rl->alert_cb(alert_level, alert_desc, rl->cb_arg); 237 rl->alert_cb(alert_desc, rl->cb_arg);
238 238
239 err: 239 err:
240 return ret; 240 return ret;