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

--- a/sources/common/src/utils/misc/crypto.cpp
+++ b/sources/common/src/utils/misc/crypto.cpp
@@ -350,6 +350,7 @@ string unhex(string source) {
return result;
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
void CleanupSSL() {
ERR_remove_state(0);
ENGINE_cleanup();
@@ -358,3 +359,4 @@ void CleanupSSL() {
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
}
+#endif
--- a/sources/crtmpserver/src/crtmpserver.cpp
+++ b/sources/crtmpserver/src/crtmpserver.cpp
@@ -298,8 +298,10 @@ void Cleanup() {
delete gRs.pConfigFile;
gRs.pConfigFile = NULL;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
WARN("Doing final OpenSSL cleanup");
CleanupSSL();
+#endif
WARN("Shutting down the logger leaving you in the dark. Bye bye... :(");
Logger::Free(true);
--- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
bool BaseSSLProtocol::Initialize(Variant &parameters) {
//1. Initialize the SSL library
if (!_libraryInitialized) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
//3. This is the first time we use the library. So we have to
//initialize it first
SSL_library_init();
@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant &parameters) {
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
+#endif
//initialize the random numbers generator
InitRandGenerator();