summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_aead.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/evp_aead.c')
-rw-r--r--src/lib/libcrypto/evp/evp_aead.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_aead.c b/src/lib/libcrypto/evp/evp_aead.c
index 40471b0022..93d523af7c 100644
--- a/src/lib/libcrypto/evp/evp_aead.c
+++ b/src/lib/libcrypto/evp/evp_aead.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_aead.c,v 1.6 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: evp_aead.c,v 1.7 2022/01/07 21:58:17 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -68,6 +68,22 @@ EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx)
68 ctx->aead = NULL; 68 ctx->aead = NULL;
69} 69}
70 70
71EVP_AEAD_CTX *
72EVP_AEAD_CTX_new(void)
73{
74 return calloc(1, sizeof(EVP_AEAD_CTX));
75}
76
77void
78EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx)
79{
80 if (ctx == NULL)
81 return;
82
83 EVP_AEAD_CTX_cleanup(ctx);
84 free(ctx);
85}
86
71/* check_alias returns 0 if out points within the buffer determined by in 87/* check_alias returns 0 if out points within the buffer determined by in
72 * and in_len and 1 otherwise. 88 * and in_len and 1 otherwise.
73 * 89 *