FreeBSD Bugzilla – Attachment 198080 Details for
Bug 232211
security/pev: Fix OpenSSL build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix OpenSSL
pev (text/plain), 3.65 KB, created by
Nathan
on 2018-10-13 01:09:28 UTC
(
hide
)
Description:
Fix OpenSSL
Filename:
MIME Type:
Creator:
Nathan
Created:
2018-10-13 01:09:28 UTC
Size:
3.65 KB
patch
obsolete
>security/pev: Fix OpenSSL build > >PR: 231931 >Submitted by: Nathan <ndowens@yahoo.com> > >Index: security/pev/Makefile >=================================================================== >--- security/pev/Makefile (revision 481687) >+++ security/pev/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= pev > PORTVERSION= 0.80 >+PORTREVISION= 1 > CATEGORIES= security > MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}/ > >Index: security/pev/files/patch-pehash >=================================================================== >--- security/pev/files/patch-pehash (nonexistent) >+++ security/pev/files/patch-pehash (working copy) >@@ -0,0 +1,48 @@ >+From 98f5f22f91f02821be1604bbce61efb45f7e3696 Mon Sep 17 00:00:00 2001 >+From: Jardel Weyrich <jweyrich@gmail.com> >+Date: Thu, 12 Jan 2017 16:45:24 -0200 >+Subject: [PATCH] Make pehash compatible with OpenSSL 1.1.0. >+ >+--- >+ src/pehash.c | 24 ++++++++++++++++++------ >+ 1 file changed, 18 insertions(+), 6 deletions(-) >+ >+diff --git src/pehash.c src/pehash.c >+index e03a0a9..619a1ef 100644 >+--- src/pehash.c >++++ src/pehash.c >+@@ -215,13 +215,25 @@ static void calc_hash(const char *alg_name, const unsigned char *data, size_t si >+ unsigned char md_value[EVP_MAX_MD_SIZE]; >+ unsigned int md_len; >+ >+- EVP_MD_CTX md_ctx; >++// See https://wiki.openssl.org/index.php/1.1_API_Changes >++#if OPENSSL_VERSION_NUMBER < 0x10100000L >++ EVP_MD_CTX md_ctx_auto; >++ EVP_MD_CTX *md_ctx = &md_ctx_auto; >++#else >++ EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); >++#endif >++ >+ // FIXME: Handle errors - Check return values. >+- EVP_MD_CTX_init(&md_ctx); >+- EVP_DigestInit_ex(&md_ctx, md, NULL); >+- EVP_DigestUpdate(&md_ctx, data, size); >+- EVP_DigestFinal_ex(&md_ctx, md_value, &md_len); >+- EVP_MD_CTX_cleanup(&md_ctx); >++ EVP_MD_CTX_init(md_ctx); >++ EVP_DigestInit_ex(md_ctx, md, NULL); >++ EVP_DigestUpdate(md_ctx, data, size); >++ EVP_DigestFinal_ex(md_ctx, md_value, &md_len); >++ >++#if OPENSSL_VERSION_NUMBER < 0x10100000L >++ EVP_MD_CTX_cleanup(md_ctx); >++#else >++ EVP_MD_CTX_free(md_ctx); >++#endif >+ >+ for (unsigned int i=0; i < md_len; i++) >+ sprintf(&output[i * 2], "%02x", md_value[i]); >+-- >+2.15.1 >+ > >Property changes on: security/pev/files/patch-pehash >___________________________________________________________________ >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: security/pev/files/patch-pesec >=================================================================== >--- security/pev/files/patch-pesec (nonexistent) >+++ security/pev/files/patch-pesec (working copy) >@@ -0,0 +1,26 @@ >+From 3fc1d6ac863cfb596e8e9263e03871aec8c00d22 Mon Sep 17 00:00:00 2001 >+From: Jardel Weyrich <jweyrich@gmail.com> >+Date: Thu, 19 Jan 2017 00:14:31 -0200 >+Subject: [PATCH] Make pesec compatible with OpenSSL 1.1.0. >+ >+--- >+ src/pesec.c | 2 ++ >+ 1 file changed, 2 insertions(+) >+ >+diff --git src/pesec.c src/pesec.c >+index 470af17..a10f963 100644 >+--- src/pesec.c >++++ src/pesec.c >+@@ -225,7 +225,9 @@ static int parse_pkcs7_data(const options_t *options, const CRYPT_DATA_BLOB *blo >+ PKCS7 *p7 = NULL; >+ BIO *in = NULL; >+ >++#if OPENSSL_VERSION_NUMBER < 0x10100000L >+ CRYPTO_malloc_init(); >++#endif >+ ERR_load_crypto_strings(); >+ OpenSSL_add_all_algorithms(); >+ >+-- >+2.15.1 >+ > >Property changes on: security/pev/files/patch-pesec >___________________________________________________________________ >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
Flags:
ndowens04
:
maintainer-approval?
(
danilo
)
Actions:
View
|
Diff
Attachments on
bug 232211
: 198080