Lines 34-42
Link Here
|
34 |
#include <openssl/ssl.h> |
34 |
#include <openssl/ssl.h> |
35 |
#include <stdio.h> |
35 |
#include <stdio.h> |
36 |
|
36 |
|
|
|
37 |
static gboolean randfile_loaded; |
38 |
#if OPENSSL_VERSION_NUMBER < 0x10100000L |
37 |
static gint ssl_lock_count; |
39 |
static gint ssl_lock_count; |
38 |
static GStaticMutex *ssl_locks; |
40 |
static GStaticMutex *ssl_locks; |
39 |
static gboolean randfile_loaded; |
|
|
40 |
|
41 |
|
41 |
static void |
42 |
static void |
42 |
ssl_locking_callback(int mode, int type, const char *file, int line) |
43 |
ssl_locking_callback(int mode, int type, const char *file, int line) |
Lines 83-88
crypto_deinit_threading(void)
Link Here
|
83 |
} |
84 |
} |
84 |
g_free(ssl_locks); |
85 |
g_free(ssl_locks); |
85 |
} |
86 |
} |
|
|
87 |
#endif |
86 |
|
88 |
|
87 |
void |
89 |
void |
88 |
crypto_deinit(void) |
90 |
crypto_deinit(void) |
Lines 95-110
crypto_deinit(void)
Link Here
|
95 |
if (rnd_file[0]) |
97 |
if (rnd_file[0]) |
96 |
RAND_write_file(rnd_file); |
98 |
RAND_write_file(rnd_file); |
97 |
} |
99 |
} |
|
|
100 |
#if OPENSSL_VERSION_NUMBER < 0x10100000L |
98 |
crypto_deinit_threading(); |
101 |
crypto_deinit_threading(); |
|
|
102 |
#endif |
99 |
} |
103 |
} |
100 |
|
104 |
|
101 |
static void |
105 |
static void |
102 |
crypto_init(void) |
106 |
crypto_init(void) |
103 |
{ |
107 |
{ |
|
|
108 |
#if OPENSSL_VERSION_NUMBER < 0x10100000L |
104 |
SSL_library_init(); |
109 |
SSL_library_init(); |
105 |
SSL_load_error_strings(); |
110 |
SSL_load_error_strings(); |
106 |
OpenSSL_add_all_algorithms(); |
111 |
OpenSSL_add_all_algorithms(); |
107 |
crypto_init_threading(); |
112 |
crypto_init_threading(); |
|
|
113 |
#endif |
108 |
|
114 |
|
109 |
if (RAND_status() < 0 || getenv("RANDFILE")) |
115 |
if (RAND_status() < 0 || getenv("RANDFILE")) |
110 |
{ |
116 |
{ |