diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-09-09 03:32:30 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-09-09 03:32:30 +0000 |
commit | 6282c82e6d289a6329fcf73dc109819bbc24d91e (patch) | |
tree | 14ff47f46bf70b425d3f8c000b92d91e3946d823 /lib/libssl | |
parent | 2886bceaff2e07c44cc90371b924a73e2b189a05 (diff) |
Add and use tls13_record_layer_alert_sent()
This is a small refactoring that wraps a direct call to the record layer's
alert_sent() callback into a handler for upcoming reuse in the QUIC code.
No functional change.
ok jsing
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/tls13_internal.h | 4 | ||||
-rw-r--r-- | lib/libssl/tls13_record_layer.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/libssl/tls13_internal.h b/lib/libssl/tls13_internal.h index 75d31fb2ade..0819e933384 100644 --- a/lib/libssl/tls13_internal.h +++ b/lib/libssl/tls13_internal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_internal.h,v 1.103 2024/01/27 14:31:01 jsing Exp $ */ +/* $OpenBSD: tls13_internal.h,v 1.104 2024/09/09 03:32:29 tb Exp $ */ /* * Copyright (c) 2018 Bob Beck <beck@openbsd.org> * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> @@ -210,6 +210,8 @@ void tls13_record_layer_set_hash(struct tls13_record_layer *rl, void tls13_record_layer_set_legacy_version(struct tls13_record_layer *rl, uint16_t version); void tls13_record_layer_set_retry_after_phh(struct tls13_record_layer *rl, int retry); +void tls13_record_layer_alert_sent(struct tls13_record_layer *rl, + uint8_t alert_level, uint8_t alert_desc); void tls13_record_layer_handshake_completed(struct tls13_record_layer *rl); int tls13_record_layer_set_read_traffic_key(struct tls13_record_layer *rl, struct tls13_secret *read_key, enum ssl_encryption_level_t read_level); diff --git a/lib/libssl/tls13_record_layer.c b/lib/libssl/tls13_record_layer.c index 5432744cd73..f5604adbeb8 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.73 2024/01/27 14:23:51 jsing Exp $ */ +/* $OpenBSD: tls13_record_layer.c,v 1.74 2024/09/09 03:32:29 tb Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> * @@ -332,6 +332,13 @@ tls13_record_layer_process_alert(struct tls13_record_layer *rl) return ret; } +void +tls13_record_layer_alert_sent(struct tls13_record_layer *rl, + uint8_t alert_level, uint8_t alert_desc) +{ + rl->cb.alert_sent(alert_level, alert_desc, rl->cb_arg); +} + static ssize_t tls13_record_layer_send_alert(struct tls13_record_layer *rl) { @@ -361,7 +368,7 @@ tls13_record_layer_send_alert(struct tls13_record_layer *rl) ret = TLS13_IO_ALERT; } - rl->cb.alert_sent(rl->alert_level, rl->alert_desc, rl->cb_arg); + tls13_record_layer_alert_sent(rl, rl->alert_level, rl->alert_desc); return ret; } |