pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / mail / opendkim / patches / mlfi_body_dont_skip.patch
blob9a7178a8d23ca08763820a99d92546e7d9a7d9f1
1 commit 90a4ea2af4669eeaef945b13319f7a9c03855aac
2 Author: Dilian Wesselinov Palauzov <git-dpa@aegee.org>
3 Date: Wed May 16 11:16:08 2018 +0000
5 opendkim/opendkim.c:mlfi_body: don't SMFIS_SKIP a big message, that doesn't need verification, but need signing
7 sendmail sends bodies to libmilter in chunks of 64k.
9 When opendkim is supposed simulateneously to verify the signature
10 of an email and to sign it, the body is >64k, the email has no signature yet,
11 that can be verified, opendkim shall not send SMFIS_SKIP, hence ingoring the
12 remaining chunks of the message, as opendkim needs the remaining chunks for
13 correct signing of the message.
15 diff --git a/opendkim/opendkim.c b/opendkim/opendkim.c
16 index eaf8c9e6..3c16da07 100644
17 --- a/opendkim/opendkim.c
18 +++ b/opendkim/opendkim.c
19 @@ -13138,13 +13138,10 @@ mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t bodylen)
20 return dkimf_libstatus(ctx, last, "dkim_body()", status);
22 #ifdef SMFIS_SKIP
23 - if (dfc->mctx_srhead != NULL && cc->cctx_milterv2 &&
24 - dkimf_msr_minbody(dfc->mctx_srhead) == 0)
25 - return SMFIS_SKIP;
27 - if (dfc->mctx_dkimv != NULL && cc->cctx_milterv2 &&
28 - dkim_minbody(dfc->mctx_dkimv) == 0)
29 - return SMFIS_SKIP;
30 + if (cc->cctx_milterv2 &&
31 + (dfc->mctx_srhead == NULL || dkimf_msr_minbody(dfc->mctx_srhead) == 0) &&
32 + (dfc->mctx_dkimv == NULL || dkim_minbody(dfc->mctx_dkimv) == 0))
33 + return SMFIS_SKIP;
34 #endif /* SMFIS_SKIP */
36 return SMFIS_CONTINUE;