aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/crypto_openssl.c
diff options
context:
space:
mode:
authorArne Schwabe2021-04-06 18:25:17 +0200
committerGert Doering2021-04-07 14:49:11 +0200
commit3fbeeda5cd3cbd0cbb4c039b469685e2a6254daf (patch)
tree45b6890b714111dc2e0f8d4e43ccd2b6eae4c25c /src/openvpn/crypto_openssl.c
parent8af7c6b2d79b63ef5587ef1bc4ec81834905698e (diff)
downloadopenvpn-3fbeeda5cd3cbd0cbb4c039b469685e2a6254daf.zip
openvpn-3fbeeda5cd3cbd0cbb4c039b469685e2a6254daf.tar.gz
Use EVP_CTRL_AEAD_* instead EVP_CTRL_GCM_*
Use the modern names instead of the old GCM specific ones. AEAD instead GCM makes especially sense when using Chacha20-Poly1305. Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Antonio Quartulli <antonio@openvpn.net> Message-Id: <20210406162518.4075-4-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22050.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/crypto_openssl.c')
-rw-r--r--src/openvpn/crypto_openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c
index dc6b0fa..f8b36bf 100644
--- a/src/openvpn/crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c
@@ -792,7 +792,7 @@ cipher_ctx_iv_length(const EVP_CIPHER_CTX *ctx)
int
cipher_ctx_get_tag(EVP_CIPHER_CTX *ctx, uint8_t *tag_buf, int tag_size)
{
- return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, tag_size, tag_buf);
+ return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, tag_size, tag_buf);
}
int
@@ -853,7 +853,7 @@ cipher_ctx_final_check_tag(EVP_CIPHER_CTX *ctx, uint8_t *dst, int *dst_len,
uint8_t *tag, size_t tag_len)
{
ASSERT(tag_len < SIZE_MAX);
- if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag_len, tag))
+ if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, tag))
{
return 0;
}