diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/tls12_record_layer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libssl/tls12_record_layer.c b/src/lib/libssl/tls12_record_layer.c index 0020b5ee1f..ee8552a9ca 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.22 2021/03/02 17:24:37 jsing Exp $ */ | 1 | /* $OpenBSD: tls12_record_layer.c,v 1.23 2021/03/02 17:26:25 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -368,7 +368,7 @@ tls12_record_layer_ccs_aead(struct tls12_record_layer *rl, | |||
| 368 | size_t mac_key_len, const uint8_t *key, size_t key_len, const uint8_t *iv, | 368 | size_t mac_key_len, const uint8_t *key, size_t key_len, const uint8_t *iv, |
| 369 | size_t iv_len) | 369 | size_t iv_len) |
| 370 | { | 370 | { |
| 371 | size_t aead_nonce_len = EVP_AEAD_nonce_length(rl->aead); | 371 | size_t aead_nonce_len; |
| 372 | 372 | ||
| 373 | if (!tls12_record_protection_unused(rp)) | 373 | if (!tls12_record_protection_unused(rp)) |
| 374 | return 0; | 374 | return 0; |
| @@ -393,6 +393,8 @@ tls12_record_layer_ccs_aead(struct tls12_record_layer *rl, | |||
| 393 | rp->aead_ctx->tag_len = EVP_AEAD_max_overhead(rl->aead); | 393 | rp->aead_ctx->tag_len = EVP_AEAD_max_overhead(rl->aead); |
| 394 | rp->aead_ctx->variable_nonce_len = 8; | 394 | rp->aead_ctx->variable_nonce_len = 8; |
| 395 | 395 | ||
| 396 | aead_nonce_len = EVP_AEAD_nonce_length(rl->aead); | ||
| 397 | |||
| 396 | if (rp->aead_ctx->xor_fixed_nonce) { | 398 | if (rp->aead_ctx->xor_fixed_nonce) { |
| 397 | /* Fixed nonce length must match, variable must not exceed. */ | 399 | /* Fixed nonce length must match, variable must not exceed. */ |
| 398 | if (rp->aead_ctx->fixed_nonce_len != aead_nonce_len) | 400 | if (rp->aead_ctx->fixed_nonce_len != aead_nonce_len) |
