From: Pauli Date: Mon, 22 Feb 2021 23:51:10 +0000 (+1000) Subject: prov: update RNGs to support modified gettable/settable CTX params X-Git-Tag: openssl-3.0.0-alpha13~171 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3f091fddd1f5349a14f3874d0e3a6d77cba9865;p=thirdparty%2Fopenssl.git prov: update RNGs to support modified gettable/settable CTX params Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14240) --- diff --git a/providers/implementations/rands/drbg_ctr.c b/providers/implementations/rands/drbg_ctr.c index e10b4378b54..066775aa523 100644 --- a/providers/implementations/rands/drbg_ctr.c +++ b/providers/implementations/rands/drbg_ctr.c @@ -648,7 +648,8 @@ static int drbg_ctr_get_ctx_params(void *vdrbg, OSSL_PARAM params[]) return ossl_drbg_get_ctx_params(drbg, params); } -static const OSSL_PARAM *drbg_ctr_gettable_ctx_params(ossl_unused void *provctx) +static const OSSL_PARAM *drbg_ctr_gettable_ctx_params(ossl_unused void *vctx, + ossl_unused void *provctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_CIPHER, NULL, 0), @@ -718,7 +719,8 @@ static int drbg_ctr_set_ctx_params(void *vctx, const OSSL_PARAM params[]) return ossl_drbg_set_ctx_params(ctx, params); } -static const OSSL_PARAM *drbg_ctr_settable_ctx_params(ossl_unused void *provctx) +static const OSSL_PARAM *drbg_ctr_settable_ctx_params(ossl_unused void *vctx, + ossl_unused void *provctx) { static const OSSL_PARAM known_settable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0), diff --git a/providers/implementations/rands/drbg_hash.c b/providers/implementations/rands/drbg_hash.c index a181b8f97e7..c89b0cd5c3f 100644 --- a/providers/implementations/rands/drbg_hash.c +++ b/providers/implementations/rands/drbg_hash.c @@ -442,7 +442,8 @@ static int drbg_hash_get_ctx_params(void *vdrbg, OSSL_PARAM params[]) return ossl_drbg_get_ctx_params(drbg, params); } -static const OSSL_PARAM *drbg_hash_gettable_ctx_params(ossl_unused void *p_ctx) +static const OSSL_PARAM *drbg_hash_gettable_ctx_params(ossl_unused void *vctx, + ossl_unused void *p_ctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_DIGEST, NULL, 0), @@ -487,7 +488,8 @@ static int drbg_hash_set_ctx_params(void *vctx, const OSSL_PARAM params[]) return ossl_drbg_set_ctx_params(ctx, params); } -static const OSSL_PARAM *drbg_hash_settable_ctx_params(ossl_unused void *p_ctx) +static const OSSL_PARAM *drbg_hash_settable_ctx_params(ossl_unused void *vctx, + ossl_unused void *p_ctx) { static const OSSL_PARAM known_settable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0), diff --git a/providers/implementations/rands/drbg_hmac.c b/providers/implementations/rands/drbg_hmac.c index 16c5ae87115..5f193fa57c8 100644 --- a/providers/implementations/rands/drbg_hmac.c +++ b/providers/implementations/rands/drbg_hmac.c @@ -349,7 +349,8 @@ static int drbg_hmac_get_ctx_params(void *vdrbg, OSSL_PARAM params[]) return ossl_drbg_get_ctx_params(drbg, params); } -static const OSSL_PARAM *drbg_hmac_gettable_ctx_params(ossl_unused void *p_ctx) +static const OSSL_PARAM *drbg_hmac_gettable_ctx_params(ossl_unused void *vctx, + ossl_unused void *p_ctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_MAC, NULL, 0), @@ -400,7 +401,8 @@ static int drbg_hmac_set_ctx_params(void *vctx, const OSSL_PARAM params[]) return ossl_drbg_set_ctx_params(ctx, params); } -static const OSSL_PARAM *drbg_hmac_settable_ctx_params(ossl_unused void *p_ctx) +static const OSSL_PARAM *drbg_hmac_settable_ctx_params(ossl_unused void *vctx, + ossl_unused void *p_ctx) { static const OSSL_PARAM known_settable_ctx_params[] = { OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0), diff --git a/providers/implementations/rands/seed_src.c b/providers/implementations/rands/seed_src.c index 06364b9074b..b87aa0c6cdf 100644 --- a/providers/implementations/rands/seed_src.c +++ b/providers/implementations/rands/seed_src.c @@ -156,7 +156,8 @@ static int seed_src_get_ctx_params(void *vseed, OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *seed_src_gettable_ctx_params(ossl_unused void *provctx) +static const OSSL_PARAM *seed_src_gettable_ctx_params(ossl_unused void *vseed, + ossl_unused void *provctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL), diff --git a/providers/implementations/rands/test_rng.c b/providers/implementations/rands/test_rng.c index a1b847ee78b..d28f7e09374 100644 --- a/providers/implementations/rands/test_rng.c +++ b/providers/implementations/rands/test_rng.c @@ -163,7 +163,8 @@ static int test_rng_get_ctx_params(void *vtest, OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *test_rng_gettable_ctx_params(ossl_unused void *provctx) +static const OSSL_PARAM *test_rng_gettable_ctx_params(ossl_unused void *vtest, + ossl_unused void *provctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL), @@ -212,7 +213,8 @@ static int test_rng_set_ctx_params(void *vtest, const OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *test_rng_settable_ctx_params(ossl_unused void *provctx) +static const OSSL_PARAM *test_rng_settable_ctx_params(ossl_unused void *vtest, + ossl_unused void *provctx) { static const OSSL_PARAM known_settable_ctx_params[] = { OSSL_PARAM_octet_string(OSSL_RAND_PARAM_TEST_ENTROPY, NULL, 0),