You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
979 B

  1. --- a/src/libopensc/sc-ossl-compat.h
  2. +++ b/src/libopensc/sc-ossl-compat.h
  3. @@ -101,6 +101,21 @@ extern "C" {
  4. #endif
  5. /*
  6. + * 1.1.0 depracated ERR_load_crypto_strings(), SSL_load_error_strings(), ERR_free_strings()
  7. + * and ENGINE_load_dynamic.EVP_CIPHER_CTX_cleanup and EVP_CIPHER_CTX_init are replaced
  8. + * by EVP_CIPHER_CTX_reset.
  9. + * But for compatability with LibreSSL and older OpenSSL. OpenSC uses the older functions
  10. + */
  11. +#if OPENSSL_API_COMPAT >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
  12. +#define ERR_load_crypto_strings(x) {}
  13. +#define SSL_load_error_strings(x) {}
  14. +#define ERR_free_strings(x) {}
  15. +#define ENGINE_load_dynamic(x) {}
  16. +#define EVP_CIPHER_CTX_cleanup(x) EVP_CIPHER_CTX_reset(x)
  17. +#define EVP_CIPHER_CTX_init(x) EVP_CIPHER_CTX_reset(x)
  18. +#endif
  19. +
  20. +/*
  21. * OpenSSL-1.1.0-pre5 has hidden the RSA and DSA structures
  22. * One can no longer use statements like rsa->n = ...
  23. * Macros and defines don't work on all systems, so use inline versions