diff options
| author | jsing <> | 2019-01-21 06:58:44 +0000 |
|---|---|---|
| committer | jsing <> | 2019-01-21 06:58:44 +0000 |
| commit | b1bcddf6ee3a2e8a2de4af976dd700bbb565f7d4 (patch) | |
| tree | 3ab3f3f45daa0fe0d9fd6647639796883adedaef /src/lib/libssl/tls13_internal.h | |
| parent | 3db259d053fdb4d23fe6f54a84a155804891e690 (diff) | |
| download | openbsd-b1bcddf6ee3a2e8a2de4af976dd700bbb565f7d4.tar.gz openbsd-b1bcddf6ee3a2e8a2de4af976dd700bbb565f7d4.tar.bz2 openbsd-b1bcddf6ee3a2e8a2de4af976dd700bbb565f7d4.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.h | 15 |
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, | |||
| 95 | int tls13_derive_application_secrets(struct tls13_secrets *secrets, | 95 | int tls13_derive_application_secrets(struct tls13_secrets *secrets, |
| 96 | const struct tls13_secret *context); | 96 | const struct tls13_secret *context); |
| 97 | 97 | ||
| 98 | struct 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, | |||
| 139 | int tls13_handshake_msg_send(struct tls13_handshake_msg *msg, | 137 | int tls13_handshake_msg_send(struct tls13_handshake_msg *msg, |
| 140 | struct tls13_record_layer *rl); | 138 | struct tls13_record_layer *rl); |
| 141 | 139 | ||
| 140 | struct tls13_handshake_stage { | ||
| 141 | uint8_t hs_type; | ||
| 142 | uint8_t message_number; | ||
| 143 | }; | ||
| 144 | |||
| 145 | struct 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 | * |
