diff options
author | Todd Short <tshort@akamai.com> | 2015-03-31 16:20:03 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-11-01 15:39:57 -0400 |
commit | b50052dbe822271c9d7b2559a38a127fca87e4ab (patch) | |
tree | a557500eda3d5302e4dd6000b3194d3a963cd920 /ssl/ssl_lib.c | |
parent | ba7407002d899b614d4728da9004594f947ff3da (diff) |
Add SSL_CTX_set1_cert_store()
For convenience, combine getting a new ref for the new SSL_CTX
with assigning the store and freeing the old one.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1755)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index bd0fbf8101..8bf872beec 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3553,6 +3553,13 @@ void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) ctx->cert_store = store; } +void SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store) +{ + if (store != NULL) + X509_STORE_up_ref(store); + SSL_CTX_set_cert_store(ctx, store); +} + int SSL_want(const SSL *s) { return (s->rwstate); |