Support OpenSSL when deprecated defines have been removed Fixes 1755

sc-ossl-compat.h will check if OpenSSL has been built with or without some
deprecated defines. OpenSSL will provide defines for some of these if
built to still support depreacted routines but not if built with
"no-depracted". .

This commit will define some of the needed defines if ther are not
defined by OpenSSL. Thus if a distro builds OpenSSL with "no-depracted"
it can still be used.

 On branch fix-1755
 Changes to be committed:
	modified:   src/libopensc/sc-ossl-compat.h
This commit is contained in:
Doug Engert 2019-07-28 21:27:34 -05:00 committed by Frank Morgner
parent af8f965009
commit 93bdc8c826
1 changed files with 2 additions and 0 deletions

View File

@ -48,12 +48,14 @@ extern "C" {
* But for compatability with LibreSSL and older OpenSSL. OpenSC uses the older functions
*/
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
# if defined(OPENSSL_API_COMPAT) && OPENSSL_API_COMPAT >= 0x10100000L
#define ERR_load_crypto_strings(x) {}
#define SSL_load_error_strings(x) {}
#define ERR_free_strings(x) {}
#define ENGINE_load_dynamic(x) {}
#define EVP_CIPHER_CTX_cleanup(x) EVP_CIPHER_CTX_reset(x)
#define EVP_CIPHER_CTX_init(x) EVP_CIPHER_CTX_reset(x)
# endif
#endif