yara: update to 3.6.0.

This commit is contained in:
Michael Gehring 2017-05-23 00:21:05 +00:00
parent 3b5e4ec5ea
commit 5285a3ebb7
2 changed files with 39 additions and 12 deletions

View file

@ -1,25 +1,52 @@
--- libyara/libyara.c.orig 2016-09-06 20:09:47.000000000 +0000
+++ libyara/libyara.c 2017-05-10 12:40:13.393089280 +0000
--- libyara/libyara.c.orig 2017-05-22 10:24:23.000000000 +0000
+++ libyara/libyara.c 2017-05-23 00:18:32.658793790 +0000
@@ -37,7 +37,7 @@
#include <yara/mem.h>
#include <yara/threading.h>
-#if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(HAVE_LIBCRYPTO) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
#include <openssl/crypto.h>
#endif
@@ -71,7 +71,7 @@
char altercase[256];
char yr_altercase[256];
-#if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
-#if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(HAVE_LIBCRYPTO) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
// The OpenSSL library before version 1.1 requires some locks in order
// to be thread-safe. These locks are initialized in yr_initialize
@@ -133,7 +133,7 @@
FAIL_ON_ERROR(yr_thread_storage_create(&tidx_key));
FAIL_ON_ERROR(yr_thread_storage_create(&recovery_state_key));
FAIL_ON_ERROR(yr_thread_storage_create(&yr_tidx_key));
FAIL_ON_ERROR(yr_thread_storage_create(&yr_recovery_state_key));
- #if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L
+ #if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
openssl_locks = (YR_MUTEX*) OPENSSL_malloc(
CRYPTO_num_locks() * sizeof(YR_MUTEX));
--- libyara/modules/pe.c.orig 2016-09-06 20:09:47.000000000 +0000
+++ libyara/modules/pe.c 2017-05-10 12:38:23.755095815 +0000
@@ -178,7 +178,7 @@
YR_API int yr_finalize(void)
{
- #if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L
+ #if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
int i;
#endif
@@ -194,7 +194,7 @@
if (init_count > 0)
return ERROR_SUCCESS;
- #if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L
+ #if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
for (i = 0; i < CRYPTO_num_locks(); i ++)
yr_mutex_destroy(&openssl_locks[i]);
--- libyara/modules/pe.c.orig 2016-09-06 20:09:47.000000000 +0000
+++ libyara/modules/pe.c 2017-05-10 12:38:23.755095815 +0000
@@ -42,7 +42,7 @@
#include <openssl/bio.h>
#include <openssl/pkcs7.h>

View file

@ -1,7 +1,7 @@
# Template file for 'yara'
pkgname=yara
version=3.5.0
revision=2
version=3.6.0
revision=1
build_style=gnu-configure
configure_args="--enable-magic --enable-cuckoo"
hostmakedepends="automake libtool"
@ -11,7 +11,7 @@ maintainer="Michael Gehring <mg@ebfe.org>"
license="3-clause-BSD"
homepage="http://virustotal.github.io/yara/"
distfiles="https://github.com/VirusTotal/yara/archive/v${version}.tar.gz"
checksum=4bc72ee755db85747f7e856afb0e817b788a280ab5e73dee42f159171a9b5299
checksum=fb27784b3989db509871652aae26063d87e9cc6330929abed1ab824c5bd600e0
pre_configure() {
autoreconf -fi