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.

46 lines
1.4 KiB

  1. --- a/sources/common/src/utils/misc/crypto.cpp
  2. +++ b/sources/common/src/utils/misc/crypto.cpp
  3. @@ -350,6 +350,7 @@ string unhex(string source) {
  4. return result;
  5. }
  6. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  7. void CleanupSSL() {
  8. ERR_remove_state(0);
  9. ENGINE_cleanup();
  10. @@ -358,3 +359,4 @@ void CleanupSSL() {
  11. EVP_cleanup();
  12. CRYPTO_cleanup_all_ex_data();
  13. }
  14. +#endif
  15. --- a/sources/crtmpserver/src/crtmpserver.cpp
  16. +++ b/sources/crtmpserver/src/crtmpserver.cpp
  17. @@ -298,8 +298,10 @@ void Cleanup() {
  18. delete gRs.pConfigFile;
  19. gRs.pConfigFile = NULL;
  20. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  21. WARN("Doing final OpenSSL cleanup");
  22. CleanupSSL();
  23. +#endif
  24. WARN("Shutting down the logger leaving you in the dark. Bye bye... :(");
  25. Logger::Free(true);
  26. --- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
  27. +++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
  28. @@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
  29. bool BaseSSLProtocol::Initialize(Variant &parameters) {
  30. //1. Initialize the SSL library
  31. if (!_libraryInitialized) {
  32. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  33. //3. This is the first time we use the library. So we have to
  34. //initialize it first
  35. SSL_library_init();
  36. @@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant &parameters) {
  37. OpenSSL_add_all_algorithms();
  38. OpenSSL_add_all_ciphers();
  39. OpenSSL_add_all_digests();
  40. +#endif
  41. //initialize the random numbers generator
  42. InitRandGenerator();