You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
927 B

  1. --- a/libyara/modules/pe.c
  2. +++ b/libyara/modules/pe.c
  3. @@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  4. #include <openssl/x509.h>
  5. #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
  6. #define X509_get_signature_nid(o) OBJ_obj2nid((o)->sig_alg->algorithm)
  7. +#define X509_getm_notBefore X509_get_notBefore
  8. +#define X509_getm_notAfter X509_get_notAfter
  9. #endif
  10. #endif
  11. @@ -1326,10 +1328,10 @@ void pe_parse_certificates(
  12. }
  13. }
  14. - date_time = ASN1_get_time_t(X509_get_notBefore(cert));
  15. + date_time = ASN1_get_time_t(X509_getm_notBefore(cert));
  16. set_integer(date_time, pe->object, "signatures[%i].not_before", counter);
  17. - date_time = ASN1_get_time_t(X509_get_notAfter(cert));
  18. + date_time = ASN1_get_time_t(X509_getm_notAfter(cert));
  19. set_integer(date_time, pe->object, "signatures[%i].not_after", counter);
  20. counter++;