Started implementing handling of DH Nonce attributes
This commit is contained in:
committed by
Andreas Steffen
parent
8a55b83319
commit
d83bcc310d
@@ -62,6 +62,11 @@ static pts_dh_group_t supported_dh_groups = PTS_DH_GROUP_NONE;
|
||||
*/
|
||||
static linked_list_t *evidences = NULL;
|
||||
|
||||
/**
|
||||
* Supported PTS Diffie Hellman Groups
|
||||
*/
|
||||
static pts_dh_group_t supported_dh_groups = 0;
|
||||
|
||||
/**
|
||||
* see section 3.7.1 of TCG TNC IF-IMC Specification 1.2
|
||||
*/
|
||||
@@ -80,6 +85,10 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
if (!pts_probe_dh_groups(&supported_dh_groups))
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
imc_attestation = imc_agent_create(imc_name, IMC_VENDOR_ID, IMC_SUBTYPE,
|
||||
imc_id, actual_version);
|
||||
if (!imc_attestation)
|
||||
|
||||
@@ -57,6 +57,11 @@ static pts_meas_algorithms_t supported_algorithms = PTS_MEAS_ALGO_NONE;
|
||||
*/
|
||||
static pts_dh_group_t supported_dh_groups = PTS_DH_GROUP_NONE;
|
||||
|
||||
/**
|
||||
* Supported PTS Diffie Hellman Groups
|
||||
*/
|
||||
static pts_dh_group_t supported_dh_groups = 0;
|
||||
|
||||
/**
|
||||
* PTS file measurement database
|
||||
*/
|
||||
@@ -92,6 +97,10 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
if (!pts_probe_dh_groups(&supported_dh_groups))
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
imv_attestation = imv_agent_create(imv_name, IMV_VENDOR_ID, IMV_SUBTYPE,
|
||||
imv_id, actual_version);
|
||||
if (!imv_attestation)
|
||||
@@ -118,6 +127,24 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify supported PTS Diffie Hellman Groups
|
||||
*
|
||||
* ike2: PTS_DH_GROUP_IKE2
|
||||
* ike5: PTS_DH_GROUP_IKE2 | PTS_DH_GROUP_IKE5
|
||||
* ike14: PTS_DH_GROUP_IKE2 | PTS_DH_GROUP_IKE5 | PTS_DH_GROUP_IKE14
|
||||
* ike19: PTS_DH_GROUP_IKE2 | PTS_DH_GROUP_IKE5 | PTS_DH_GROUP_IKE14 | PTS_DH_GROUP_IKE19
|
||||
* ike20: PTS_DH_GROUP_IKE2 | PTS_DH_GROUP_IKE5 | PTS_DH_GROUP_IKE14 | PTS_DH_GROUP_IKE19 | PTS_DH_GROUP_IKE20
|
||||
*
|
||||
* we expect the PTS-IMC to select the strongest supported group
|
||||
*/
|
||||
dh_group = lib->settings->get_str(lib->settings,
|
||||
"libimcv.plugins.imv-attestation.dh_group", "ike19");
|
||||
if (!pts_update_supported_dh_groups(dh_group, &supported_dh_groups))
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
|
||||
/* create a PTS credential manager */
|
||||
pts_credmgr = credential_manager_create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user