summaryrefslogtreecommitdiffstats
path: root/crypto/store
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-02-14 10:28:08 +0100
committerRichard Levitte <levitte@openssl.org>2018-02-14 20:11:06 +0100
commit4fd39122e51c3c44fcb72fb9b732d5008efda399 (patch)
treec4ea8034f09040ac86ae4ddf7a3b75ec6313c18a /crypto/store
parent87e17dc550318a7217dbb521603f0b096dff1764 (diff)
OSSL_STORE: Add OSSL_STORE_vctrl()
It's a convenient complement to OSSL_STORE_ctrl() Suggested by Norm Green Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5363)
Diffstat (limited to 'crypto/store')
-rw-r--r--crypto/store/store_lib.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index 2cc247d12e..24876a3f40 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -109,16 +109,22 @@ OSSL_STORE_CTX *OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method,
int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, ...)
{
va_list args;
- int ret = 0;
+ int ret;
va_start(args, cmd);
- if (ctx->loader->ctrl != NULL)
- ret = ctx->loader->ctrl(ctx->loader_ctx, cmd, args);
+ ret = OSSL_STORE_vctrl(ctx, cmd, args);
va_end(args);
return ret;
}
+int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, va_list args)
+{
+ if (ctx->loader->ctrl != NULL)
+ return ctx->loader->ctrl(ctx->loader_ctx, cmd, args);
+ return 0;
+}
+
OSSL_STORE_INFO *OSSL_STORE_load(OSSL_STORE_CTX *ctx)
{
OSSL_STORE_INFO *v = NULL;