[Forensics-changes] [yara] 170/407: Use HAVE_LIBCRYPTO.

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:22 UTC 2017


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

bengen pushed a commit to annotated tag v3.3.0
in repository yara.

commit 8c1ce59e3214c2d02da28ac41d5e902ae572ef17
Author: Wesley Shields <wxs at atarininja.org>
Date:   Thu Oct 30 12:57:36 2014 -0400

    Use HAVE_LIBCRYPTO.
---
 libyara/modules/pe.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 9f576a6..94fd199 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -2361,7 +2361,7 @@ IMPORTED_DLL* pe_parse_imports(
   return head;
 }
 
-
+#if defined(HAVE_LIBCRYPTO)
 PX509_TIMESTAMPS pe_parse_certificates(
   PE* pe)
 {
@@ -2504,6 +2504,13 @@ PX509_TIMESTAMPS pe_parse_certificates(
   set_integer(counter, pe->object, "number_of_signatures");
   return head;
 }
+#else
+PX509_TIMESTAMPS pe_parse_certificates(
+  PE* pe)
+{
+  return NULL;
+}
+#endif  // defined(HAVE_LIBCRYPTO)
 
 
 void pe_parse_header(
@@ -2623,6 +2630,7 @@ void pe_parse_header(
   }
 }
 
+#if defined(HAVE_LIBCRYPTO)
 // Given a string, see if any of the stored notBefore matches, exactly.
 define_function(not_before_string)
 {
@@ -2665,7 +2673,6 @@ define_function(not_before_string)
   return_integer(0);
 }
 
-
 //
 // Given an integer argument return 1 if any of the stored notBefore values
 // come "after" it. For example, to find a binary with a notBefore in 2014
@@ -2774,6 +2781,7 @@ define_function(not_after_integer)
   return_integer(0);
 }
 
+#endif  // defined(HAVE_LIBCRYPTO)
 
 define_function(section_index)
 {
@@ -3207,7 +3215,7 @@ begin_declarations;
   declare_function("locale", "i", "i", locale);
   declare_function("language", "i", "i", language);
 
-// XXX: Wrap in HAVE_LIBCRYPTO
+  #if defined(HAVE_LIBCRYPTO)
   begin_struct_array("signatures");
     declare_string("issuer");
     declare_string("subject");
@@ -3220,6 +3228,7 @@ begin_declarations;
     declare_function("not_after", "i", "i", not_after_integer);
   end_struct_array("signatures");
   declare_integer("number_of_signatures");
+  #endif
 
 end_declarations;
 

-- 
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