diff options
-rw-r--r-- | src/lib/libssl/tls12_record_layer.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libssl/tls12_record_layer.c b/src/lib/libssl/tls12_record_layer.c index 1984e177bd..10d0f1194b 100644 --- a/src/lib/libssl/tls12_record_layer.c +++ b/src/lib/libssl/tls12_record_layer.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls12_record_layer.c,v 1.3 2020/09/15 16:07:17 jsing Exp $ */ | 1 | /* $OpenBSD: tls12_record_layer.c,v 1.4 2020/09/16 17:15:01 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -285,16 +285,6 @@ tls12_record_layer_write_mac(struct tls12_record_layer *rl, CBB *cbb, | |||
285 | } | 285 | } |
286 | 286 | ||
287 | static int | 287 | static int |
288 | tls12_record_layer_seal_record_plaintext(struct tls12_record_layer *rl, | ||
289 | uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) | ||
290 | { | ||
291 | if (rl->write_aead_ctx != NULL || rl->write_cipher_ctx != NULL) | ||
292 | return 0; | ||
293 | |||
294 | return CBB_add_bytes(out, content, content_len); | ||
295 | } | ||
296 | |||
297 | static int | ||
298 | tls12_record_layer_aead_concat_nonce(struct tls12_record_layer *rl, | 288 | tls12_record_layer_aead_concat_nonce(struct tls12_record_layer *rl, |
299 | const SSL_AEAD_CTX *aead, uint8_t *seq_num, uint8_t **out, size_t *out_len) | 289 | const SSL_AEAD_CTX *aead, uint8_t *seq_num, uint8_t **out, size_t *out_len) |
300 | { | 290 | { |
@@ -367,6 +357,16 @@ tls12_record_layer_aead_xored_nonce(struct tls12_record_layer *rl, | |||
367 | } | 357 | } |
368 | 358 | ||
369 | static int | 359 | static int |
360 | tls12_record_layer_seal_record_plaintext(struct tls12_record_layer *rl, | ||
361 | uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) | ||
362 | { | ||
363 | if (rl->write_aead_ctx != NULL || rl->write_cipher_ctx != NULL) | ||
364 | return 0; | ||
365 | |||
366 | return CBB_add_bytes(out, content, content_len); | ||
367 | } | ||
368 | |||
369 | static int | ||
370 | tls12_record_layer_seal_record_protected_aead(struct tls12_record_layer *rl, | 370 | tls12_record_layer_seal_record_protected_aead(struct tls12_record_layer *rl, |
371 | uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) | 371 | uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) |
372 | { | 372 | { |