X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/e3e281ccf9d8777d0df98ddd644720573e0343d1..1d28cc061677bd07d9bed48dd84bd5c590247043:/src/src/pdkim/signing.c diff --git a/src/src/pdkim/signing.c b/src/src/pdkim/signing.c index 561eb6161..07737ab41 100644 --- a/src/src/pdkim/signing.c +++ b/src/src/pdkim/signing.c @@ -1,7 +1,7 @@ /* * PDKIM - a RFC4871 (DKIM) implementation - * - * Copyright (c) The Exim Maintainers 1995 - 2021 + * Copyright (c) The Exim Maintainers 1995 - 2022 + * SPDX-License-Identifier: GPL-2.0-or-later * * signing/verification interface */ @@ -507,7 +507,7 @@ switch (hash) } #define SIGSPACE 128 -sig->data = store_get(SIGSPACE, FALSE); +sig->data = store_get(SIGSPACE, GET_UNTAINTED); if (gcry_mpi_cmp (sign_ctx->p, sign_ctx->q) > 0) { @@ -766,7 +766,7 @@ switch (hash) if ( (ctx = EVP_MD_CTX_new()) && EVP_DigestSignInit(ctx, NULL, md, NULL, sign_ctx->key) > 0 && EVP_DigestSign(ctx, NULL, &siglen, NULL, 0) > 0 - && (sig->data = store_get(siglen, FALSE)) + && (sig->data = store_get(siglen, GET_UNTAINTED)) /* Obtain the signature (slen could change here!) */ && EVP_DigestSign(ctx, sig->data, &siglen, data->data, data->len) > 0 @@ -782,7 +782,7 @@ if ( (ctx = EVP_MD_CTX_create()) && EVP_DigestSignInit(ctx, NULL, md, NULL, sign_ctx->key) > 0 && EVP_DigestSignUpdate(ctx, data->data, data->len) > 0 && EVP_DigestSignFinal(ctx, NULL, &siglen) > 0 - && (sig->data = store_get(siglen, FALSE)) + && (sig->data = store_get(siglen, GET_UNTAINTED)) /* Obtain the signature (slen could change here!) */ && EVP_DigestSignFinal(ctx, sig->data, &siglen) > 0