FreeBSD Bugzilla – Attachment 198085 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]
libdomainkeys.diff v6
libdomainkeys.diff (text/plain), 6.58 KB, created by
Tobias Kortkamp
on 2018-10-13 04:04:26 UTC
(
hide
)
Description:
libdomainkeys.diff v6
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2018-10-13 04:04:26 UTC
Size:
6.58 KB
patch
obsolete
>Index: mail/libdomainkeys/Makefile >=================================================================== >--- mail/libdomainkeys/Makefile (revision 481789) >+++ 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,186 @@ >+Adapted from >+http://git.pld-linux.org/?p=packages/libdomainkeys.git;a=blob;f=openssl.patch;h=a79c3f6b9431bb339b21937a54ce42c944f67090;hb=0b35df2ead77bfee132c88109c001ba079da27cd >+ >+--- domainkeys.c.orig 2008-03-31 22:50:39 UTC >++++ domainkeys.c >+@@ -120,7 +120,11 @@ typedef struct >+ { >+ /* STARTPRIV */ >+ int dkmarker; /* in case somebody casts in */ >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_MD_CTX mdctx; /* the hash */ >++#else >++ EVP_MD_CTX *mdctx; /* the hash */ >++#endif >+ 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. */ >+@@ -503,7 +507,24 @@ 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); >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >++ if (!EVP_SignInit(&dk->mdctx, dklib->md)) { >++ if (statp) >++ { >++ *statp = DKERR(DK_STAT_NORESOURCE); >++ } >++ return NULL; >++ } >++#else >++ dk->mdctx = EVP_MD_CTX_create(); >++ if (!EVP_SignInit(dk->mdctx, dklib->md)) { >++ if (statp) >++ { >++ *statp = DKERR(DK_STAT_NORESOURCE); >++ } >++ return NULL; >++ } >++#endif >+ >+ if (statp) >+ { >+@@ -541,7 +562,19 @@ DK *dk_verify(DK_LIB *dklib, DK_STAT *statp) >+ } >+ return NULL; >+ } >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_VerifyInit(&dk->mdctx, dklib->md); >++#else >++ dk->mdctx = EVP_MD_CTX_create(); >++ if (!EVP_SignInit(dk->mdctx, dklib->md)) { >++ if (statp) >++ { >++ *statp = DKERR(DK_STAT_NORESOURCE); >++ } >++ return NULL; >++ } >++ EVP_VerifyInit(dk->mdctx, dklib->md); >++#endif >+ >+ if (statp) >+ { >+@@ -928,14 +961,22 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ { >+ >+ #ifndef DK_HASH_BUFF >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, "\r\n", 2); >+ #else >++ EVP_DigestUpdate(dk->mdctx, "\r\n", 2); >++#endif >++#else >+ /* buffer hack */ >+ dk->hash_buff[dk->hash_buff_len++] = '\r'; >+ dk->hash_buff[dk->hash_buff_len++] = '\n'; >+ if (dk->hash_buff_len >= (DK_BLOCK - 1)) >+ { >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#else >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#endif >+ dk->hash_buff_len = 0; >+ } >+ /* buffer hack */ >+@@ -955,13 +996,21 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ if (dk->canon == DK_CANON_SIMPLE)//if nofws we ignore \r >+ { >+ #ifndef DK_HASH_BUFF >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, "\r", 1); >+ #else >++ EVP_DigestUpdate(dk->mdctx, "\r", 1); >++#endif >++#else >+ /* buffer hack */ >+ dk->hash_buff[dk->hash_buff_len++] = '\r'; >+ if (dk->hash_buff_len >= (DK_BLOCK - 1)) >+ { >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#else >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#endif >+ dk->hash_buff_len = 0; >+ } >+ /* buffer hack */ >+@@ -977,13 +1026,21 @@ static void dkhash(DK *dk, const unsigned char *ptr) >+ dk->state --; >+ } >+ #ifndef DK_HASH_BUFF >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, ptr, 1); >+ #else >++ EVP_DigestUpdate(dk->mdctx, ptr, 1); >++#endif >++#else >+ /* buffer hack */ >+ dk->hash_buff[dk->hash_buff_len++] = *ptr; >+ if (dk->hash_buff_len >= (DK_BLOCK - 1)) >+ { >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#else >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#endif >+ dk->hash_buff_len = 0; >+ } >+ /* buffer hack */ >+@@ -1746,11 +1803,19 @@ 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'; >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#else >++ EVP_DigestUpdate(dk->mdctx, dk->hash_buff, dk->hash_buff_len); >++#endif >+ dk->hash_buff_len = 0; >+ #else >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_DigestUpdate(&dk->mdctx, "\r\n", 2); >++#else >++ EVP_DigestUpdate(dk->mdctx, "\r\n", 2); >+ #endif >++#endif >+ #ifdef DK_DEBUG >+ fprintf(stderr,"\r\n"); >+ #endif >+@@ -1949,7 +2014,11 @@ DK_STAT dk_end(DK *dk, DK_FLAGS *dkf) >+ } >+ >+ /* using that key, verify that the digest is properly signed */ >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ i = EVP_VerifyFinal(&dk->mdctx, md_value, md_len, publickey); >++#else >++ i = EVP_VerifyFinal(dk->mdctx, md_value, md_len, publickey); >++#endif >+ >+ if (i > 0) >+ { >+@@ -2058,7 +2127,11 @@ DK_STAT dk_getsig(DK *dk, void *privatekey, unsigned c >+ >+ siglen = EVP_PKEY_size(pkey); >+ sig = (unsigned char*) OPENSSL_malloc(siglen); >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_SignFinal(&dk->mdctx, sig, &siglen, pkey); >++#else >++ EVP_SignFinal(dk->mdctx, sig, &siglen, pkey); >++#endif >+ EVP_PKEY_free(pkey); >+ >+ bio = BIO_new(BIO_s_mem()); >+@@ -2152,7 +2225,11 @@ DK_STAT dk_free(DK *dk, int doClearErrState) >+ #ifdef DK_HASH_BUFF >+ DK_MFREE(dk->hash_buff); >+ #endif >++#if OPENSSL_VERSION_NUMBER < 0x1010000fL >+ EVP_MD_CTX_cleanup(&dk->mdctx); >++#else >++ EVP_MD_CTX_free(dk->mdctx); >++#endif >+ DK_MFREE(dk->header); /* alloc'ing dk->header is not optional. */ >+ dk->dkmarker = ~DKMARK; >+ DK_MFREE(dk); > >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