summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls12_record_layer.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-09-16 17:15:01 +0000
committerjsing <jsing@openbsd.org>2020-09-16 17:15:01 +0000
commitde70c6e8e38940f66ce4be2447e7d1ceac32a3c4 (patch)
tree13654f2c0f3084db0d157a845236696feaf576d2 /lib/libssl/tls12_record_layer.c
parentAdd cipher set tests with empty SSL_set_ciphersuites(). (diff)
downloadwireguard-openbsd-de70c6e8e38940f66ce4be2447e7d1ceac32a3c4.tar.xz
wireguard-openbsd-de70c6e8e38940f66ce4be2447e7d1ceac32a3c4.zip
Group seal record functions together.
No functional change.
Diffstat (limited to 'lib/libssl/tls12_record_layer.c')
-rw-r--r--lib/libssl/tls12_record_layer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/libssl/tls12_record_layer.c b/lib/libssl/tls12_record_layer.c
index 1984e177bdc..10d0f1194b4 100644
--- a/lib/libssl/tls12_record_layer.c
+++ b/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 <jsing@openbsd.org>
*
@@ -285,16 +285,6 @@ tls12_record_layer_write_mac(struct tls12_record_layer *rl, CBB *cbb,
}
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)
{
@@ -367,6 +357,16 @@ tls12_record_layer_aead_xored_nonce(struct tls12_record_layer *rl,
}
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)
{