mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-10-12 02:01:44 +00:00
bb11594 - allow for compilation against openssl 1.1.0
This commit is contained in:
+6
-15
@@ -1096,7 +1096,6 @@ X509_CRL *cl_load_crl(const char *file)
|
||||
{
|
||||
X509_CRL *x=NULL;
|
||||
FILE *fp;
|
||||
struct tm *tm;
|
||||
|
||||
if (!(file))
|
||||
return NULL;
|
||||
@@ -1110,21 +1109,13 @@ X509_CRL *cl_load_crl(const char *file)
|
||||
fclose(fp);
|
||||
|
||||
if ((x)) {
|
||||
tm = cl_ASN1_GetTimeT(x->crl->nextUpdate);
|
||||
if (!(tm)) {
|
||||
X509_CRL_free(x);
|
||||
return NULL;
|
||||
}
|
||||
ASN1_TIME *tme;
|
||||
|
||||
#if !defined(_WIN32)
|
||||
if (timegm(tm) < time(NULL)) {
|
||||
X509_CRL_free(x);
|
||||
free(tm);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
free(tm);
|
||||
tme = X509_CRL_get_nextUpdate(x);
|
||||
if (!tme || X509_cmp_current_time(tme) < 0) {
|
||||
X509_CRL_free(x);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return x;
|
||||
|
||||
@@ -26,12 +26,13 @@ save_LDFLAGS="$LDFLAGS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
|
||||
SSL_LIBS="-lssl -lcrypto -lz"
|
||||
SSL_LIBS="$LIBS -lssl -lcrypto -lz"
|
||||
LIBS="$LIBS $SSL_LIBS"
|
||||
|
||||
if test "$LIBSSL_HOME" != "/usr"; then
|
||||
SSL_LDFLAGS="-L$LIBSSL_HOME/lib"
|
||||
SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
|
||||
LDFLAGS="-L$LIBSSL_HOME/lib $SSL_LIBS"
|
||||
LDFLAGS="-L$LIBSSL_HOME/lib"
|
||||
CFLAGS="$SSL_CPPFLAGS"
|
||||
else
|
||||
SSL_LDFLAGS=""
|
||||
@@ -41,7 +42,12 @@ fi
|
||||
have_ssl="no"
|
||||
have_crypto="no"
|
||||
|
||||
AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <openssl/ssl.h>]],
|
||||
[[SSL_library_init();]])],
|
||||
[have_ssl="yes";],
|
||||
[AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])])
|
||||
|
||||
|
||||
AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user