From: Tomas Mraz Date: Tue, 12 Sep 2023 16:54:54 +0000 (+0200) Subject: Revert "implement dupctx for aes_WRAP methods" X-Git-Tag: openssl-3.1.3~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78732d8b21f5ee1dd4f5b017d33f0066804d35fb;p=thirdparty%2Fopenssl.git Revert "implement dupctx for aes_WRAP methods" This reverts commit 819ae76bb76540a4321e548851e23099ddf71e8e. Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22081) --- diff --git a/providers/implementations/ciphers/cipher_aes_wrp.c b/providers/implementations/ciphers/cipher_aes_wrp.c index 945bdc5a183..8bddf475e24 100644 --- a/providers/implementations/ciphers/cipher_aes_wrp.c +++ b/providers/implementations/ciphers/cipher_aes_wrp.c @@ -66,26 +66,6 @@ static void *aes_wrap_newctx(size_t kbits, size_t blkbits, return wctx; } -static void *aes_wrap_dupctx(void *wctx) -{ - PROV_AES_WRAP_CTX *ctx = wctx; - PROV_AES_WRAP_CTX *dctx = wctx; - - if (ctx == NULL) - return NULL; - dctx = OPENSSL_memdup(ctx, sizeof(*ctx)); - - if (dctx != NULL && dctx->base.tlsmac != NULL && dctx->base.alloced) { - dctx->base.tlsmac = OPENSSL_memdup(dctx->base.tlsmac, - dctx->base.tlsmacsize); - if (dctx->base.tlsmac == NULL) { - OPENSSL_free(dctx); - dctx = NULL; - } - } - return dctx; -} - static void aes_wrap_freectx(void *vctx) { PROV_AES_WRAP_CTX *wctx = (PROV_AES_WRAP_CTX *)vctx; @@ -301,7 +281,6 @@ static int aes_wrap_set_ctx_params(void *vctx, const OSSL_PARAM params[]) { OSSL_FUNC_CIPHER_UPDATE, (void (*)(void))aes_##mode##_cipher }, \ { OSSL_FUNC_CIPHER_FINAL, (void (*)(void))aes_##mode##_final }, \ { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))aes_##mode##_freectx }, \ - { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))aes_##mode##_dupctx }, \ { OSSL_FUNC_CIPHER_GET_PARAMS, \ (void (*)(void))aes_##kbits##_##fname##_get_params }, \ { OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \