summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_internal.h
diff options
context:
space:
mode:
authorjsing <>2019-01-20 12:27:34 +0000
committerjsing <>2019-01-20 12:27:34 +0000
commitaeeeeb391d5e90f65ff75b386123ce886b4af8ee (patch)
tree9054e9c1118082810aad468b78284ac211daca04 /src/lib/libssl/tls13_internal.h
parent7d4c5df49f29866dec345d1ed3420715c776e9e1 (diff)
downloadopenbsd-aeeeeb391d5e90f65ff75b386123ce886b4af8ee.tar.gz
openbsd-aeeeeb391d5e90f65ff75b386123ce886b4af8ee.tar.bz2
openbsd-aeeeeb391d5e90f65ff75b386123ce886b4af8ee.zip
Provide a handshake message handling implementation for TLS 1.3.
It receives handshake messages by reading and parsing data from the record layer. It also provides support for building and sending handshake messages. ok tb@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/tls13_internal.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h
index 496627c0cd..6b85cfdab9 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.9 2019/01/20 10:31:54 jsing Exp $ */ 1/* $OpenBSD: tls13_internal.h,v 1.10 2019/01/20 12:27:34 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>
@@ -97,6 +97,9 @@ int tls13_derive_application_secrets(struct tls13_secrets *secrets,
97 97
98struct tls13_ctx; 98struct tls13_ctx;
99 99
100/*
101 * Record Layer.
102 */
100struct tls13_record_layer; 103struct tls13_record_layer;
101 104
102struct tls13_record_layer *tls13_record_layer_new(tls13_read_cb wire_read, 105struct tls13_record_layer *tls13_record_layer_new(tls13_read_cb wire_read,
@@ -119,7 +122,25 @@ ssize_t tls13_write_application_data(struct tls13_record_layer *rl, const uint8_
119 size_t n); 122 size_t n);
120 123
121/* 124/*
122 * RFC 8446, Section B.3 125 * Handshake Messages.
126 */
127struct tls13_handshake_msg;
128
129struct tls13_handshake_msg *tls13_handshake_msg_new(void);
130void tls13_handshake_msg_free(struct tls13_handshake_msg *msg);
131void tls13_handshake_msg_data(struct tls13_handshake_msg *msg, CBS *cbs);
132uint8_t tls13_handshake_msg_type(struct tls13_handshake_msg *msg);
133int tls13_handshake_msg_content(struct tls13_handshake_msg *msg, CBS *cbs);
134int tls13_handshake_msg_start(struct tls13_handshake_msg *msg, CBB *body,
135 uint8_t msg_type);
136int tls13_handshake_msg_finish(struct tls13_handshake_msg *msg);
137int tls13_handshake_msg_recv(struct tls13_handshake_msg *msg,
138 struct tls13_record_layer *rl);
139int tls13_handshake_msg_send(struct tls13_handshake_msg *msg,
140 struct tls13_record_layer *rl);
141
142/*
143 * Message Types - RFC 8446, Section B.3.
123 * 144 *
124 * Values listed as "_RESERVED" were used in previous versions of TLS and are 145 * Values listed as "_RESERVED" were used in previous versions of TLS and are
125 * listed here for completeness. TLS 1.3 implementations MUST NOT send them but 146 * listed here for completeness. TLS 1.3 implementations MUST NOT send them but