Remove another lock from e_chil
authorMatt Caswell <matt@openssl.org>
Wed, 9 Mar 2016 01:07:26 +0000 (01:07 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 9 Mar 2016 10:04:27 +0000 (11:04 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
engines/e_chil.c

index c6ae800069f3444ac1b809ec9798bb9559b1a613..a748e59686ee63d5b016656051c2e7c8cb9e1509 100644 (file)
@@ -870,14 +870,14 @@ static EVP_PKEY *hwcrhk_load_pubkey(ENGINE *eng, const char *key_id,
             {
                 RSA *rsa = NULL;
 
-                CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY);
+                CRYPTO_THREAD_write_lock(chil_lock);
                 rsa = res->pkey.rsa;
                 res->pkey.rsa = RSA_new();
                 res->pkey.rsa->n = rsa->n;
                 res->pkey.rsa->e = rsa->e;
                 rsa->n = NULL;
                 rsa->e = NULL;
-                CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
+                CRYPTO_THREAD_unlock(chil_lock);
                 RSA_free(rsa);
             }
             break;