summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_internal.h
diff options
context:
space:
mode:
authorjsing <>2019-01-21 06:58:44 +0000
committerjsing <>2019-01-21 06:58:44 +0000
commit549758b49616a2ed2f8e76f1ec804a664cab843e (patch)
tree3ab3f3f45daa0fe0d9fd6647639796883adedaef /src/lib/libssl/tls13_internal.h
parentee45b5205b24ef754b5fddbb35818a8cf22dbe51 (diff)
downloadopenbsd-549758b49616a2ed2f8e76f1ec804a664cab843e.tar.gz
openbsd-549758b49616a2ed2f8e76f1ec804a664cab843e.tar.bz2
openbsd-549758b49616a2ed2f8e76f1ec804a664cab843e.zip
Move struct tls13_ctx into a header since other things need access to it.
While here, rename struct handshake to struct handshake_stage to avoid potential ambiguity/conflict with the handshake data struct. Also add forward and back pointers between SSL and struct tls13_ctx. ok tb@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/tls13_internal.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h
index 6b85cfdab9..bb3ff1fe9c 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.10 2019/01/20 12:27:34 jsing Exp $ */ 1/* $OpenBSD: tls13_internal.h,v 1.11 2019/01/21 06:58:44 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>
@@ -95,8 +95,6 @@ int tls13_derive_handshake_secrets(struct tls13_secrets *secrets,
95int tls13_derive_application_secrets(struct tls13_secrets *secrets, 95int tls13_derive_application_secrets(struct tls13_secrets *secrets,
96 const struct tls13_secret *context); 96 const struct tls13_secret *context);
97 97
98struct tls13_ctx;
99
100/* 98/*
101 * Record Layer. 99 * Record Layer.
102 */ 100 */
@@ -139,6 +137,17 @@ int tls13_handshake_msg_recv(struct tls13_handshake_msg *msg,
139int tls13_handshake_msg_send(struct tls13_handshake_msg *msg, 137int tls13_handshake_msg_send(struct tls13_handshake_msg *msg,
140 struct tls13_record_layer *rl); 138 struct tls13_record_layer *rl);
141 139
140struct tls13_handshake_stage {
141 uint8_t hs_type;
142 uint8_t message_number;
143};
144
145struct tls13_ctx {
146 SSL *ssl;
147 uint8_t mode;
148 struct tls13_handshake_stage handshake_stage;
149};
150
142/* 151/*
143 * Message Types - RFC 8446, Section B.3. 152 * Message Types - RFC 8446, Section B.3.
144 * 153 *