FreeBSD Bugzilla – Attachment 200610 Details for
Bug 228940
mail/spamassassin: Fails to build with OpenSSL 1.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for openssl 1.1.1
sync.c.diff (text/plain), 3.73 KB, created by
Leonard Rucker
on 2018-12-29 17:46:38 UTC
(
hide
)
Description:
patch for openssl 1.1.1
Filename:
MIME Type:
Creator:
Leonard Rucker
Created:
2018-12-29 17:46:38 UTC
Size:
3.73 KB
patch
obsolete
>--- sync.c.orig 2010-04-24 03:33:47.000000000 -0700 >+++ sync.c 2018-12-29 08:24:19.079644000 -0800 >@@ -439,7 +439,7 @@ > u_int16_t sglen, fromlen, tolen, helolen, padlen; > char pad[SPAM_ALIGNBYTES]; > int i = 0; >- HMAC_CTX ctx; >+ HMAC_CTX* ctx; > u_int hmac_len; > > if (debug) >@@ -455,8 +455,9 @@ > tolen = strlen(to) + 1; > helolen = strlen(helo) + 1; > >- HMAC_CTX_init(&ctx); >- HMAC_Init(&ctx, sync_key, strlen(sync_key), EVP_sha1()); >+ ctx = HMAC_CTX_new(); >+ HMAC_CTX_reset(ctx); >+ HMAC_Init_ex(ctx, sync_key, strlen(sync_key), EVP_sha1(), NULL); > > sglen = sizeof(sg) + fromlen + tolen + helolen; > padlen = SPAM_ALIGN(sglen) - sglen; >@@ -468,7 +469,7 @@ > hdr.sh_length = htons(sizeof(hdr) + sglen + padlen + sizeof(end)); > iov[i].iov_base = &hdr; > iov[i].iov_len = sizeof(hdr); >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > /* Add single SPAM sync greylisting entry */ >@@ -481,27 +482,27 @@ > sg.sg_helo_length = htons(helolen); > iov[i].iov_base = &sg; > iov[i].iov_len = sizeof(sg); >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > iov[i].iov_base = from; > iov[i].iov_len = fromlen; >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > iov[i].iov_base = to; > iov[i].iov_len = tolen; >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > iov[i].iov_base = helo; > iov[i].iov_len = helolen; >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > iov[i].iov_base = pad; > iov[i].iov_len = padlen; >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > /* Add end marker */ >@@ -509,14 +510,14 @@ > end.st_length = htons(sizeof(end)); > iov[i].iov_base = &end; > iov[i].iov_len = sizeof(end); >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > >- HMAC_Final(&ctx, hdr.sh_hmac, &hmac_len); >+ HMAC_Final(ctx, hdr.sh_hmac, &hmac_len); > > /* Send message to the target hosts */ > sync_send(iov, i); >- HMAC_CTX_cleanup(&ctx); >+ HMAC_CTX_free(ctx); > } > > void >@@ -527,7 +528,7 @@ > struct spam_synctlv_addr sd; > struct spam_synctlv_hdr end; > int i = 0; >- HMAC_CTX ctx; >+ HMAC_CTX* ctx; > u_int hmac_len; > > if (debug) >@@ -537,8 +538,9 @@ > bzero(&hdr, sizeof(hdr)); > bzero(&sd, sizeof(sd)); > >- HMAC_CTX_init(&ctx); >- HMAC_Init(&ctx, sync_key, strlen(sync_key), EVP_sha1()); >+ ctx = HMAC_CTX_new(); >+ HMAC_CTX_reset(ctx); >+ HMAC_Init_ex(ctx, sync_key, strlen(sync_key), EVP_sha1(), NULL); > > /* Add SPAM sync packet header */ > hdr.sh_version = SPAM_SYNC_VERSION; >@@ -547,7 +549,7 @@ > hdr.sh_length = htons(sizeof(hdr) + sizeof(sd) + sizeof(end)); > iov[i].iov_base = &hdr; > iov[i].iov_len = sizeof(hdr); >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > /* Add single SPAM sync address entry */ >@@ -558,7 +560,7 @@ > sd.sd_ip = inet_addr(ip); > iov[i].iov_base = &sd; > iov[i].iov_len = sizeof(sd); >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > > /* Add end marker */ >@@ -566,14 +568,14 @@ > end.st_length = htons(sizeof(end)); > iov[i].iov_base = &end; > iov[i].iov_len = sizeof(end); >- HMAC_Update(&ctx, iov[i].iov_base, iov[i].iov_len); >+ HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len); > i++; > >- HMAC_Final(&ctx, hdr.sh_hmac, &hmac_len); >+ HMAC_Final(ctx, hdr.sh_hmac, &hmac_len); > > /* Send message to the target hosts */ > sync_send(iov, i); >- HMAC_CTX_cleanup(&ctx); >+ HMAC_CTX_free(ctx); > } > > void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228940
: 200610