File 0021-Fix-a-build-break-with-OpenSSL-1.1.0f-configured-with-disable-deprecated-option.patch of Package podofo
Subject: Fix a build break with OpenSSL 1.1.0f configured with disable-deprecated option
Url: https://sourceforge.net/p/podofo/code/1860/
--- a/podofo/trunk/CMakeLists.txt
+++ b/podofo/trunk/CMakeLists.txt
@@ -498,6 +498,7 @@
${LIBIDN_LIBRARIES}
${LIBCRYPTO_LDFLAGS}
${LIBCRYPTO_LIBRARIES}
+ ${OPENSSL_LIBRARIES}
${LIBJPEG_LIBRARIES}
${PLATFORM_SYSTEM_LIBRARIES}
${stlport_libraries_if_use_stlport}
--- a/podofo/trunk/tools/podofosign/podofosign.cpp
+++ b/podofo/trunk/tools/podofosign/podofosign.cpp
@@ -27,6 +27,7 @@
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/pem.h>
+#include <openssl/ssl.h>
#include <openssl/x509.h>
using namespace PoDoFo;
@@ -874,11 +875,15 @@
outputfile = NULL;
}
+#ifdef PODOFO_HAVE_OPENSSL_1_1
+ OPENSSL_init_ssl(0, NULL);
+#else
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
ERR_load_PEM_strings();
ERR_load_ASN1_strings();
ERR_load_EVP_strings();
+#endif
X509* cert = NULL;
EVP_PKEY* pkey = NULL;
@@ -1082,7 +1087,9 @@
result = e.GetError();
}
+#ifndef PODOFO_HAVE_OPENSSL_1_1
ERR_free_strings();
+#endif
if( pSignField )
delete pSignField;