|
--- a/src/libopensc/sc-ossl-compat.h
|
|
+++ b/src/libopensc/sc-ossl-compat.h
|
|
@@ -101,6 +101,21 @@ extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
+ * 1.1.0 depracated ERR_load_crypto_strings(), SSL_load_error_strings(), ERR_free_strings()
|
|
+ * and ENGINE_load_dynamic.EVP_CIPHER_CTX_cleanup and EVP_CIPHER_CTX_init are replaced
|
|
+ * by EVP_CIPHER_CTX_reset.
|
|
+ * But for compatability with LibreSSL and older OpenSSL. OpenSC uses the older functions
|
|
+ */
|
|
+#if OPENSSL_API_COMPAT >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
|
+#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
|
|
+
|
|
+/*
|
|
* OpenSSL-1.1.0-pre5 has hidden the RSA and DSA structures
|
|
* One can no longer use statements like rsa->n = ...
|
|
* Macros and defines don't work on all systems, so use inline versions
|