diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-02-26 18:02:36 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-03-03 11:25:39 +0100 |
commit | fb67126ea8a1a9fadb9b60641d84808fc123cd9d (patch) | |
tree | bff46e01abd2dabca35123e422bcbc797a6ef484 /providers/implementations/keymgmt | |
parent | 4e4ae84056133c863860e27ceedae8bd3fb0a402 (diff) |
EVP_PKEY_CTX_get/settable_params: pass provider operation context
This allows making the signature operations return different
settable params when the context is initialized with
EVP_DigestSign/VerifyInit.
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14338)
Diffstat (limited to 'providers/implementations/keymgmt')
-rw-r--r-- | providers/implementations/keymgmt/dh_kmgmt.c | 3 | ||||
-rw-r--r-- | providers/implementations/keymgmt/dsa_kmgmt.c | 3 | ||||
-rw-r--r-- | providers/implementations/keymgmt/ec_kmgmt.c | 3 | ||||
-rw-r--r-- | providers/implementations/keymgmt/ecx_kmgmt.c | 3 | ||||
-rw-r--r-- | providers/implementations/keymgmt/mac_legacy_kmgmt.c | 6 | ||||
-rw-r--r-- | providers/implementations/keymgmt/rsa_kmgmt.c | 6 |
6 files changed, 16 insertions, 8 deletions
diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c index 9b1679e4fa..5731b73418 100644 --- a/providers/implementations/keymgmt/dh_kmgmt.c +++ b/providers/implementations/keymgmt/dh_kmgmt.c @@ -558,7 +558,8 @@ static int dh_gen_set_params(void *genctx, const OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *dh_gen_settable_params(void *provctx) +static const OSSL_PARAM *dh_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { OSSL_PARAM_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME, NULL, 0), diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c index 18313aa329..92ab579b66 100644 --- a/providers/implementations/keymgmt/dsa_kmgmt.c +++ b/providers/implementations/keymgmt/dsa_kmgmt.c @@ -476,7 +476,8 @@ static int dsa_gen_set_params(void *genctx, const OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *dsa_gen_settable_params(void *provctx) +static const OSSL_PARAM *dsa_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { OSSL_PARAM_utf8_string(OSSL_PKEY_PARAM_FFC_TYPE, NULL, 0), diff --git a/providers/implementations/keymgmt/ec_kmgmt.c b/providers/implementations/keymgmt/ec_kmgmt.c index 6a74196600..92521b66ec 100644 --- a/providers/implementations/keymgmt/ec_kmgmt.c +++ b/providers/implementations/keymgmt/ec_kmgmt.c @@ -1121,7 +1121,8 @@ err: return ret; } -static const OSSL_PARAM *ec_gen_settable_params(void *provctx) +static const OSSL_PARAM *ec_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { OSSL_PARAM_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME, NULL, 0), diff --git a/providers/implementations/keymgmt/ecx_kmgmt.c b/providers/implementations/keymgmt/ecx_kmgmt.c index 6cb0e9bc41..0adfd01173 100644 --- a/providers/implementations/keymgmt/ecx_kmgmt.c +++ b/providers/implementations/keymgmt/ecx_kmgmt.c @@ -529,7 +529,8 @@ static int ecx_gen_set_params(void *genctx, const OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *ecx_gen_settable_params(void *provctx) +static const OSSL_PARAM *ecx_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { OSSL_PARAM_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME, NULL, 0), diff --git a/providers/implementations/keymgmt/mac_legacy_kmgmt.c b/providers/implementations/keymgmt/mac_legacy_kmgmt.c index 77efe145d9..9d98d32fb2 100644 --- a/providers/implementations/keymgmt/mac_legacy_kmgmt.c +++ b/providers/implementations/keymgmt/mac_legacy_kmgmt.c @@ -428,7 +428,8 @@ static int cmac_gen_set_params(void *genctx, const OSSL_PARAM params[]) return 1; } -static const OSSL_PARAM *mac_gen_settable_params(void *provctx) +static const OSSL_PARAM *mac_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { OSSL_PARAM_octet_string(OSSL_PKEY_PARAM_PRIV_KEY, NULL, 0), @@ -437,7 +438,8 @@ static const OSSL_PARAM *mac_gen_settable_params(void *provctx) return settable; } -static const OSSL_PARAM *cmac_gen_settable_params(void *provctx) +static const OSSL_PARAM *cmac_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { OSSL_PARAM_octet_string(OSSL_PKEY_PARAM_PRIV_KEY, NULL, 0), diff --git a/providers/implementations/keymgmt/rsa_kmgmt.c b/providers/implementations/keymgmt/rsa_kmgmt.c index 0d3782e830..ac8443a739 100644 --- a/providers/implementations/keymgmt/rsa_kmgmt.c +++ b/providers/implementations/keymgmt/rsa_kmgmt.c @@ -502,7 +502,8 @@ static int rsa_gen_set_params(void *genctx, const OSSL_PARAM params[]) OSSL_PARAM_utf8_string(OSSL_PKEY_PARAM_RSA_MGF1_DIGEST, NULL, 0), \ OSSL_PARAM_int(OSSL_PKEY_PARAM_RSA_PSS_SALTLEN, NULL) -static const OSSL_PARAM *rsa_gen_settable_params(void *provctx) +static const OSSL_PARAM *rsa_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { rsa_gen_basic, @@ -512,7 +513,8 @@ static const OSSL_PARAM *rsa_gen_settable_params(void *provctx) return settable; } -static const OSSL_PARAM *rsapss_gen_settable_params(void *provctx) +static const OSSL_PARAM *rsapss_gen_settable_params(ossl_unused void *genctx, + ossl_unused void *provctx) { static OSSL_PARAM settable[] = { rsa_gen_basic, |