X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/bbe76e83735d5fa16a0c7b96abd52eaa8d4de203..a85c067ba6c6940512cf57ec213277a370d87e70:/src/src/pdkim/pdkim.c diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index c368be438..eb26b3864 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -1,9 +1,10 @@ /* * PDKIM - a RFC4871 (DKIM) implementation * + * Copyright (c) The Exim Maintainers 2021 - 2022 * Copyright (C) 2009 - 2016 Tom Kistner * Copyright (C) 2016 - 2020 Jeremy Harris - * Copyright (c) The Exim Maintainers 2021 + * SPDX-License-Identifier: GPL-2.0-or-later * * http://duncanthrax.net/pdkim/ * @@ -1613,7 +1614,7 @@ for (pdkim_signature * sig = ctx->sig; sig; sig = sig->next) rh = pdkim_relax_header(rh, TRUE); /* cook header for relaxed canon */ /* Feed header to the hash algorithm */ - exim_sha_update(&hhash_ctx, CUS rh, Ustrlen(rh)); + exim_sha_update_string(&hhash_ctx, CUS rh); /* Remember headers block for signing (when the library cannot do incremental) */ /*XXX we could avoid doing this for all but the GnuTLS/RSA case */ @@ -1674,7 +1675,7 @@ for (pdkim_signature * sig = ctx->sig; sig; sig = sig->next) : string_copy(CUS hdrs->value); /* Feed header to the hash algorithm */ - exim_sha_update(&hhash_ctx, CUS rh, Ustrlen(rh)); + exim_sha_update_string(&hhash_ctx, CUS rh); DEBUG(D_acl) pdkim_quoteprint(rh, Ustrlen(rh)); hdrs->tag = 1; @@ -1715,7 +1716,7 @@ for (pdkim_signature * sig = ctx->sig; sig; sig = sig->next) } /* Finalize header hash */ - exim_sha_update(&hhash_ctx, CUS sig_hdr, Ustrlen(sig_hdr)); + exim_sha_update_string(&hhash_ctx, CUS sig_hdr); exim_sha_finish(&hhash_ctx, &hhash); DEBUG(D_acl)