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.

37 lines
863 B

  1. --- a/libclamav/crypto.c
  2. +++ b/libclamav/crypto.c
  3. @@ -53,6 +53,10 @@
  4. #include <openssl/evp.h>
  5. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  6. +#define X509_CRL_get0_nextUpdate X509_CRL_get_nextUpdate
  7. +#endif
  8. +
  9. #if !defined(_WIN32)
  10. #include <unistd.h>
  11. #endif
  12. @@ -132,12 +136,14 @@ time_t timegm(struct tm *t)
  13. */
  14. int cl_initialize_crypto(void)
  15. {
  16. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  17. SSL_load_error_strings();
  18. SSL_library_init();
  19. OpenSSL_add_all_digests();
  20. OpenSSL_add_all_algorithms();
  21. OpenSSL_add_all_ciphers();
  22. ERR_load_crypto_strings();
  23. +#endif
  24. return 0;
  25. }
  26. @@ -1140,7 +1146,7 @@ X509_CRL *cl_load_crl(const char *file)
  27. if ((x)) {
  28. ASN1_TIME *tme;
  29. - tme = X509_CRL_get_nextUpdate(x);
  30. + tme = X509_CRL_get0_nextUpdate(x);
  31. if (!tme || X509_cmp_current_time(tme) < 0) {
  32. X509_CRL_free(x);
  33. return NULL;