Lines Matching refs:p2
191 void *p2; member
458 if (ctx->p2 != NULL) { in default_fixup_args()
460 ctx->buflen = BN_num_bytes(ctx->p2); in default_fixup_args()
464 if (BN_bn2nativepad(ctx->p2, in default_fixup_args()
494 ctx->p2, (size_t)ctx->p1); in default_fixup_args()
499 ctx->p2, (size_t)ctx->p1); in default_fixup_args()
504 ctx->p2, (size_t)ctx->p1); in default_fixup_args()
509 ctx->p2, (size_t)ctx->p1); in default_fixup_args()
542 const char *orig_value = ctx->p2; in default_fixup_args()
575 ctx->p2, strlen(ctx->p2), in default_fixup_args()
621 if (ctx->p2 != NULL) { in default_fixup_args()
623 if (!OSSL_PARAM_get_BN(ctx->params, ctx->p2)) in default_fixup_args()
634 ctx->p2, ctx->sz); in default_fixup_args()
637 &ctx->p2, ctx->sz, in default_fixup_args()
641 ctx->p2, &ctx->sz); in default_fixup_args()
671 if (ctx->p2 != NULL) { in default_fixup_args()
673 return OSSL_PARAM_set_BN(ctx->params, ctx->p2); in default_fixup_args()
681 return OSSL_PARAM_set_utf8_string(ctx->params, ctx->p2); in default_fixup_args()
683 return OSSL_PARAM_set_octet_string(ctx->params, ctx->p2, in default_fixup_args()
686 return OSSL_PARAM_set_octet_ptr(ctx->params, *(void **)ctx->p2, in default_fixup_args()
698 ctx->p2 = &ctx->bufp; in default_fixup_args()
762 ctx->orig_p2 = ctx->p2; in fix_cipher_md()
763 ctx->p2 = ctx->name_buf; in fix_cipher_md()
771 ctx->p2 = (char *)(ctx->p2 == NULL in fix_cipher_md()
773 : get_name(ctx->p2)); in fix_cipher_md()
774 ctx->p1 = strlen(ctx->p2); in fix_cipher_md()
776 ctx->p2 = (ctx->p2 == NULL ? "" : (char *)get_name(ctx->p2)); in fix_cipher_md()
777 ctx->p1 = strlen(ctx->p2); in fix_cipher_md()
789 (void *)get_algo_by_name(ctx->pctx->libctx, ctx->p2); in fix_cipher_md()
792 ctx->p2 = (void *)get_algo_by_name(ctx->pctx->libctx, ctx->p2); in fix_cipher_md()
825 *(size_t *)ctx->p2 = ctx->sz; in fix_distid_len()
872 ctx->p2 = ctx->name_buf; in fix_kdf_type()
889 ctx->p2 = (char *)kdf_type_map->kdf_type_str; in fix_kdf_type()
895 ctx->p1 = strlen(ctx->p2); in fix_kdf_type()
907 if (OPENSSL_strcasecmp(ctx->p2, kdf_type_map->kdf_type_str) == 0) { in fix_kdf_type()
912 ctx->p2 = NULL; in fix_kdf_type()
968 OBJ_obj2txt(ctx->name_buf, sizeof(ctx->name_buf), ctx->p2, 0); in fix_oid()
969 ctx->p2 = (char *)ctx->name_buf; in fix_oid()
985 ctx->p2 = (ASN1_OBJECT *)OBJ_txt2obj(ctx->p2, 0); in fix_oid()
1006 if ((ctx->p2 = (char *)ossl_ffc_named_group_get_name in fix_dh_nid()
1033 if ((ctx->p2 = (char *)ossl_ffc_named_group_get_name in fix_dh_nid5114()
1043 if (ctx->p2 == NULL) in fix_dh_nid5114()
1045 if ((ctx->p2 = (char *)ossl_ffc_named_group_get_name in fix_dh_nid5114()
1046 (ossl_ffc_uid_to_dh_named_group(atoi(ctx->p2)))) == NULL) { in fix_dh_nid5114()
1076 if ((ctx->p2 = (char *)ossl_dh_gen_type_id2name(atoi(ctx->p2))) in fix_dh_paramgen_type()
1081 ctx->p1 = strlen(ctx->p2); in fix_dh_paramgen_type()
1104 ctx->p2 = OSSL_PKEY_EC_ENCODING_EXPLICIT; in fix_ec_param_enc()
1107 ctx->p2 = OSSL_PKEY_EC_ENCODING_GROUP; in fix_ec_param_enc()
1120 if (strcmp(ctx->p2, OSSL_PKEY_EC_ENCODING_EXPLICIT) == 0) in fix_ec_param_enc()
1122 else if (strcmp(ctx->p2, OSSL_PKEY_EC_ENCODING_GROUP) == 0) in fix_ec_param_enc()
1126 ctx->p2 = NULL; in fix_ec_param_enc()
1140 char *p2 = NULL; in fix_ec_paramgen_curve_nid() local
1151 ctx->p2 = (char *)OBJ_nid2sn(ctx->p1); in fix_ec_paramgen_curve_nid()
1162 p2 = ctx->name_buf; in fix_ec_paramgen_curve_nid()
1163 ctx->p2 = &p2; in fix_ec_paramgen_curve_nid()
1171 ctx->p1 = OBJ_sn2nid(p2); in fix_ec_paramgen_curve_nid()
1172 ctx->p2 = NULL; in fix_ec_paramgen_curve_nid()
1277 ctx->orig_p2 = ctx->p2; in fix_rsa_padding_mode()
1278 ctx->p2 = ctx->name_buf; in fix_rsa_padding_mode()
1337 ctx->p2 = str_value_map[i].ptr; in fix_rsa_padding_mode()
1338 ctx->p1 = strlen(ctx->p2); in fix_rsa_padding_mode()
1349 if (strcmp(ctx->p2, str_value_map[i].ptr) == 0) in fix_rsa_padding_mode()
1364 ctx->p2 = NULL; in fix_rsa_padding_mode()
1398 ctx->orig_p2 = ctx->p2; in fix_rsa_pss_saltlen()
1399 ctx->p2 = ctx->name_buf; in fix_rsa_pss_saltlen()
1416 ctx->p2 = ctx->name_buf; in fix_rsa_pss_saltlen()
1417 ctx->p1 = strlen(ctx->p2); in fix_rsa_pss_saltlen()
1429 if (strcmp(ctx->p2, str_value_map[i].ptr) == 0) in fix_rsa_pss_saltlen()
1433 val = i == OSSL_NELEM(str_value_map) ? atoi(ctx->p2) in fix_rsa_pss_saltlen()
1444 ctx->p2 = NULL; in fix_rsa_pss_saltlen()
1475 ctx->p2 = str_value_map[i].ptr; in fix_hkdf_mode()
1476 ctx->p1 = strlen(ctx->p2); in fix_hkdf_mode()
1487 if (strcmp(ctx->p2, str_value_map[i].ptr) == 0) in fix_hkdf_mode()
1496 ctx->p2 = NULL; in fix_hkdf_mode()
1516 EVP_PKEY *pkey = ctx->p2; in get_payload_group_name()
1518 ctx->p2 = NULL; in get_payload_group_name()
1530 ctx->p2 = (char *)ossl_ffc_named_group_get_name(dh_group); in get_payload_group_name()
1545 ctx->p2 = (char *)OSSL_EC_curve_nid2name(nid); in get_payload_group_name()
1558 if (ctx->p2 == NULL) in get_payload_group_name()
1561 ctx->p1 = strlen(ctx->p2); in get_payload_group_name()
1569 EVP_PKEY *pkey = ctx->p2; in get_payload_private_key()
1571 ctx->p2 = NULL; in get_payload_private_key()
1581 ctx->p2 = (BIGNUM *)DH_get0_priv_key(dh); in get_payload_private_key()
1590 ctx->p2 = (BIGNUM *)EC_KEY_get0_private_key(ec); in get_payload_private_key()
1606 EVP_PKEY *pkey = ctx->p2; in get_payload_public_key()
1610 ctx->p2 = NULL; in get_payload_public_key()
1618 ctx->p2 = buf; in get_payload_public_key()
1621 ctx->p2 = (void *)DH_get0_pub_key(EVP_PKEY_get0_DH(pkey)); in get_payload_public_key()
1631 ctx->p2 = (void *)DSA_get0_pub_key(EVP_PKEY_get0_DSA(pkey)); in get_payload_public_key()
1649 ctx->p2 = buf; in get_payload_public_key()
1670 EVP_PKEY *pkey = ctx->p2; in get_payload_public_key_ec()
1679 ctx->p2 = NULL; in get_payload_public_key_ec()
1706 ctx->p2 = x; in get_payload_public_key_ec()
1708 ctx->p2 = y; in get_payload_public_key_ec()
1731 ctx->p2 = (BIGNUM *)bn; in get_payload_bn()
1741 EVP_PKEY *pkey = ctx->p2; in get_dh_dsa_payload_p()
1767 switch (EVP_PKEY_get_base_id(ctx->p2)) { in get_dh_dsa_payload_q()
1770 bn = DH_get0_q(EVP_PKEY_get0_DH(ctx->p2)); in get_dh_dsa_payload_q()
1775 bn = DSA_get0_q(EVP_PKEY_get0_DSA(ctx->p2)); in get_dh_dsa_payload_q()
1789 switch (EVP_PKEY_get_base_id(ctx->p2)) { in get_dh_dsa_payload_g()
1792 bn = DH_get0_g(EVP_PKEY_get0_DH(ctx->p2)); in get_dh_dsa_payload_g()
1797 bn = DSA_get0_g(EVP_PKEY_get0_DSA(ctx->p2)); in get_dh_dsa_payload_g()
1813 ctx->p2 = NULL; in get_payload_int()
1823 EVP_PKEY *pkey = ctx->p2; in get_ec_decoded_from_explicit_params()
1849 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA in get_rsa_payload_n()
1850 && EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA_PSS) in get_rsa_payload_n()
1852 bn = RSA_get0_n(EVP_PKEY_get0_RSA(ctx->p2)); in get_rsa_payload_n()
1863 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA in get_rsa_payload_e()
1864 && EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA_PSS) in get_rsa_payload_e()
1866 bn = RSA_get0_e(EVP_PKEY_get0_RSA(ctx->p2)); in get_rsa_payload_e()
1877 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA in get_rsa_payload_d()
1878 && EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA_PSS) in get_rsa_payload_d()
1880 bn = RSA_get0_d(EVP_PKEY_get0_RSA(ctx->p2)); in get_rsa_payload_d()
1890 const RSA *r = EVP_PKEY_get0_RSA(ctx->p2); in get_rsa_payload_factor()
1920 const RSA *r = EVP_PKEY_get0_RSA(ctx->p2); in get_rsa_payload_exponent()
1950 const RSA *r = EVP_PKEY_get0_RSA(ctx->p2); in get_rsa_payload_coefficient()
1978 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA \
1979 && EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA_PSS) \
1990 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA \
1991 && EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA_PSS) \
2003 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA \
2004 && EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA_PSS) \
2709 int cmd, int p1, void *p2) in evp_pkey_ctx_ctrl_to_param() argument
2740 ctx.p2 = p2; in evp_pkey_ctx_ctrl_to_param()
2806 ctx.p2 = (char *)value; in evp_pkey_ctx_ctrl_str_to_param()
2870 ctx.ctrl_cmd, ctx.p1, ctx.p2); in evp_pkey_ctx_setget_params_to_ctrl()
2928 ctx.p2 = (void *)pkey; in evp_pkey_setget_params_to_ctrl()