diff options
author | Richard Levitte <levitte@openssl.org> | 2016-07-07 23:55:34 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-07-25 17:33:41 +0200 |
commit | 3067095e8a2cca3d33fa0af77788bc45da68b76b (patch) | |
tree | d51b3bec5c0b3e2073946a92cb2f87a30bb474ec /crypto/x509 | |
parent | c1b4fa6ded697235a48ffb78c8145d08df8a8513 (diff) |
Add X509_STORE lock and unlock functions
Since there are a number of function pointers in X509_STORE that might
lead to user code, it makes sense for them to be able to lock the
store while they do their work.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_lu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 337482dee3..6f5f269232 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -40,6 +40,16 @@ void X509_LOOKUP_free(X509_LOOKUP *ctx) OPENSSL_free(ctx); } +int X509_STORE_lock(X509_STORE *s) +{ + return CRYPTO_THREAD_write_lock(s->lock); +} + +int X509_STORE_unlock(X509_STORE *s) +{ + return CRYPTO_THREAD_unlock(s->lock); +} + int X509_LOOKUP_init(X509_LOOKUP *ctx) { if (ctx->method == NULL) |