diff options
author | Linus Nordberg <linus@nordu.net> | 2016-08-31 16:21:34 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-08-31 16:21:34 +0200 |
commit | 0c5009cc0c9abd008b494e805ca74cecfc7d153c (patch) | |
tree | bfb66aa5b6ab16667a857b1cfd4b47c5cd6ab66b /radsecproxy.c | |
parent | 513ae6aa7bbb7df825503a7b2900676e9ee7ddd8 (diff) |
Remove openssl thread lock handling.
openssl-1.1 uses a new threading API which makes manual locking wrt
openssl not necessary.
Diffstat (limited to 'radsecproxy.c')
-rw-r--r-- | radsecproxy.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index c247d5c..e97feae 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -77,8 +77,6 @@ static struct list *clconfs, *srvconfs; static struct list *realms; static struct hash *rewriteconfs; -static pthread_mutex_t *ssl_locks = NULL; -static long *ssl_lock_count; extern int optind; extern char *optarg; static const struct protodefs *protodefs[RAD_PROTOCOUNT]; @@ -104,19 +102,6 @@ uint8_t protoname2int(const char *name) { return 255; } -/* callbacks for making OpenSSL thread safe */ -unsigned long ssl_thread_id() { - return (unsigned long)pthread_self(); -} - -void ssl_locking_callback(int mode, int type, const char *file, int line) { - if (mode & CRYPTO_LOCK) { - pthread_mutex_lock(&ssl_locks[type]); - ssl_lock_count[type]++; - } else - pthread_mutex_unlock(&ssl_locks[type]); -} - /* returns 1 if the len first bits are equal, else 0 */ int prefixmatch(void *a1, void *a2, uint8_t len) { static uint8_t mask[] = { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe }; @@ -2044,19 +2029,9 @@ void createlisteners(uint8_t type) { } void sslinit() { - int i; time_t t; pid_t pid; - ssl_locks = calloc(CRYPTO_num_locks(), sizeof(pthread_mutex_t)); - ssl_lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); - for (i = 0; i < CRYPTO_num_locks(); i++) { - ssl_lock_count[i] = 0; - pthread_mutex_init(&ssl_locks[i], NULL); - } - CRYPTO_set_id_callback(ssl_thread_id); - CRYPTO_set_locking_callback(ssl_locking_callback); - SSL_load_error_strings(); SSL_library_init(); |