Accepting request 546167 from home:msmeissn:branches:security

- clamav-0.99.2-openssl-1.1.patch: fixed build against openssl 1.1

OBS-URL: https://build.opensuse.org/request/show/546167
OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=149
This commit is contained in:
Reinhard Max 2017-11-28 09:00:11 +00:00 committed by Git OBS Bridge
parent cb4029f851
commit 0ec309c207
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,33 @@
--- clamav-0.99.2/libclamav/crypto.c.omv~ 2016-09-18 18:11:34.723085234 +0200
+++ clamav-0.99.2/libclamav/crypto.c 2016-09-18 18:11:48.296898159 +0200
@@ -121,7 +121,7 @@ time_t timegm(struct tm *t)
int cl_initialize_crypto(void)
{
SSL_load_error_strings();
- SSL_library_init();
+ OPENSSL_init_ssl(0, NULL);
OpenSSL_add_all_digests();
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
--- clamav-0.99.2/m4/reorganization/libs/openssl.m4.omv~ 2016-09-18 18:11:11.071411211 +0200
+++ clamav-0.99.2/m4/reorganization/libs/openssl.m4 2016-09-18 18:11:22.872248566 +0200
@@ -41,7 +41,7 @@ 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_CHECK_LIB([ssl], [OPENSSL_init_ssl], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
--- clamav-0.99.2/libclamav/crypto.c.omv~ 2016-09-18 18:15:48.514588018 +0200
+++ clamav-0.99.2/libclamav/crypto.c 2016-09-18 18:18:26.332413758 +0200
@@ -1110,7 +1110,7 @@ X509_CRL *cl_load_crl(const char *file)
fclose(fp);
if ((x)) {
- tm = cl_ASN1_GetTimeT(x->crl->nextUpdate);
+ tm = cl_ASN1_GetTimeT(X509_CRL_get0_nextUpdate(x));
if (!(tm)) {
X509_CRL_free(x);
return NULL;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 28 08:30:04 UTC 2017 - meissner@suse.com
- clamav-0.99.2-openssl-1.1.patch: fixed build against openssl 1.1
-------------------------------------------------------------------
Tue Sep 5 23:30:39 UTC 2017 - jengelh@inai.de

View File

@ -29,9 +29,12 @@ BuildRequires: zlib-devel
# Needed for compiling LLVM.
BuildRequires: gcc-c++
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: check-devel
BuildRequires: libbz2-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: pcre-devel
BuildRequires: pwdutils
@ -59,6 +62,8 @@ Patch1: clamav-conf.patch
Patch3: clamav-gcc47.patch
Patch4: clamav-disable-timestamps.patch
Patch5: clamav-fix_newer_zlib.patch
# https://raw.githubusercontent.com/patch-exchange/openssl-1.1-transition/master/clamav/clamav-0.99.2-openssl-1.1.patch
Patch6: clamav-0.99.2-openssl-1.1.patch
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
%systemd_requires
@ -99,6 +104,10 @@ that want to make use of libclamav.
%patch3 -p1
%patch4 -p1
%patch5 -p1
if pkg-config --atleast-version=1.1.0 libssl; then
%patch6 -p1
autoreconf -i -f
fi
%build
CFLAGS="-fstack-protector"