diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-01-08 14:54:51 -0800 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-01-08 14:54:51 -0800 |
commit | a1019b82c1e26f0fb925bfc9ae55d213be579a90 (patch) | |
tree | 4a595469fef3f11f37aa733f155d5206e6af7e0d /src/common/crypto.c | |
parent | 4c10a9c445e825886c658d67f5e44fdae37ffea3 (diff) | |
parent | 63658598250a906346d260c70678700e22c0fe01 (diff) | |
download | tor-a1019b82c1e26f0fb925bfc9ae55d213be579a90.tar.gz tor-a1019b82c1e26f0fb925bfc9ae55d213be579a90.zip |
Merge remote-tracking branch 'public/feature16794_more'
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r-- | src/common/crypto.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 134e69aa20..2f498ac6be 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -252,7 +252,7 @@ crypto_openssl_get_header_version_str(void) /** Make sure that openssl is using its default PRNG. Return 1 if we had to * adjust it; 0 otherwise. */ -static int +STATIC int crypto_force_rand_ssleay(void) { RAND_METHOD *default_method; @@ -3018,6 +3018,10 @@ openssl_locking_cb_(int mode, int n, const char *file, int line) tor_mutex_release(openssl_mutexes_[n]); } +#if 0 +/* This code is disabled, because OpenSSL never actually uses these callbacks. + */ + /** OpenSSL helper type: wraps a Tor mutex so that OpenSSL can use it * as a lock. */ struct CRYPTO_dynlock_value { @@ -3062,6 +3066,7 @@ openssl_dynlock_destroy_cb_(struct CRYPTO_dynlock_value *v, tor_mutex_free(v->lock); tor_free(v); } +#endif static void tor_set_openssl_thread_id(CRYPTO_THREADID *threadid) @@ -3083,9 +3088,11 @@ setup_openssl_threading(void) openssl_mutexes_[i] = tor_mutex_new(); CRYPTO_set_locking_callback(openssl_locking_cb_); CRYPTO_THREADID_set_callback(tor_set_openssl_thread_id); +#if 0 CRYPTO_set_dynlock_create_callback(openssl_dynlock_create_cb_); CRYPTO_set_dynlock_lock_callback(openssl_dynlock_lock_cb_); CRYPTO_set_dynlock_destroy_callback(openssl_dynlock_destroy_cb_); +#endif return 0; } |