FreeBSD Bugzilla – Attachment 198016 Details for
Bug 232164
sysutils/bulk_extractor fails to build with openssl 1.1.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
be.diff (text/plain), 9.55 KB, created by
Antoine Brodin
on 2018-10-10 21:57:14 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Antoine Brodin
Created:
2018-10-10 21:57:14 UTC
Size:
9.55 KB
patch
obsolete
>Index: sysutils/bulk_extractor/Makefile >=================================================================== >--- sysutils/bulk_extractor/Makefile (revision 481767) >+++ sysutils/bulk_extractor/Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= bulk_extractor > PORTVERSION= 1.5.5 >-PORTREVISION= 2 >+PORTREVISION= 3 > CATEGORIES= sysutils > MASTER_SITES= http://digitalcorpora.org/downloads/bulk_extractor/ > >@@ -13,7 +13,7 @@ > LICENSE= GPLv3 > LICENSE_FILE= ${WRKSRC}/COPYING > >-USES= sqlite ssl >+USES= autoreconf sqlite ssl > LIB_DEPENDS= libafflib.so:sysutils/afflib \ > libewf.so:devel/libewf \ > libexiv2.so:graphics/exiv2 \ >Index: sysutils/bulk_extractor/files/patch-plugins_dfxml_src_dfxml__configure.m4 >=================================================================== >--- sysutils/bulk_extractor/files/patch-plugins_dfxml_src_dfxml__configure.m4 (nonexistent) >+++ sysutils/bulk_extractor/files/patch-plugins_dfxml_src_dfxml__configure.m4 (working copy) >@@ -0,0 +1,8 @@ >+--- plugins/dfxml/src/dfxml_configure.m4.orig 2014-09-16 18:34:02 UTC >++++ plugins/dfxml/src/dfxml_configure.m4 >+@@ -59,4 +59,5 @@ AC_CHECK_LIB([crypto],[EVP_get_digestbyn >+ AC_CHECK_LIB([ssl],[SSL_library_init]) >+ AC_CHECK_FUNCS([EVP_get_digestbyname],, >+ AC_MSG_ERROR([SSL/OpenSSL support required])) >++AC_CHECK_FUNCS([EVP_MD_CTX_new EVP_MD_CTX_free]) >+ > >Property changes on: sysutils/bulk_extractor/files/patch-plugins_dfxml_src_dfxml__configure.m4 >___________________________________________________________________ >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 >Index: sysutils/bulk_extractor/files/patch-plugins_dfxml_src_hash__t.h >=================================================================== >--- sysutils/bulk_extractor/files/patch-plugins_dfxml_src_hash__t.h (nonexistent) >+++ sysutils/bulk_extractor/files/patch-plugins_dfxml_src_hash__t.h (working copy) >@@ -0,0 +1,78 @@ >+--- plugins/dfxml/src/hash_t.h.orig 2014-09-16 18:34:02 UTC >++++ plugins/dfxml/src/hash_t.h >+@@ -189,7 +189,8 @@ inline std::string digest_name<sha512_t> >+ >+ template<const EVP_MD *md(),size_t SIZE> >+ class hash_generator__ { /* generates the hash */ >+- EVP_MD_CTX mdctx; /* the context for computing the value */ >++ private: >++ EVP_MD_CTX* mdctx; /* the context for computing the value */ >+ bool initialized; /* has the context been initialized? */ >+ bool finalized; >+ /* Static function to determine if something is zero */ >+@@ -199,24 +200,36 @@ class hash_generator__ { /* generates >+ } >+ return true; >+ } >++ /* Not allowed to copy; these are prototyped but not defined, so any attempt to use them will fail, but we won't get the -Weffc++ warnings */ >++ hash_generator__ & operator=(const hash_generator__ &); >++ hash_generator__(const hash_generator__ &); >+ public: >+ int64_t hashed_bytes; >+ /* This function takes advantage of the fact that different hash functions produce residues with different sizes */ >+- hash_generator__():mdctx(),initialized(false),finalized(false),hashed_bytes(0){ } >++ hash_generator__():mdctx(NULL),initialized(false),finalized(false),hashed_bytes(0){ } >+ ~hash_generator__(){ >+ release(); >+ } >+ void release(){ /* free allocated memory */ >+ if(initialized){ >+- EVP_MD_CTX_cleanup(&mdctx); >++#ifdef HAVE_EVP_MD_CTX_FREE >++ EVP_MD_CTX_free(mdctx); >++#else >++ EVP_MD_CTX_destroy(mdctx); >++#endif >+ initialized = false; >+ hashed_bytes = 0; >+ } >+ } >+ void init(){ >+ if(initialized==false){ >+- EVP_MD_CTX_init(&mdctx); >+- EVP_DigestInit_ex(&mdctx, md(), NULL); >++#ifdef HAVE_EVP_MD_CTX_NEW >++ mdctx = EVP_MD_CTX_new(); >++#else >++ mdctx = EVP_MD_CTX_create(); >++#endif >++ if (!mdctx) throw std::bad_alloc(); >++ EVP_DigestInit_ex(mdctx, md(), NULL); >+ initialized = true; >+ finalized = false; >+ hashed_bytes = 0; >+@@ -228,21 +241,21 @@ public: >+ std::cerr << "hashgen_t::update called after finalized\n"; >+ exit(1); >+ } >+- EVP_DigestUpdate(&mdctx,buf,bufsize); >++ EVP_DigestUpdate(mdctx,buf,bufsize); >+ hashed_bytes += bufsize; >+ } >+ hash__<md,SIZE> final() { >+ if(finalized){ >+ std::cerr << "currently friendly_geneator does not cache the final value\n"; >+ assert(0); >+- /* code below will never be executed after assert(0) */ >++ exit(1); // in case compiled with assertions disabled >+ } >+ if(!initialized){ >+ init(); /* do it now! */ >+ } >+ hash__<md,SIZE> val; >+ unsigned int len = sizeof(val.digest); >+- EVP_DigestFinal(&mdctx,val.digest,&len); >++ EVP_DigestFinal(mdctx,val.digest,&len); >+ finalized = true; >+ return val; >+ } > >Property changes on: sysutils/bulk_extractor/files/patch-plugins_dfxml_src_hash__t.h >___________________________________________________________________ >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 >Index: sysutils/bulk_extractor/files/patch-src_dfxml_src_dfxml__configure.m4 >=================================================================== >--- sysutils/bulk_extractor/files/patch-src_dfxml_src_dfxml__configure.m4 (nonexistent) >+++ sysutils/bulk_extractor/files/patch-src_dfxml_src_dfxml__configure.m4 (working copy) >@@ -0,0 +1,8 @@ >+--- src/dfxml/src/dfxml_configure.m4.orig 2018-10-10 21:44:10 UTC >++++ src/dfxml/src/dfxml_configure.m4 >+@@ -59,4 +59,5 @@ AC_CHECK_LIB([crypto],[EVP_get_digestbyn >+ AC_CHECK_LIB([ssl],[SSL_library_init]) >+ AC_CHECK_FUNCS([EVP_get_digestbyname],, >+ AC_MSG_ERROR([SSL/OpenSSL support required])) >++AC_CHECK_FUNCS([EVP_MD_CTX_new EVP_MD_CTX_free]) >+ > >Property changes on: sysutils/bulk_extractor/files/patch-src_dfxml_src_dfxml__configure.m4 >___________________________________________________________________ >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 >Index: sysutils/bulk_extractor/files/patch-src_dfxml_src_hash__t.h >=================================================================== >--- sysutils/bulk_extractor/files/patch-src_dfxml_src_hash__t.h (nonexistent) >+++ sysutils/bulk_extractor/files/patch-src_dfxml_src_hash__t.h (working copy) >@@ -0,0 +1,78 @@ >+--- src/dfxml/src/hash_t.h.orig 2014-09-16 18:34:02 UTC >++++ src/dfxml/src/hash_t.h >+@@ -189,7 +189,8 @@ inline std::string digest_name<sha512_t> >+ >+ template<const EVP_MD *md(),size_t SIZE> >+ class hash_generator__ { /* generates the hash */ >+- EVP_MD_CTX mdctx; /* the context for computing the value */ >++ private: >++ EVP_MD_CTX* mdctx; /* the context for computing the value */ >+ bool initialized; /* has the context been initialized? */ >+ bool finalized; >+ /* Static function to determine if something is zero */ >+@@ -199,24 +200,36 @@ class hash_generator__ { /* generates >+ } >+ return true; >+ } >++ /* Not allowed to copy; these are prototyped but not defined, so any attempt to use them will fail, but we won't get the -Weffc++ warnings */ >++ hash_generator__ & operator=(const hash_generator__ &); >++ hash_generator__(const hash_generator__ &); >+ public: >+ int64_t hashed_bytes; >+ /* This function takes advantage of the fact that different hash functions produce residues with different sizes */ >+- hash_generator__():mdctx(),initialized(false),finalized(false),hashed_bytes(0){ } >++ hash_generator__():mdctx(NULL),initialized(false),finalized(false),hashed_bytes(0){ } >+ ~hash_generator__(){ >+ release(); >+ } >+ void release(){ /* free allocated memory */ >+ if(initialized){ >+- EVP_MD_CTX_cleanup(&mdctx); >++#ifdef HAVE_EVP_MD_CTX_FREE >++ EVP_MD_CTX_free(mdctx); >++#else >++ EVP_MD_CTX_destroy(mdctx); >++#endif >+ initialized = false; >+ hashed_bytes = 0; >+ } >+ } >+ void init(){ >+ if(initialized==false){ >+- EVP_MD_CTX_init(&mdctx); >+- EVP_DigestInit_ex(&mdctx, md(), NULL); >++#ifdef HAVE_EVP_MD_CTX_NEW >++ mdctx = EVP_MD_CTX_new(); >++#else >++ mdctx = EVP_MD_CTX_create(); >++#endif >++ if (!mdctx) throw std::bad_alloc(); >++ EVP_DigestInit_ex(mdctx, md(), NULL); >+ initialized = true; >+ finalized = false; >+ hashed_bytes = 0; >+@@ -228,21 +241,21 @@ public: >+ std::cerr << "hashgen_t::update called after finalized\n"; >+ exit(1); >+ } >+- EVP_DigestUpdate(&mdctx,buf,bufsize); >++ EVP_DigestUpdate(mdctx,buf,bufsize); >+ hashed_bytes += bufsize; >+ } >+ hash__<md,SIZE> final() { >+ if(finalized){ >+ std::cerr << "currently friendly_geneator does not cache the final value\n"; >+ assert(0); >+- /* code below will never be executed after assert(0) */ >++ exit(1); // in case compiled with assertions disabled >+ } >+ if(!initialized){ >+ init(); /* do it now! */ >+ } >+ hash__<md,SIZE> val; >+ unsigned int len = sizeof(val.digest); >+- EVP_DigestFinal(&mdctx,val.digest,&len); >++ EVP_DigestFinal(mdctx,val.digest,&len); >+ finalized = true; >+ return val; >+ } > >Property changes on: sysutils/bulk_extractor/files/patch-src_dfxml_src_hash__t.h >___________________________________________________________________ >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 232164
: 198016