[Forensics-changes] [yara] 01/04: Add patch to fix build with OpenSSL 1.1 (Closes: #828614)

Hilko Bengen bengen at moszumanska.debian.org
Mon Jul 4 07:54:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository yara.

commit 0320025731f5ae0dbe47d77521d076007979e9cf
Author: Hilko Bengen <bengen at debian.org>
Date:   Fri Jul 1 18:44:50 2016 +0200

    Add patch to fix build with OpenSSL 1.1 (Closes: #828614)
---
 ...002-Make-pe.c-compatible-with-OpenSSL-1.1.patch | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/0002-Make-pe.c-compatible-with-OpenSSL-1.1.patch b/debian/patches/0002-Make-pe.c-compatible-with-OpenSSL-1.1.patch
new file mode 100644
index 0000000..97c6b47
--- /dev/null
+++ b/debian/patches/0002-Make-pe.c-compatible-with-OpenSSL-1.1.patch
@@ -0,0 +1,31 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Mon, 27 Jun 2016 18:09:10 +0200
+Subject: Make pe.c compatible with OpenSSL 1.1
+
+---
+ libyara/modules/pe.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
+index 4dcc13c..271dc08 100644
+--- a/libyara/modules/pe.c
++++ b/libyara/modules/pe.c
+@@ -29,6 +29,9 @@ limitations under the License.
+ #include <openssl/bio.h>
+ #include <openssl/pkcs7.h>
+ #include <openssl/x509.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_get_signature_nid(o) OBJ_obj2nid((o)->sig_alg.algorithm)
++#endif
+ #endif
+ 
+ #include <yara/pe.h>
+@@ -1155,7 +1158,7 @@ void pe_parse_certificates(
+           pe->object,
+           "signatures[%i].version", counter);
+ 
+-      const char* sig_alg = OBJ_nid2ln(OBJ_obj2nid(cert->sig_alg->algorithm));
++      const char* sig_alg = OBJ_nid2ln(X509_get_signature_nid(cert));
+ 
+       set_string(sig_alg, pe->object, "signatures[%i].algorithm", counter);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 8f463f8..f64a13d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Fix-possible-buffer-overrun-in-pe_parse_header.patch
+0002-Make-pe.c-compatible-with-OpenSSL-1.1.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list