struct sskdf_all_set_ctx_params_st {
OSSL_PARAM *secret;
- OSSL_PARAM *key;
OSSL_PARAM *propq;
OSSL_PARAM *engine;
OSSL_PARAM *digest;
r = ossl_param_get1_octet_string_from_param(p->secret, &ctx->secret,
&ctx->secret_len);
- if (r == -1)
- r = ossl_param_get1_octet_string_from_param(p->key, &ctx->secret,
- &ctx->secret_len);
if (r == 0)
return 0;
{- produce_param_decoder('sskdf_set_ctx_params',
(['KDF_PARAM_SECRET', 'secret', 'octet_string'],
- ['KDF_PARAM_KEY', 'key', 'octet_string'],
+ ['KDF_PARAM_KEY', 'secret', 'octet_string'],
['KDF_PARAM_INFO', 'info', 'octet_string', SSKDF_MAX_INFOS],
['KDF_PARAM_PROPERTIES', 'propq', 'utf8_string'],
['ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
return 0;
#ifdef FIPS_MODULE
- if (p.key != NULL || p.secret != NULL)
+ if (p.secret != NULL)
if (!fips_sskdf_key_check_passed(ctx))
return 0;
#endif
{- produce_param_decoder('x963kdf_set_ctx_params',
(['KDF_PARAM_SECRET', 'secret', 'octet_string'],
- ['KDF_PARAM_KEY', 'key', 'octet_string'],
+ ['KDF_PARAM_KEY', 'secret', 'octet_string'],
['KDF_PARAM_INFO', 'info', 'octet_string', SSKDF_MAX_INFOS],
['KDF_PARAM_PROPERTIES', 'propq', 'utf8_string'],
['ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
return 0;
}
- if (p.key != NULL || p.secret != NULL)
+ if (p.secret != NULL)
if (!fips_x963kdf_key_check_passed(ctx))
return 0;
#endif
['ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
['KDF_PARAM_DIGEST', 'digest', 'utf8_string'],
['KDF_PARAM_SECRET', 'secret', 'octet_string'],
- ['KDF_PARAM_KEY', 'key', 'octet_string'],
- ['KDF_PARAM_UKM', 'ukm', 'octet_string'],
+ ['KDF_PARAM_KEY', 'secret', 'octet_string'],
+ ['KDF_PARAM_UKM', 'uinfo', 'octet_string'],
['KDF_PARAM_X942_ACVPINFO', 'acvp', 'octet_string'],
['KDF_PARAM_X942_PARTYUINFO', 'uinfo', 'octet_string'],
['KDF_PARAM_X942_PARTYVINFO', 'vinfo', 'octet_string'],
static int x942kdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
struct sshkdf_set_ctx_params_st p;
- const OSSL_PARAM *pq;
KDF_X942 *ctx = vctx;
OSSL_LIB_CTX *provctx = PROV_LIBCTX_OF(ctx->provctx);
const char *cekalg, *propq = NULL;
}
}
- pq = p.secret == NULL ? p.key : p.secret;
- if (pq != NULL) {
- if (!x942kdf_set_buffer(&ctx->secret, &ctx->secret_len, pq))
+ if (p.secret != NULL) {
+ if (!x942kdf_set_buffer(&ctx->secret, &ctx->secret_len, p.secret))
return 0;
#ifdef FIPS_MODULE
if (!fips_x942kdf_key_check_passed(ctx))
&& !x942kdf_set_buffer(&ctx->acvpinfo, &ctx->acvpinfo_len, p.acvp))
return 0;
- pq = p.uinfo == NULL ? p.ukm : p.uinfo;
- if (pq != NULL
- && !x942kdf_set_buffer(&ctx->partyuinfo, &ctx->partyuinfo_len, pq))
+ if (p.uinfo != NULL
+ && !x942kdf_set_buffer(&ctx->partyuinfo, &ctx->partyuinfo_len, p.uinfo))
return 0;
if (p.vinfo != NULL