FreeBSD Bugzilla – Attachment 198020 Details for
Bug 232133
mail/libdomainkeys: Fix OpenSSL Build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix OpenSSL 1.1.x build
libdomainkeys (text/plain), 5.89 KB, created by
Nathan
on 2018-10-10 23:21:00 UTC
(
hide
)
Description:
Fix OpenSSL 1.1.x build
Filename:
MIME Type:
Creator:
Nathan
Created:
2018-10-10 23:21:00 UTC
Size:
5.89 KB
patch
obsolete
>Index: mail/libdomainkeys/Makefile >=================================================================== >--- mail/libdomainkeys/Makefile (revision 481687) >+++ mail/libdomainkeys/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= libdomainkeys > PORTVERSION= 0.69 >+PORTREVISION= 1 > CATEGORIES= mail > MASTER_SITES= SF/domainkeys/${PORTNAME}/${PORTVERSION} > >Index: mail/libdomainkeys/files/patch-domainkeys.c >=================================================================== >--- mail/libdomainkeys/files/patch-domainkeys.c (nonexistent) >+++ mail/libdomainkeys/files/patch-domainkeys.c (working copy) >@@ -0,0 +1,148 @@ >+--- domainkeys.c.orig 2008-03-31 22:50:39 UTC >++++ domainkeys.c >+@@ -25,6 +25,7 @@ extern char *dns_text(char *); >+ * Agreement: http://domainkeys.sourceforge.net/license/softwarelicense1-0.html >+ */ >+ #include <openssl/evp.h> >++#include <openssl/opensslv.h> >+ #include <openssl/pem.h> >+ #include <openssl/err.h> >+ >+@@ -120,7 +121,7 @@ typedef struct >+ { >+ /* STARTPRIV */ >+ int dkmarker; /* in case somebody casts in */ >+- EVP_MD_CTX mdctx; /* the hash */ >++ EVP_MD_CTX *mdctx; /* the hash */ >+ int signing; /* our current signing/verifying state */ >+ int in_headers; /* true if we're still processing headers */ >+ char *header; /* points to a malloc'ed block for header. */ >+@@ -188,7 +189,6 @@ char* dk_strdup(const char* s) >+ } >+ return new; >+ } >+- >+ /* HEADER */ >+ /* returns the source file from which an error was returned. */ >+ char * dk_errfile(DK *dk) >+@@ -503,7 +503,7 @@ DK *dk_sign(DK_LIB *dklib, DK_STAT *statp, int canon) >+ return NULL; >+ } >+ dk->canon = canon; /* TC13-simple, TC13-nofws */ >+- EVP_SignInit(&dk->mdctx, dklib->md); >++ EVP_SignInit(dk->mdctx, dklib->md); >+ >+ if (statp) >+ { >+@@ -541,7 +541,7 @@ DK *dk_verify(DK_LIB *dklib, DK_STAT *statp) >+ } >+ return NULL; >+ } >+- EVP_VerifyInit(&dk->mdctx, dklib->md); >++ EVP_VerifyInit(dk->mdctx, dklib->md); >+ >+ if (statp) >+ { >+@@ -877,7 +877,7 @@ Should ONLY be called when >+ dk->signing == DK_SIGNING_SIGN||DK_SIGNING_VERIFY >+ otherwise its pointless >+ */ >+-static void dkhash(DK *dk, const unsigned char *ptr) >++static void dkhash(DK *dk, char *ptr) >+ { >+ #ifdef DK_DEBUG >+ if ((dk->signing != DK_SIGNING_SIGN)&&(dk->signing != DK_SIGNING_VERIFY)) >+@@ -935,7 +935,7 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ dk->hash_buff[dk->hash_buff_len++] = '\n'; >+ if (dk->hash_buff_len >= (DK_BLOCK - 1)) >+ { >+- EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >+ dk->hash_buff_len = 0; >+ } >+ /* buffer hack */ >+@@ -961,7 +961,7 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ dk->hash_buff[dk->hash_buff_len++] = '\r'; >+ if (dk->hash_buff_len >= (DK_BLOCK - 1)) >+ { >+- EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >+ dk->hash_buff_len = 0; >+ } >+ /* buffer hack */ >+@@ -983,7 +983,7 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ dk->hash_buff[dk->hash_buff_len++] = *ptr; >+ if (dk->hash_buff_len >= (DK_BLOCK - 1)) >+ { >+- EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >+ dk->hash_buff_len = 0; >+ } >+ /* buffer hack */ >+@@ -1008,7 +1008,7 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ */ >+ static DK_STAT dkheaders_header(DK *dk) >+ { >+- char *header_line_start,*header_label_end; >++ int *header_line_start,*header_label_end; >+ char header_list[1024]; >+ char header_label[1024]; >+ >+@@ -1074,7 +1074,7 @@ static DK_STAT dkheaders_header(DK *dk) >+ continue; >+ } >+ } >+- dkhash(dk,&header_line_start[0]); >++ dkhash(dk,header_line_start[0]); >+ ++header_line_start; >+ } >+ dkhash(dk, "\r"); >+@@ -1746,7 +1746,7 @@ DK_STAT dk_end(DK *dk, DK_FLAGS *dkf) >+ //clean out hash buffer >+ dk->hash_buff[dk->hash_buff_len++] = '\r'; >+ dk->hash_buff[dk->hash_buff_len++] = '\n'; >+- EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >+ dk->hash_buff_len = 0; >+ #else >+ EVP_DigestUpdate(&dk->mdctx, "\r\n", 2); >+@@ -1949,7 +1949,7 @@ DK_STAT dk_end(DK *dk, DK_FLAGS *dkf) >+ } >+ >+ /* using that key, verify that the digest is properly signed */ >+- i = EVP_VerifyFinal(&dk->mdctx, md_value, md_len, publickey); >++ i = EVP_VerifyFinal(dk->mdctx, md_value, md_len, publickey); >+ >+ if (i > 0) >+ { >+@@ -2058,7 +2058,7 @@ DK_STAT dk_getsig(DK *dk, void *privatekey, unsigned c >+ >+ siglen = EVP_PKEY_size(pkey); >+ sig = (unsigned char*) OPENSSL_malloc(siglen); >+- EVP_SignFinal(&dk->mdctx, sig, &siglen, pkey); >++ EVP_SignFinal(dk->mdctx, sig, &siglen, pkey); >+ EVP_PKEY_free(pkey); >+ >+ bio = BIO_new(BIO_s_mem()); >+@@ -2152,14 +2152,20 @@ DK_STAT dk_free(DK *dk, int doClearErrState) >+ #ifdef DK_HASH_BUFF >+ DK_MFREE(dk->hash_buff); >+ #endif >+- EVP_MD_CTX_cleanup(&dk->mdctx); >++#ifdef HAVE_EVP_MD_CTX_FREE >++ EVP_MD_CTX_free(dk->mdctx); >++#else >++ EVP_MD_CTX_destroy(dk->mdctx); >++#endif >+ DK_MFREE(dk->header); /* alloc'ing dk->header is not optional. */ >+ dk->dkmarker = ~DKMARK; >+ DK_MFREE(dk); >+ >+ if (doClearErrState) >+ { >++#ifdef HAVE_ERR_REMOVE_STATE >+ ERR_remove_state(0); >++#endif >+ } >+ return DK_STAT_OK; >+ } > >Property changes on: mail/libdomainkeys/files/patch-domainkeys.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
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 232133
:
197982
|
198020
|
198062
|
198064
|
198073
|
198085