define pen_type_t as a vendor-specific type
This commit is contained in:
@@ -214,6 +214,7 @@ static TNC_Result receive_message(TNC_IMVID imv_id,
|
||||
{
|
||||
pa_tnc_msg_t *pa_tnc_msg;
|
||||
pa_tnc_attr_t *attr;
|
||||
pen_type_t type;
|
||||
linked_list_t *attr_list;
|
||||
imv_state_t *state;
|
||||
imv_attestation_state_t *attestation_state;
|
||||
@@ -255,31 +256,31 @@ static TNC_Result receive_message(TNC_IMVID imv_id,
|
||||
enumerator = pa_tnc_msg->create_attribute_enumerator(pa_tnc_msg);
|
||||
while (enumerator->enumerate(enumerator, &attr))
|
||||
{
|
||||
if (attr->get_vendor_id(attr) == PEN_IETF)
|
||||
type = attr->get_type(attr);
|
||||
|
||||
if (type.vendor_id == PEN_IETF)
|
||||
{
|
||||
if (attr->get_type(attr) == IETF_ATTR_PA_TNC_ERROR)
|
||||
if (type.type == IETF_ATTR_PA_TNC_ERROR)
|
||||
{
|
||||
ietf_attr_pa_tnc_error_t *error_attr;
|
||||
pen_t error_vendor_id;
|
||||
pa_tnc_error_code_t error_code;
|
||||
pen_type_t error_code;
|
||||
chunk_t msg_info;
|
||||
|
||||
error_attr = (ietf_attr_pa_tnc_error_t*)attr;
|
||||
error_vendor_id = error_attr->get_vendor_id(error_attr);
|
||||
error_code = error_attr->get_error_code(error_attr);
|
||||
|
||||
if (error_vendor_id == PEN_TCG)
|
||||
if (error_code.vendor_id == PEN_TCG)
|
||||
{
|
||||
error_code = error_attr->get_error_code(error_attr);
|
||||
msg_info = error_attr->get_msg_info(error_attr);
|
||||
|
||||
DBG1(DBG_IMV, "received TCG-PTS error '%N'",
|
||||
pts_error_code_names, error_code);
|
||||
pts_error_code_names, error_code.type);
|
||||
DBG1(DBG_IMV, "error information: %B", &msg_info);
|
||||
|
||||
result = TNC_RESULT_FATAL;
|
||||
}
|
||||
}
|
||||
else if (attr->get_type(attr) == IETF_ATTR_PRODUCT_INFORMATION)
|
||||
else if (type.type == IETF_ATTR_PRODUCT_INFORMATION)
|
||||
{
|
||||
ietf_attr_product_info_t *attr_cast;
|
||||
char *platform_info;
|
||||
@@ -289,7 +290,7 @@ static TNC_Result receive_message(TNC_IMVID imv_id,
|
||||
pts->set_platform_info(pts, platform_info);
|
||||
}
|
||||
}
|
||||
else if (attr->get_vendor_id(attr) == PEN_TCG)
|
||||
else if (type.vendor_id == PEN_TCG)
|
||||
{
|
||||
if (!imv_attestation_process(attr, attr_list, attestation_state,
|
||||
supported_algorithms,supported_dh_groups, pts_db, pts_credmgr))
|
||||
|
||||
@@ -41,11 +41,13 @@ bool imv_attestation_process(pa_tnc_attr_t *attr, linked_list_t *attr_list,
|
||||
pts_database_t *pts_db,
|
||||
credential_manager_t *pts_credmgr)
|
||||
{
|
||||
pen_type_t attr_type;
|
||||
pts_t *pts;
|
||||
|
||||
|
||||
pts = attestation_state->get_pts(attestation_state);
|
||||
attr_type = attr->get_type(attr);
|
||||
|
||||
switch (attr->get_type(attr))
|
||||
switch (attr_type.type)
|
||||
{
|
||||
case TCG_PTS_PROTO_CAPS:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user