Lines Matching refs:p2

84  *                              the passed |p2| in whatever way necessary,
134 * the passed |p1| and |p2| in whatever way
181 * used. In this case, the (string) value is always passed as |p2|.
191 void *p2;
192 /* a size, for passing back the |p2| size where applicable */
204 * needs to manipulate |p2| but wants to remember original.
221 * value of |p1| or |p2| (ctrls are really bi-directional, but are
347 * data between p1+p2 (SET) or return value+p2 (GET) as long as the values
356 * PRE_CTRL_TO_PARAMS, SET | GET - |p1| and |p2| are converted to an
360 * a BIGNUM passed as |p2| is accepted.
364 * |p2| is set to the string.
367 * PRE_CTRL_STR_TO_PARAMS, SET - |p2| is taken as a string, and is
373 * |p1| and |p2| according to the
376 * if |p2| is non-NULL, then |*p2|
379 * POST_PARAMS_TO_CTRL, GET - |p1| and |p2| are converted to
404 * result back to |*p2| and the return value.
451 * BIGNUMs are passed via |p2|. For all ctrl's that just want
452 * to pass a simple integer via |p1|, |p2| is expected to be
458 if (ctx->p2 != NULL) {
460 ctx->buflen = BN_num_bytes(ctx->p2);
466 if (BN_bn2nativepad(ctx->p2,
496 ctx->p2, (size_t)ctx->p1);
501 ctx->p2, (size_t)ctx->p1);
506 ctx->p2, (size_t)ctx->p1);
511 ctx->p2, (size_t)ctx->p1);
544 const char *orig_value = ctx->p2;
577 ctx->p2, strlen(ctx->p2),
599 * |p1| and |p2|, and POST_PARAMS_TO_CTRL is responsible for bringing
600 * the EVP_PKEY_CTX_ctrl() return value (passed as |p1|) and |p2| back
604 * for the related fixup_args functions to just set |p1| and |p2|
618 /* When setting, we populate |p1| and |p2| from |*params| */
623 if (ctx->p2 != NULL) {
624 /* BIGNUM passed down with p2 */
625 if (!OSSL_PARAM_get_BN(ctx->params, ctx->p2))
636 ctx->p2, ctx->sz);
639 ctx->p2, ctx->sz,
643 ctx->p2, &ctx->sz);
668 /* When getting, we populate |*params| from |p1| and |p2| */
673 if (ctx->p2 != NULL) {
675 return OSSL_PARAM_set_BN(ctx->params, ctx->p2);
683 return OSSL_PARAM_set_utf8_string(ctx->params, ctx->p2);
685 return OSSL_PARAM_set_octet_string(ctx->params, ctx->p2,
688 return OSSL_PARAM_set_octet_ptr(ctx->params, ctx->p2,
755 * |ctx->p2| contains the address to an EVP_CIPHER or EVP_MD pointer
756 * to be filled in. We need to remember it, then make |ctx->p2|
761 ctx->orig_p2 = ctx->p2;
762 ctx->p2 = ctx->name_buf;
768 * EVP_CIPHER pointer as p2...
770 ctx->p2 = (char *)(ctx->p2 == NULL
772 : get_name(ctx->p2));
773 ctx->p1 = strlen(ctx->p2);
775 ctx->p2 = (ctx->p2 == NULL ? "" : (char *)get_name(ctx->p2));
776 ctx->p1 = strlen(ctx->p2);
788 (void *)get_algo_by_name(ctx->pctx->libctx, ctx->p2);
791 ctx->p2 = (void *)get_algo_by_name(ctx->pctx->libctx, ctx->p2);
824 *(size_t *)ctx->p2 = ctx->sz;
845 * supposed to place the current kdf type in |p2|, and if not, |p1|
871 ctx->p2 = ctx->name_buf;
888 ctx->p2 = (char *)kdf_type_map->kdf_type_str;
894 ctx->p1 = strlen(ctx->p2);
906 if (OPENSSL_strcasecmp(ctx->p2, kdf_type_map->kdf_type_str) == 0) {
911 ctx->p2 = NULL;
962 * Either way, |ctx->p2| points at an ASN1_OBJECT, and needs to have
967 OBJ_obj2txt(ctx->name_buf, sizeof(ctx->name_buf), ctx->p2, 0);
968 ctx->p2 = (char *)ctx->name_buf;
981 * in |ctx->p2|, all we need to do now is to replace that with the
984 ctx->p2 = (ASN1_OBJECT *)OBJ_txt2obj(ctx->p2, 0);
1005 if ((ctx->p2 = (char *)ossl_ffc_named_group_get_name
1032 if ((ctx->p2 = (char *)ossl_ffc_named_group_get_name
1042 if (ctx->p2 == NULL)
1044 if ((ctx->p2 = (char *)ossl_ffc_named_group_get_name
1045 (ossl_ffc_uid_to_dh_named_group(atoi(ctx->p2)))) == NULL) {
1075 if ((ctx->p2 = (char *)ossl_dh_gen_type_id2name(atoi(ctx->p2)))
1080 ctx->p1 = strlen(ctx->p2);
1103 ctx->p2 = OSSL_PKEY_EC_ENCODING_EXPLICIT;
1106 ctx->p2 = OSSL_PKEY_EC_ENCODING_GROUP;
1119 if (strcmp(ctx->p2, OSSL_PKEY_EC_ENCODING_EXPLICIT) == 0)
1121 else if (strcmp(ctx->p2, OSSL_PKEY_EC_ENCODING_GROUP) == 0)
1125 ctx->p2 = NULL;
1139 char *p2 = NULL;
1150 ctx->p2 = (char *)OBJ_nid2sn(ctx->p1);
1161 p2 = ctx->name_buf;
1162 ctx->p2 = &p2;
1170 ctx->p1 = OBJ_sn2nid(p2);
1171 ctx->p2 = NULL;
1186 * supposed to place the current cofactor mode in |ctx->p2|, and if not,
1265 * this particular ctrl treats p2 as the address for the int to be
1266 * returned. We must therefore remember |ctx->p2|, then make
1267 * |ctx->p2| point at a buffer to be filled in with the name, and
1272 ctx->orig_p2 = ctx->p2;
1273 ctx->p2 = ctx->name_buf;
1332 ctx->p2 = str_value_map[i].ptr;
1333 ctx->p1 = strlen(ctx->p2);
1344 if (strcmp(ctx->p2, str_value_map[i].ptr) == 0)
1359 ctx->p2 = NULL;
1383 * in the int pointed at by p2. This is potentially as weird as
1387 * In any case, we must therefore remember |ctx->p2|, then make
1388 * |ctx->p2| point at a buffer to be filled in with the name, and
1393 ctx->orig_p2 = ctx->p2;
1394 ctx->p2 = ctx->name_buf;
1411 ctx->p2 = ctx->name_buf;
1412 ctx->p1 = strlen(ctx->p2);
1424 if (strcmp(ctx->p2, str_value_map[i].ptr) == 0)
1428 val = i == OSSL_NELEM(str_value_map) ? atoi(ctx->p2)
1439 ctx->p2 = NULL;
1470 ctx->p2 = str_value_map[i].ptr;
1471 ctx->p1 = strlen(ctx->p2);
1482 if (strcmp(ctx->p2, str_value_map[i].ptr) == 0)
1491 ctx->p2 = NULL;
1511 EVP_PKEY *pkey = ctx->p2;
1513 ctx->p2 = NULL;
1525 ctx->p2 = (char *)ossl_ffc_named_group_get_name(dh_group);
1540 ctx->p2 = (char *)OSSL_EC_curve_nid2name(nid);
1553 if (ctx->p2 == NULL)
1556 ctx->p1 = strlen(ctx->p2);
1564 EVP_PKEY *pkey = ctx->p2;
1566 ctx->p2 = NULL;
1576 ctx->p2 = (BIGNUM *)DH_get0_priv_key(dh);
1585 ctx->p2 = (BIGNUM *)EC_KEY_get0_private_key(ec);
1601 EVP_PKEY *pkey = ctx->p2;
1605 ctx->p2 = NULL;
1613 ctx->p2 = buf;
1616 ctx->p2 = (void *)DH_get0_pub_key(EVP_PKEY_get0_DH(pkey));
1626 ctx->p2 = (void *)DSA_get0_pub_key(EVP_PKEY_get0_DSA(pkey));
1644 ctx->p2 = buf;
1668 ctx->p2 = (BIGNUM *)bn;
1678 EVP_PKEY *pkey = ctx->p2;
1704 switch (EVP_PKEY_get_base_id(ctx->p2)) {
1707 bn = DH_get0_q(EVP_PKEY_get0_DH(ctx->p2));
1712 bn = DSA_get0_q(EVP_PKEY_get0_DSA(ctx->p2));
1726 switch (EVP_PKEY_get_base_id(ctx->p2)) {
1729 bn = DH_get0_g(EVP_PKEY_get0_DH(ctx->p2));
1734 bn = DSA_get0_g(EVP_PKEY_get0_DSA(ctx->p2));
1750 ctx->p2 = NULL;
1760 EVP_PKEY *pkey = ctx->p2;
1786 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA)
1788 bn = RSA_get0_n(EVP_PKEY_get0_RSA(ctx->p2));
1799 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA)
1801 bn = RSA_get0_e(EVP_PKEY_get0_RSA(ctx->p2));
1812 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA)
1814 bn = RSA_get0_d(EVP_PKEY_get0_RSA(ctx->p2));
1824 const RSA *r = EVP_PKEY_get0_RSA(ctx->p2);
1854 const RSA *r = EVP_PKEY_get0_RSA(ctx->p2);
1884 const RSA *r = EVP_PKEY_get0_RSA(ctx->p2);
1912 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) \
1923 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) \
1935 if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) \
2376 * expect to get the EVP_PKEY pointer through |ctx->p2|.
2628 int cmd, int p1, void *p2)
2659 ctx.p2 = p2;
2725 ctx.p2 = (char *)value;
2790 ctx.ctrl_cmd, ctx.p1, ctx.p2);
2842 ctx.p2 = (void *)pkey;