The branch master has been updated via 4fd39122e51c3c44fcb72fb9b732d5008efda399 (commit) from 87e17dc550318a7217dbb521603f0b096dff1764 (commit)
- Log ----------------------------------------------------------------- commit 4fd39122e51c3c44fcb72fb9b732d5008efda399 Author: Richard Levitte <levi...@openssl.org> Date: Wed Feb 14 10:28:08 2018 +0100 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.pie...@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5363) ----------------------------------------------------------------------- Summary of changes: crypto/store/store_lib.c | 12 +++++++++--- include/openssl/store.h | 1 + util/libcrypto.num | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index 2cc247d..24876a3 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; diff --git a/include/openssl/store.h b/include/openssl/store.h index 8ec2edc..ff42953 100644 --- a/include/openssl/store.h +++ b/include/openssl/store.h @@ -58,6 +58,7 @@ OSSL_STORE_CTX *OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, * Each command takes different arguments. */ int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, ... /* args */); +int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, va_list args); /* * Common ctrl commands that different loaders may choose to support. diff --git a/util/libcrypto.num b/util/libcrypto.num index c7be540..c4384e6 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -4505,3 +4505,4 @@ RAND_DRBG_lock 4446 1_1_1 EXIST::FUNCTION: RAND_DRBG_unlock 4447 1_1_1 EXIST::FUNCTION: RAND_DRBG_enable_locking 4448 1_1_1 EXIST::FUNCTION: RAND_DRBG_secure_new 4449 1_1_1 EXIST::FUNCTION: +OSSL_STORE_vctrl 4450 1_1_1 EXIST::FUNCTION: _____ openssl-commits mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits