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.

48 lines
1.3 KiB

  1. --- a/lib/crypto/c_src/engine.c
  2. +++ b/lib/crypto/c_src/engine.c
  3. @@ -239,7 +239,7 @@ ERL_NIF_TERM engine_load_dynamic_nif(Erl
  4. #ifdef HAS_ENGINE_SUPPORT
  5. ASSERT(argc == 0);
  6. - ENGINE_load_dynamic();
  7. + ENGINE_load_builtin_engines();
  8. return atom_ok;
  9. #else
  10. return atom_notsup;
  11. --- a/lib/crypto/c_src/info.c
  12. +++ b/lib/crypto/c_src/info.c
  13. @@ -46,6 +46,11 @@
  14. #endif
  15. +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
  16. +#define OPENSSL_VERSION SSLEAY_VERSION
  17. +#define OpenSSL_version SSLeay_version
  18. +#endif
  19. +
  20. #ifdef HAVE_DYNAMIC_CRYPTO_LIB
  21. char *crypto_callback_name = CB_NAME;
  22. @@ -132,7 +137,7 @@ ERL_NIF_TERM info_lib(ErlNifEnv *env, in
  23. ASSERT(argc == 0);
  24. name_sz = strlen(libname);
  25. - ver = SSLeay_version(SSLEAY_VERSION);
  26. + ver = OpenSSL_version(OPENSSL_VERSION);
  27. ver_sz = strlen(ver);
  28. ver_num = OPENSSL_VERSION_NUMBER;
  29. --- a/lib/crypto/c_src/otp_test_engine.c
  30. +++ b/lib/crypto/c_src/otp_test_engine.c
  31. @@ -101,9 +101,11 @@ static int test_init(ENGINE *e) {
  32. goto err;
  33. #endif /* if defined(FAKE_RSA_IMPL) */
  34. +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
  35. /* Load all digest and cipher algorithms. Needed for password protected private keys */
  36. OpenSSL_add_all_ciphers();
  37. OpenSSL_add_all_digests();
  38. +#endif
  39. return 111;