Lines Matching refs:translation
156 const struct translation_st *translation,
159 const struct translation_st *translation,
290 const struct translation_st *translation, in default_check() argument
297 if (!ossl_assert(translation != NULL)) { in default_check()
301 if (!ossl_assert(translation->param_key != 0) in default_check()
302 || !ossl_assert(translation->param_data_type != 0)) { in default_check()
314 if (translation != NULL) { in default_check()
315 if (!ossl_assert(translation->action_type != GET)) { in default_check()
319 if (!ossl_assert(translation->param_key != NULL) in default_check()
320 || !ossl_assert(translation->param_data_type != 0)) { in default_check()
328 if (!ossl_assert(translation != NULL)) { in default_check()
332 if (!ossl_assert(translation->ctrl_num != 0) in default_check()
333 || !ossl_assert(translation->param_data_type != 0)) { in default_check()
385 const struct translation_st *translation, in default_fixup_args() argument
390 if ((ret = default_check(state, translation, ctx)) <= 0) in default_fixup_args()
418 if (translation->optype != 0) { in default_fixup_args()
444 switch (translation->param_data_type) { in default_fixup_args()
446 *ctx->params = OSSL_PARAM_construct_int(translation->param_key, in default_fixup_args()
471 OSSL_PARAM_construct_BN(translation->param_key, in default_fixup_args()
487 OSSL_PARAM_construct_uint(translation->param_key, in default_fixup_args()
493 OSSL_PARAM_construct_utf8_string(translation->param_key, in default_fixup_args()
498 OSSL_PARAM_construct_utf8_ptr(translation->param_key, in default_fixup_args()
503 OSSL_PARAM_construct_octet_string(translation->param_key, in default_fixup_args()
508 OSSL_PARAM_construct_octet_ptr(translation->param_key, in default_fixup_args()
520 switch (translation->param_data_type) { in default_fixup_args()
558 if (translation != NULL) { in default_fixup_args()
559 tmp_ctrl_str = ctx->ctrl_str = translation->param_key; in default_fixup_args()
617 switch (translation->param_data_type) { in default_fixup_args()
647 translation->param_data_type); in default_fixup_args()
653 unsigned int param_data_type = translation->param_data_type; in default_fixup_args()
660 if (!ossl_assert(translation->fixup_args != NULL)) { in default_fixup_args()
693 translation->param_data_type); in default_fixup_args()
697 if (translation->param_data_type == OSSL_PARAM_OCTET_PTR) in default_fixup_args()
709 const struct translation_st *translation, in cleanup_translation_ctx() argument
743 const struct translation_st *translation, in fix_cipher_md() argument
751 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_cipher_md()
780 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_cipher_md()
800 const struct translation_st *translation, in fix_cipher() argument
803 return fix_cipher_md(state, translation, ctx, in fix_cipher()
808 const struct translation_st *translation, in fix_md() argument
811 return fix_cipher_md(state, translation, ctx, in fix_md()
816 const struct translation_st *translation, in fix_distid_len() argument
819 int ret = default_fixup_args(state, translation, ctx); in fix_distid_len()
838 const struct translation_st *translation, in fix_kdf_type() argument
851 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_kdf_type()
880 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_kdf_type()
898 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_kdf_type()
922 const struct translation_st *translation, in fix_dh_kdf_type() argument
931 return fix_kdf_type(state, translation, ctx, kdf_type_map); in fix_dh_kdf_type()
936 const struct translation_st *translation, in fix_ec_kdf_type() argument
945 return fix_kdf_type(state, translation, ctx, kdf_type_map); in fix_ec_kdf_type()
950 const struct translation_st *translation, in fix_oid() argument
955 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_oid()
973 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_oid()
993 const struct translation_st *translation, in fix_dh_nid() argument
998 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_dh_nid()
1014 return default_fixup_args(state, translation, ctx); in fix_dh_nid()
1019 const struct translation_st *translation, in fix_dh_nid5114() argument
1024 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_dh_nid5114()
1058 return default_fixup_args(state, translation, ctx); in fix_dh_nid5114()
1063 const struct translation_st *translation, in fix_dh_paramgen_type() argument
1068 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_dh_paramgen_type()
1084 return default_fixup_args(state, translation, ctx); in fix_dh_paramgen_type()
1089 const struct translation_st *translation, in fix_ec_param_enc() argument
1094 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_ec_param_enc()
1116 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_ec_param_enc()
1137 const struct translation_st *translation, in fix_ec_paramgen_curve_nid() argument
1143 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_ec_paramgen_curve_nid()
1167 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_ec_paramgen_curve_nid()
1180 const struct translation_st *translation, in fix_ecdh_cofactor() argument
1215 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_ecdh_cofactor()
1225 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_ecdh_cofactor()
1247 const struct translation_st *translation, in fix_rsa_padding_mode() argument
1262 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_rsa_padding_mode()
1298 ctx->params[0] = OSSL_PARAM_construct_int(translation->param_key, in fix_rsa_padding_mode()
1341 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_rsa_padding_mode()
1372 const struct translation_st *translation, in fix_rsa_pss_saltlen() argument
1382 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_rsa_pss_saltlen()
1420 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_rsa_pss_saltlen()
1452 const struct translation_st *translation, in fix_hkdf_mode() argument
1462 if ((ret = default_check(state, translation, ctx)) <= 0) in fix_hkdf_mode()
1479 if ((ret = default_fixup_args(state, translation, ctx)) <= 0) in fix_hkdf_mode()
1513 const struct translation_st *translation, in get_payload_group_name() argument
1562 return default_fixup_args(state, translation, ctx); in get_payload_group_name()
1566 const struct translation_st *translation, in get_payload_private_key() argument
1599 return default_fixup_args(state, translation, ctx); in get_payload_private_key()
1603 const struct translation_st *translation, in get_payload_public_key() argument
1660 ret = default_fixup_args(state, translation, ctx); in get_payload_public_key()
1666 const struct translation_st *translation, in get_payload_public_key_ec() argument
1713 ret = default_fixup_args(state, translation, ctx); in get_payload_public_key_ec()
1724 const struct translation_st *translation, in get_payload_bn() argument
1733 return default_fixup_args(state, translation, ctx); in get_payload_bn()
1737 const struct translation_st *translation, in get_dh_dsa_payload_p() argument
1758 return get_payload_bn(state, translation, ctx, bn); in get_dh_dsa_payload_p()
1762 const struct translation_st *translation, in get_dh_dsa_payload_q() argument
1780 return get_payload_bn(state, translation, ctx, bn); in get_dh_dsa_payload_q()
1784 const struct translation_st *translation, in get_dh_dsa_payload_g() argument
1802 return get_payload_bn(state, translation, ctx, bn); in get_dh_dsa_payload_g()
1806 const struct translation_st *translation, in get_payload_int() argument
1815 return default_fixup_args(state, translation, ctx); in get_payload_int()
1819 const struct translation_st *translation, in get_ec_decoded_from_explicit_params() argument
1840 return get_payload_int(state, translation, ctx, val); in get_ec_decoded_from_explicit_params()
1844 const struct translation_st *translation, in get_rsa_payload_n() argument
1854 return get_payload_bn(state, translation, ctx, bn); in get_rsa_payload_n()
1858 const struct translation_st *translation, in get_rsa_payload_e() argument
1868 return get_payload_bn(state, translation, ctx, bn); in get_rsa_payload_e()
1872 const struct translation_st *translation, in get_rsa_payload_d() argument
1882 return get_payload_bn(state, translation, ctx, bn); in get_rsa_payload_d()
1886 const struct translation_st *translation, in get_rsa_payload_factor() argument
1912 return get_payload_bn(state, translation, ctx, bn); in get_rsa_payload_factor()
1916 const struct translation_st *translation, in get_rsa_payload_exponent() argument
1942 return get_payload_bn(state, translation, ctx, bn); in get_rsa_payload_exponent()
1946 const struct translation_st *translation, in get_rsa_payload_coefficient() argument
1969 return get_payload_bn(state, translation, ctx, bn); in get_rsa_payload_coefficient()
1975 const struct translation_st *translation, \
1981 return get_rsa_payload_factor(state, translation, ctx, n - 1); \
1987 const struct translation_st *translation, \
1993 return get_rsa_payload_exponent(state, translation, ctx, \
2000 const struct translation_st *translation, \
2006 return get_rsa_payload_coefficient(state, translation, ctx, \
2041 const struct translation_st *translation, in fix_group_ecx() argument
2713 const struct translation_st *translation = NULL; in evp_pkey_ctx_ctrl_to_param() local
2723 translation = lookup_evp_pkey_ctx_translation(&tmpl); in evp_pkey_ctx_ctrl_to_param()
2725 if (translation == NULL) { in evp_pkey_ctx_ctrl_to_param()
2731 && pctx->pmeth->pkey_id != translation->keytype1 in evp_pkey_ctx_ctrl_to_param()
2732 && pctx->pmeth->pkey_id != translation->keytype2) in evp_pkey_ctx_ctrl_to_param()
2735 if (translation->fixup_args != NULL) in evp_pkey_ctx_ctrl_to_param()
2736 fixup = translation->fixup_args; in evp_pkey_ctx_ctrl_to_param()
2737 ctx.action_type = translation->action_type; in evp_pkey_ctx_ctrl_to_param()
2744 ret = fixup(PRE_CTRL_TO_PARAMS, translation, &ctx); in evp_pkey_ctx_ctrl_to_param()
2766 fixup(POST_CTRL_TO_PARAMS, translation, &ctx); in evp_pkey_ctx_ctrl_to_param()
2770 cleanup_translation_ctx(POST_CTRL_TO_PARAMS, translation, &ctx); in evp_pkey_ctx_ctrl_to_param()
2781 const struct translation_st *translation = NULL; in evp_pkey_ctx_ctrl_str_to_param() local
2793 translation = lookup_evp_pkey_ctx_translation(&tmpl); in evp_pkey_ctx_ctrl_str_to_param()
2795 if (translation != NULL) { in evp_pkey_ctx_ctrl_str_to_param()
2796 if (translation->fixup_args != NULL) in evp_pkey_ctx_ctrl_str_to_param()
2797 fixup = translation->fixup_args; in evp_pkey_ctx_ctrl_str_to_param()
2798 ctx.action_type = translation->action_type; in evp_pkey_ctx_ctrl_str_to_param()
2810 ret = fixup(PRE_CTRL_STR_TO_PARAMS, translation, &ctx); in evp_pkey_ctx_ctrl_str_to_param()
2830 ret = fixup(POST_CTRL_STR_TO_PARAMS, translation, &ctx); in evp_pkey_ctx_ctrl_str_to_param()
2832 cleanup_translation_ctx(CLEANUP_CTRL_STR_TO_PARAMS, translation, &ctx); in evp_pkey_ctx_ctrl_str_to_param()
2848 const struct translation_st *translation = NULL; in evp_pkey_ctx_setget_params_to_ctrl() local
2856 translation = lookup_evp_pkey_ctx_translation(&tmpl); in evp_pkey_ctx_setget_params_to_ctrl()
2858 if (translation != NULL) { in evp_pkey_ctx_setget_params_to_ctrl()
2859 if (translation->fixup_args != NULL) in evp_pkey_ctx_setget_params_to_ctrl()
2860 fixup = translation->fixup_args; in evp_pkey_ctx_setget_params_to_ctrl()
2861 ctx.ctrl_cmd = translation->ctrl_num; in evp_pkey_ctx_setget_params_to_ctrl()
2866 ret = fixup(PRE_PARAMS_TO_CTRL, translation, &ctx); in evp_pkey_ctx_setget_params_to_ctrl()
2884 fixup(POST_PARAMS_TO_CTRL, translation, &ctx); in evp_pkey_ctx_setget_params_to_ctrl()
2888 cleanup_translation_ctx(CLEANUP_PARAMS_TO_CTRL, translation, &ctx); in evp_pkey_ctx_setget_params_to_ctrl()
2916 const struct translation_st *translation = NULL; in evp_pkey_setget_params_to_ctrl() local
2921 translation = lookup_evp_pkey_translation(&tmpl); in evp_pkey_setget_params_to_ctrl()
2923 if (translation != NULL) { in evp_pkey_setget_params_to_ctrl()
2924 if (translation->fixup_args != NULL) in evp_pkey_setget_params_to_ctrl()
2925 fixup = translation->fixup_args; in evp_pkey_setget_params_to_ctrl()
2926 ctx.action_type = translation->action_type; in evp_pkey_setget_params_to_ctrl()
2936 if (!ossl_assert(translation != NULL) in evp_pkey_setget_params_to_ctrl()
2937 || !ossl_assert(translation->action_type == GET) in evp_pkey_setget_params_to_ctrl()
2938 || !ossl_assert(translation->fixup_args != NULL)) { in evp_pkey_setget_params_to_ctrl()
2942 ret = fixup(PKEY, translation, &ctx); in evp_pkey_setget_params_to_ctrl()
2944 cleanup_translation_ctx(PKEY, translation, &ctx); in evp_pkey_setget_params_to_ctrl()