summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls_internal.h
diff options
context:
space:
mode:
authorjsing <>2022-07-24 14:28:16 +0000
committerjsing <>2022-07-24 14:28:16 +0000
commitf7f7655b1951f8dd9a8166cb6203a780f911d0bc (patch)
treef814f798e3d47e53e29dfd4db0eece8481fc97ad /src/lib/libssl/tls_internal.h
parentc804d574e337158da589e90dc9cbb13d6ffde44f (diff)
downloadopenbsd-f7f7655b1951f8dd9a8166cb6203a780f911d0bc.tar.gz
openbsd-f7f7655b1951f8dd9a8166cb6203a780f911d0bc.tar.bz2
openbsd-f7f7655b1951f8dd9a8166cb6203a780f911d0bc.zip
Provide record layer callbacks for QUIC.
QUIC uses TLS to complete the handshake, however unlike normal TLS it does not use the TLS record layer, rather it provides its own transport. This means that we need to intercept all communication between the TLS handshake and the record layer. This allows TLS handshake message writes to be directed to QUIC, likewise for TLS handshake message reads. Alerts also need to be sent via QUIC, plus it needs to be provided with the traffic keys that are derived by TLS. ok tb@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/tls_internal.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/libssl/tls_internal.h b/src/lib/libssl/tls_internal.h
index 88dae9e67e..1d3a8133cd 100644
--- a/src/lib/libssl/tls_internal.h
+++ b/src/lib/libssl/tls_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_internal.h,v 1.8 2022/07/22 19:33:53 jsing Exp $ */ 1/* $OpenBSD: tls_internal.h,v 1.9 2022/07/24 14:28:16 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019, 2021 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019, 2021 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -33,6 +33,10 @@ __BEGIN_HIDDEN_DECLS
33#define TLS_IO_WANT_POLLOUT -4 33#define TLS_IO_WANT_POLLOUT -4
34#define TLS_IO_WANT_RETRY -5 /* Retry the previous call immediately. */ 34#define TLS_IO_WANT_RETRY -5 /* Retry the previous call immediately. */
35 35
36enum ssl_encryption_level_t;
37
38struct tls13_secret;
39
36/* 40/*
37 * Callbacks. 41 * Callbacks.
38 */ 42 */
@@ -41,6 +45,14 @@ typedef ssize_t (*tls_write_cb)(const void *_buf, size_t _buflen,
41 void *_cb_arg); 45 void *_cb_arg);
42typedef ssize_t (*tls_flush_cb)(void *_cb_arg); 46typedef ssize_t (*tls_flush_cb)(void *_cb_arg);
43 47
48typedef ssize_t (*tls_handshake_read_cb)(void *_buf, size_t _buflen,
49 void *_cb_arg);
50typedef ssize_t (*tls_handshake_write_cb)(const void *_buf, size_t _buflen,
51 void *_cb_arg);
52typedef int (*tls_traffic_key_cb)(struct tls13_secret *key,
53 enum ssl_encryption_level_t level, void *_cb_arg);
54typedef int (*tls_alert_send_cb)(int _alert_desc, void *_cb_arg);
55
44/* 56/*
45 * Buffers. 57 * Buffers.
46 */ 58 */