For example, add the following to the r_phase_items.c sample:
R_PKEY *pk = NULL;
R_ITEM pkX, pkY;
R_ITEM p1;
...
// after R_CR_key_exchange_phase_1(obj2, p1_buf2, &p1_len2)
if ((ret = r_phase_items_create_params(bio_err, pkey_ctx, R_PKEY_TYPE_ECC,
&pk)) != R_ERROR_NONE)
{
BIO_printf(bio_err, "Unable to create parameters\n");
goto end;
}
p1.data = p1_buf1;
p1.len = p1_len1;
if ((ret = R_PKEY_set_info(pk, R_PKEY_INFO_ID_EC_PUB_KEY, &p1)) != R_ERROR_NONE)
{
BIO_printf(bio_err, "Unable to set public key\n");
goto end;
}
if ((ret = R_PKEY_get_info(pk, R_PKEY_INFO_ID_EC_PUB_KEY_X, &pkX)) != R_ERROR_NONE)
{
BIO_printf(bio_err, "Unable to get X-ordinate\n");
goto end;
}
BIO_printf(bio_out, "OBJECT 1 X-ORDINATE:\n");
BIO_dump(bio_out, pkX.data, pkX.len);
if ((ret = R_PKEY_get_info(pk, R_PKEY_INFO_ID_EC_PUB_KEY_Y, &pkY)) != R_ERROR_NONE)
{
BIO_printf(bio_err, "Unable to get Y-ordinate\n");
goto end;
}
BIO_printf(bio_out, "OBJECT 1 Y-ORDINATE:\n");
BIO_dump(bio_out, pkY.data, pkY.len);
Related Articles
Error 'Failed to parse P12 file: status = 1795' when retrieving key 15Number of Views KeyNotFound exception when retrieving auto-generated key 7Number of Views 'java.lang.IllegalArgumentException' when retrieving a key 24Number of Views What is the originator info? 35Number of Views Fine grained role review with sign-off option and maintain action for all items of the role is generating a CR and the CR … 37Number of Views
Trending Articles
How a Multi-App Entitlement Collector (MAEDC) resolves entitlement relationships with accounts and groups collected by a M… RSA Governance & Lifecycle 8.0 Patch 10 Release Notes RSA SecurID software token .sdtid file fails to import into RSA SecurID Software Token 5.0 for Windows User Event Monitor Messages for Cloud Access Service (20601 - 38000) How to test RSA Identity Router (IDR) Secure Connector connectivity to the RSA ID Plus Cloud Access Service