diff options
author | jsing <> | 2022-11-11 17:15:27 +0000 |
---|---|---|
committer | jsing <> | 2022-11-11 17:15:27 +0000 |
commit | 167103faa44f8407455f11f6599e9919e2b22653 (patch) | |
tree | a8f8e94c51cf1dc74d90e267faf0ad4720537e35 /src/lib/libssl/ssl_locl.h | |
parent | f8749b129444d560b9e645a68ec7b045800243ed (diff) | |
download | openbsd-167103faa44f8407455f11f6599e9919e2b22653.tar.gz openbsd-167103faa44f8407455f11f6599e9919e2b22653.tar.bz2 openbsd-167103faa44f8407455f11f6599e9919e2b22653.zip |
Convert the legacy TLS stack to tls_content.
This converts the legacy TLS stack to tls_content - records are now
opened into a tls_content structure, rather than being written back into
the same buffer that the sealed record was read into.
This will allow for further clean up of the legacy record layer.
ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 69546c0962..8387513d99 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.431 2022/11/10 18:06:37 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.432 2022/11/11 17:15:26 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -162,6 +162,7 @@ | |||
162 | #include <openssl/stack.h> | 162 | #include <openssl/stack.h> |
163 | 163 | ||
164 | #include "bytestring.h" | 164 | #include "bytestring.h" |
165 | #include "tls_content.h" | ||
165 | #include "tls13_internal.h" | 166 | #include "tls13_internal.h" |
166 | 167 | ||
167 | __BEGIN_HIDDEN_DECLS | 168 | __BEGIN_HIDDEN_DECLS |
@@ -706,7 +707,7 @@ int tls12_record_layer_change_read_cipher_state(struct tls12_record_layer *rl, | |||
706 | int tls12_record_layer_change_write_cipher_state(struct tls12_record_layer *rl, | 707 | int tls12_record_layer_change_write_cipher_state(struct tls12_record_layer *rl, |
707 | CBS *mac_key, CBS *key, CBS *iv); | 708 | CBS *mac_key, CBS *key, CBS *iv); |
708 | int tls12_record_layer_open_record(struct tls12_record_layer *rl, | 709 | int tls12_record_layer_open_record(struct tls12_record_layer *rl, |
709 | uint8_t *buf, size_t buf_len, uint8_t **out, size_t *out_len); | 710 | uint8_t *buf, size_t buf_len, struct tls_content *out); |
710 | int tls12_record_layer_seal_record(struct tls12_record_layer *rl, | 711 | int tls12_record_layer_seal_record(struct tls12_record_layer *rl, |
711 | uint8_t content_type, const uint8_t *content, size_t content_len, | 712 | uint8_t content_type, const uint8_t *content, size_t content_len, |
712 | CBB *out); | 713 | CBB *out); |
@@ -1157,6 +1158,10 @@ typedef struct ssl3_state_st { | |||
1157 | SSL3_BUFFER_INTERNAL rbuf; /* read IO goes into here */ | 1158 | SSL3_BUFFER_INTERNAL rbuf; /* read IO goes into here */ |
1158 | SSL3_BUFFER_INTERNAL wbuf; /* write IO goes into here */ | 1159 | SSL3_BUFFER_INTERNAL wbuf; /* write IO goes into here */ |
1159 | 1160 | ||
1161 | SSL3_RECORD_INTERNAL rrec; /* each decoded record goes in here */ | ||
1162 | |||
1163 | struct tls_content *rcontent; /* Content from opened TLS records. */ | ||
1164 | |||
1160 | /* we allow one fatal and one warning alert to be outstanding, | 1165 | /* we allow one fatal and one warning alert to be outstanding, |
1161 | * send close alert via the warning alert */ | 1166 | * send close alert via the warning alert */ |
1162 | int alert_dispatch; | 1167 | int alert_dispatch; |
@@ -1166,8 +1171,6 @@ typedef struct ssl3_state_st { | |||
1166 | int need_empty_fragments; | 1171 | int need_empty_fragments; |
1167 | int empty_fragment_done; | 1172 | int empty_fragment_done; |
1168 | 1173 | ||
1169 | SSL3_RECORD_INTERNAL rrec; /* each decoded record goes in here */ | ||
1170 | |||
1171 | /* Unprocessed Alert/Handshake protocol data. */ | 1174 | /* Unprocessed Alert/Handshake protocol data. */ |
1172 | struct tls_buffer *alert_fragment; | 1175 | struct tls_buffer *alert_fragment; |
1173 | struct tls_buffer *handshake_fragment; | 1176 | struct tls_buffer *handshake_fragment; |