Lines Matching defs:translation

48  * |translation|        The translation item, to be pilfered for data as
50 * |ctx| The translation context, which contains copies of
156 const struct translation_st *translation,
159 const struct translation_st *translation,
175 * For ctrl to params translation, the actual ctrl command number used.
176 * For params to ctrl translation, 0.
180 * For ctrl_str to params translation, the actual ctrl command string
182 * For params to ctrl translation, this is NULL. Along with it is also
184 * translation item.
242 * Lookup and translation attributes
252 * In that case the treatment of the translation item relies entirely on
290 const struct translation_st *translation,
297 if (!ossl_assert(translation != NULL)) {
301 if (!ossl_assert(translation->param_key != 0)
302 || !ossl_assert(translation->param_data_type != 0)) {
309 * For ctrl_str to params translation, we allow direct use of
311 * we end up with |translation == NULL|, which is fine. The fixup
314 if (translation != NULL) {
315 if (!ossl_assert(translation->action_type != GET)) {
319 if (!ossl_assert(translation->param_key != NULL)
320 || !ossl_assert(translation->param_data_type != 0)) {
328 if (!ossl_assert(translation != NULL)) {
332 if (!ossl_assert(translation->ctrl_num != 0)
333 || !ossl_assert(translation->param_data_type != 0)) {
345 * diverse attributes in the translation item. It covers all "standard"
371 * |translation|.
374 * data type given in |translation|
385 const struct translation_st *translation,
390 if ((ret = default_check(state, translation, ctx)) <= 0)
407 /* This is ctrl to params translation, so we need an OSSL_PARAM key */
418 if (translation->optype != 0) {
444 switch (translation->param_data_type) {
446 *ctx->params = OSSL_PARAM_construct_int(translation->param_key,
473 OSSL_PARAM_construct_BN(translation->param_key,
489 OSSL_PARAM_construct_uint(translation->param_key,
495 OSSL_PARAM_construct_utf8_string(translation->param_key,
500 OSSL_PARAM_construct_utf8_ptr(translation->param_key,
505 OSSL_PARAM_construct_octet_string(translation->param_key,
510 OSSL_PARAM_construct_octet_ptr(translation->param_key,
522 switch (translation->param_data_type) {
541 /* This is ctrl_str to params translation */
557 * If no translation exists, we simply pass the control string
560 if (translation != NULL) {
561 tmp_ctrl_str = ctx->ctrl_str = translation->param_key;
614 /* This is params to ctrl translation */
619 switch (translation->param_data_type) {
649 translation->param_data_type);
655 unsigned int param_data_type = translation->param_data_type;
662 if (!ossl_assert(translation->fixup_args != NULL)) {
695 translation->param_data_type);
708 const struct translation_st *translation,
742 const struct translation_st *translation,
750 if ((ret = default_check(state, translation, ctx)) <= 0)
779 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
799 const struct translation_st *translation,
802 return fix_cipher_md(state, translation, ctx,
807 const struct translation_st *translation,
810 return fix_cipher_md(state, translation, ctx,
815 const struct translation_st *translation,
818 int ret = default_fixup_args(state, translation, ctx);
837 const struct translation_st *translation,
850 if ((ret = default_check(state, translation, ctx)) <= 0)
879 if ((ret = default_check(state, translation, ctx)) <= 0)
897 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
921 const struct translation_st *translation,
930 return fix_kdf_type(state, translation, ctx, kdf_type_map);
935 const struct translation_st *translation,
944 return fix_kdf_type(state, translation, ctx, kdf_type_map);
949 const struct translation_st *translation,
954 if ((ret = default_check(state, translation, ctx)) <= 0)
972 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
992 const struct translation_st *translation,
997 if ((ret = default_check(state, translation, ctx)) <= 0)
1013 return default_fixup_args(state, translation, ctx);
1018 const struct translation_st *translation,
1023 if ((ret = default_check(state, translation, ctx)) <= 0)
1057 return default_fixup_args(state, translation, ctx);
1062 const struct translation_st *translation,
1067 if ((ret = default_check(state, translation, ctx)) <= 0)
1083 return default_fixup_args(state, translation, ctx);
1088 const struct translation_st *translation,
1093 if ((ret = default_check(state, translation, ctx)) <= 0)
1115 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
1136 const struct translation_st *translation,
1142 if ((ret = default_check(state, translation, ctx)) <= 0)
1166 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
1179 const struct translation_st *translation,
1194 * evp_pkey_ctrl_to_params() takes it from the translation item.
1212 if ((ret = default_check(state, translation, ctx)) <= 0)
1222 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
1242 const struct translation_st *translation,
1257 if ((ret = default_check(state, translation, ctx)) <= 0)
1293 ctx->params[0] = OSSL_PARAM_construct_int(translation->param_key,
1336 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
1367 const struct translation_st *translation,
1377 if ((ret = default_check(state, translation, ctx)) <= 0)
1415 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
1447 const struct translation_st *translation,
1457 if ((ret = default_check(state, translation, ctx)) <= 0)
1474 if ((ret = default_fixup_args(state, translation, ctx)) <= 0)
1508 const struct translation_st *translation,
1557 return default_fixup_args(state, translation, ctx);
1561 const struct translation_st *translation,
1594 return default_fixup_args(state, translation, ctx);
1598 const struct translation_st *translation,
1655 ret = default_fixup_args(state, translation, ctx);
1661 const struct translation_st *translation,
1670 return default_fixup_args(state, translation, ctx);
1674 const struct translation_st *translation,
1695 return get_payload_bn(state, translation, ctx, bn);
1699 const struct translation_st *translation,
1717 return get_payload_bn(state, translation, ctx, bn);
1721 const struct translation_st *translation,
1739 return get_payload_bn(state, translation, ctx, bn);
1743 const struct translation_st *translation,
1752 return default_fixup_args(state, translation, ctx);
1756 const struct translation_st *translation,
1777 return get_payload_int(state, translation, ctx, val);
1781 const struct translation_st *translation,
1790 return get_payload_bn(state, translation, ctx, bn);
1794 const struct translation_st *translation,
1803 return get_payload_bn(state, translation, ctx, bn);
1807 const struct translation_st *translation,
1816 return get_payload_bn(state, translation, ctx, bn);
1820 const struct translation_st *translation,
1846 return get_payload_bn(state, translation, ctx, bn);
1850 const struct translation_st *translation,
1876 return get_payload_bn(state, translation, ctx, bn);
1880 const struct translation_st *translation,
1903 return get_payload_bn(state, translation, ctx, bn);
1909 const struct translation_st *translation, \
1914 return get_rsa_payload_factor(state, translation, ctx, n - 1); \
1920 const struct translation_st *translation, \
1925 return get_rsa_payload_exponent(state, translation, ctx, \
1932 const struct translation_st *translation, \
1937 return get_rsa_payload_coefficient(state, translation, ctx, \
1972 const struct translation_st *translation,
1998 * The translation table itself
2249 * expectation for any translation item where |ctrl_str| is NULL and
2517 * Sanity check the translation table item.
2632 const struct translation_st *translation = NULL;
2642 translation = lookup_evp_pkey_ctx_translation(&tmpl);
2644 if (translation == NULL) {
2650 && pctx->pmeth->pkey_id != translation->keytype1
2651 && pctx->pmeth->pkey_id != translation->keytype2)
2654 if (translation->fixup_args != NULL)
2655 fixup = translation->fixup_args;
2656 ctx.action_type = translation->action_type;
2663 ret = fixup(PRE_CTRL_TO_PARAMS, translation, &ctx);
2685 fixup(POST_CTRL_TO_PARAMS, translation, &ctx);
2689 cleanup_translation_ctx(POST_CTRL_TO_PARAMS, translation, &ctx);
2700 const struct translation_st *translation = NULL;
2712 translation = lookup_evp_pkey_ctx_translation(&tmpl);
2714 if (translation != NULL) {
2715 if (translation->fixup_args != NULL)
2716 fixup = translation->fixup_args;
2717 ctx.action_type = translation->action_type;
2729 ret = fixup(PRE_CTRL_STR_TO_PARAMS, translation, &ctx);
2749 ret = fixup(POST_CTRL_STR_TO_PARAMS, translation, &ctx);
2751 cleanup_translation_ctx(CLEANUP_CTRL_STR_TO_PARAMS, translation, &ctx);
2767 const struct translation_st *translation = NULL;
2775 translation = lookup_evp_pkey_ctx_translation(&tmpl);
2777 if (translation != NULL) {
2778 if (translation->fixup_args != NULL)
2779 fixup = translation->fixup_args;
2780 ctx.action_type = translation->action_type;
2781 ctx.ctrl_cmd = translation->ctrl_num;
2786 ret = fixup(PRE_PARAMS_TO_CTRL, translation, &ctx);
2798 fixup(POST_PARAMS_TO_CTRL, translation, &ctx);
2802 cleanup_translation_ctx(CLEANUP_PARAMS_TO_CTRL, translation, &ctx);
2830 const struct translation_st *translation = NULL;
2835 translation = lookup_evp_pkey_translation(&tmpl);
2837 if (translation != NULL) {
2838 if (translation->fixup_args != NULL)
2839 fixup = translation->fixup_args;
2840 ctx.action_type = translation->action_type;
2850 if (!ossl_assert(translation != NULL)
2851 || !ossl_assert(translation->action_type == GET)
2852 || !ossl_assert(translation->fixup_args != NULL)) {
2856 ret = fixup(PKEY, translation, &ctx);
2858 cleanup_translation_ctx(PKEY, translation, &ctx);