mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
libcrypto: Fix access violation in ssh_init()
This fixes an access violation when ssh_init() was called after ssh_finalize() in Windows when using OpenSSL 1.0.2 and libssh statically linked. Fixes T120 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
a08a97f9c7
commit
41b0d263d6
@@ -116,6 +116,14 @@ void crypto_thread_finalize(void)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK
|
||||
CRYPTO_THREADID_set_callback(NULL);
|
||||
#else
|
||||
CRYPTO_set_id_callback(NULL);
|
||||
#endif
|
||||
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
user_callbacks->mutex_destroy(&libcrypto_mutexes[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user