diff options
author | Bodo Möller <bodo@openssl.org> | 2010-02-19 18:27:07 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2010-02-19 18:27:07 +0000 |
commit | a8397553295bca838e082b959b4b8efe5d3b1256 (patch) | |
tree | 84e4019d0cd8ad2785fb47771f597503a71eb49a /crypto/x509/by_dir.c | |
parent | 69582a592eb7cbd91af87e03b2be67e82fe0a1eb (diff) | |
download | openssl-a8397553295bca838e082b959b4b8efe5d3b1256.tar.gz |
Fix X509_STORE locking
Diffstat (limited to 'crypto/x509/by_dir.c')
-rw-r--r-- | crypto/x509/by_dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 170cd89608..27ca5150c1 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -420,11 +420,11 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, /* we have added it to the cache so now pull * it out again */ - CRYPTO_r_lock(CRYPTO_LOCK_X509_STORE); + CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); j = sk_X509_OBJECT_find(xl->store_ctx->objs,&stmp); if(j != -1) tmp=sk_X509_OBJECT_value(xl->store_ctx->objs,j); else tmp = NULL; - CRYPTO_r_unlock(CRYPTO_LOCK_X509_STORE); + CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); /* If a CRL, update the last file suffix added for this */ @@ -480,4 +480,3 @@ finish: if (b != NULL) BUF_MEM_free(b); return(ok); } - |