diff options
author | tb <> | 2022-01-14 09:12:15 +0000 |
---|---|---|
committer | tb <> | 2022-01-14 09:12:15 +0000 |
commit | 1bcac5c126c6b65375ad4d9e9a98d8b7b3398b79 (patch) | |
tree | 1f0b0741a18bee89f4d9dcd32502bbdbb2079dd8 /src/lib/libssl/tls13_record_layer.c | |
parent | 971bbef45c2d6baed8d7955cf82726f084fa8398 (diff) | |
download | openbsd-1bcac5c126c6b65375ad4d9e9a98d8b7b3398b79.tar.gz openbsd-1bcac5c126c6b65375ad4d9e9a98d8b7b3398b79.tar.bz2 openbsd-1bcac5c126c6b65375ad4d9e9a98d8b7b3398b79.zip |
Convert the new record layers to opaque EVP_AEAD_CTX
ok jsing
Diffstat (limited to 'src/lib/libssl/tls13_record_layer.c')
-rw-r--r-- | src/lib/libssl/tls13_record_layer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c index b49d237951..c68ee3b3a5 100644 --- a/src/lib/libssl/tls13_record_layer.c +++ b/src/lib/libssl/tls13_record_layer.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_record_layer.c,v 1.66 2022/01/06 18:18:13 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_record_layer.c,v 1.67 2022/01/14 09:12:15 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -40,10 +40,7 @@ tls13_record_protection_new(void) | |||
40 | void | 40 | void |
41 | tls13_record_protection_clear(struct tls13_record_protection *rp) | 41 | tls13_record_protection_clear(struct tls13_record_protection *rp) |
42 | { | 42 | { |
43 | if (rp->aead_ctx != NULL) { | 43 | EVP_AEAD_CTX_free(rp->aead_ctx); |
44 | EVP_AEAD_CTX_cleanup(rp->aead_ctx); | ||
45 | freezero(rp->aead_ctx, sizeof(*rp->aead_ctx)); | ||
46 | } | ||
47 | 44 | ||
48 | tls13_secret_cleanup(&rp->iv); | 45 | tls13_secret_cleanup(&rp->iv); |
49 | tls13_secret_cleanup(&rp->nonce); | 46 | tls13_secret_cleanup(&rp->nonce); |
@@ -461,7 +458,7 @@ tls13_record_layer_set_traffic_key(const EVP_AEAD *aead, const EVP_MD *hash, | |||
461 | 458 | ||
462 | tls13_record_protection_clear(rp); | 459 | tls13_record_protection_clear(rp); |
463 | 460 | ||
464 | if ((rp->aead_ctx = calloc(1, sizeof(*rp->aead_ctx))) == NULL) | 461 | if ((rp->aead_ctx = EVP_AEAD_CTX_new()) == NULL) |
465 | return 0; | 462 | return 0; |
466 | 463 | ||
467 | if (!tls13_secret_init(&rp->iv, EVP_AEAD_nonce_length(aead))) | 464 | if (!tls13_secret_init(&rp->iv, EVP_AEAD_nonce_length(aead))) |