Skip to content

Commit

Permalink
Support OpenSSL when deprecated defines have been removed Fixes 1755
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dengert authored and frankmorgner committed Jul 31, 2019
1 parent af8f965 commit 93bdc8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libopensc/sc-ossl-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 93bdc8c

Please sign in to comment.