From f1c776fd7c85f9ca438c7d0985924f571c4272ce Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 16 Sep 2020 17:15:01 +0000 Subject: Group seal record functions together. No functional change. --- src/lib/libssl/tls12_record_layer.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/lib') 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 @@ -/* $OpenBSD: tls12_record_layer.c,v 1.3 2020/09/15 16:07:17 jsing Exp $ */ +/* $OpenBSD: tls12_record_layer.c,v 1.4 2020/09/16 17:15:01 jsing Exp $ */ /* * Copyright (c) 2020 Joel Sing * @@ -284,16 +284,6 @@ tls12_record_layer_write_mac(struct tls12_record_layer *rl, CBB *cbb, SSL3_SEQUENCE_SIZE, content_type, content, content_len, out_len); } -static int -tls12_record_layer_seal_record_plaintext(struct tls12_record_layer *rl, - uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) -{ - if (rl->write_aead_ctx != NULL || rl->write_cipher_ctx != NULL) - return 0; - - return CBB_add_bytes(out, content, content_len); -} - static int tls12_record_layer_aead_concat_nonce(struct tls12_record_layer *rl, const SSL_AEAD_CTX *aead, uint8_t *seq_num, uint8_t **out, size_t *out_len) @@ -366,6 +356,16 @@ tls12_record_layer_aead_xored_nonce(struct tls12_record_layer *rl, return 0; } +static int +tls12_record_layer_seal_record_plaintext(struct tls12_record_layer *rl, + uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) +{ + if (rl->write_aead_ctx != NULL || rl->write_cipher_ctx != NULL) + return 0; + + return CBB_add_bytes(out, content, content_len); +} + static int tls12_record_layer_seal_record_protected_aead(struct tls12_record_layer *rl, uint8_t content_type, const uint8_t *content, size_t content_len, CBB *out) -- cgit v1.2.3-55-g6feb