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.

66 lines
1.9 KiB

  1. --- a/lib/crypto/c_src/crypto_callback.c
  2. +++ b/lib/crypto/c_src/crypto_callback.c
  3. @@ -112,6 +112,7 @@ static ErlNifRWLock** lock_vec = NULL; /
  4. #include <openssl/crypto.h>
  5. +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
  6. static INLINE void locking(int mode, ErlNifRWLock* lock)
  7. {
  8. switch (mode) {
  9. @@ -132,7 +133,6 @@ static INLINE void locking(int mode, Erl
  10. }
  11. }
  12. -#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
  13. static void locking_function(int mode, int n, const char *file, int line)
  14. {
  15. locking(mode, lock_vec[n]);
  16. --- a/lib/crypto/c_src/engine.c
  17. +++ b/lib/crypto/c_src/engine.c
  18. @@ -244,7 +244,7 @@ ERL_NIF_TERM engine_load_dynamic_nif(Erl
  19. #ifdef HAS_ENGINE_SUPPORT
  20. ASSERT(argc == 0);
  21. - ENGINE_load_dynamic();
  22. + ENGINE_load_builtin_engines();
  23. return atom_ok;
  24. #else
  25. return atom_notsup;
  26. --- a/lib/crypto/c_src/info.c
  27. +++ b/lib/crypto/c_src/info.c
  28. @@ -20,6 +20,11 @@
  29. #include "info.h"
  30. +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
  31. +#define OPENSSL_VERSION SSLEAY_VERSION
  32. +#define OpenSSL_version SSLeay_version
  33. +#endif
  34. +
  35. #ifdef HAVE_DYNAMIC_CRYPTO_LIB
  36. # if defined(DEBUG)
  37. @@ -77,7 +82,7 @@ ERL_NIF_TERM info_lib(ErlNifEnv *env, in
  38. ASSERT(argc == 0);
  39. name_sz = strlen(libname);
  40. - ver = SSLeay_version(SSLEAY_VERSION);
  41. + ver = OpenSSL_version(OPENSSL_VERSION);
  42. ver_sz = strlen(ver);
  43. ver_num = OPENSSL_VERSION_NUMBER;
  44. --- a/lib/crypto/c_src/otp_test_engine.c
  45. +++ b/lib/crypto/c_src/otp_test_engine.c
  46. @@ -100,9 +100,11 @@ static int test_init(ENGINE *e) {
  47. goto err;
  48. #endif /* if defined(FAKE_RSA_IMPL) */
  49. +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
  50. /* Load all digest and cipher algorithms. Needed for password protected private keys */
  51. OpenSSL_add_all_ciphers();
  52. OpenSSL_add_all_digests();
  53. +#endif
  54. return 111;