Fixed AR identities in mutual TNC measurements case

This commit is contained in:
Andreas Steffen 2015-08-15 22:46:21 +02:00
parent df085a158a
commit a330f72ecf
3 changed files with 11 additions and 2 deletions

View File

@ -335,6 +335,10 @@ static eap_tnc_t *eap_tnc_create(identification_t *server,
free(this);
return NULL;
}
if (!is_server)
{
tnccs->set_auth_type(tnccs, TNC_AUTH_X509_CERT);
}
this->tnccs = tnccs->get_ref(tnccs);
this->tls_eap = tls_eap_create(type, &tnccs->tls,
EAP_TNC_MAX_MESSAGE_LEN,

View File

@ -450,6 +450,7 @@ METHOD(pt_tls_client_t, run_assessment, status_t,
{
return FAILED;
}
tnccs->set_auth_type(tnccs, TNC_AUTH_X509_CERT);
DBG1(DBG_TNC, "entering PT-TLS data transport phase");
if (!assess(this, (tls_t*)tnccs))

View File

@ -729,7 +729,9 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
list = linked_list_create();
tnccs = entry->tnccs;
peer_id = tnccs->tls.get_peer_id(&tnccs->tls);
peer_id = tnccs->tls.is_server(&tnccs->tls) ?
tnccs->tls.get_peer_id(&tnccs->tls) :
tnccs->tls.get_server_id(&tnccs->tls);
if (peer_id)
{
switch (peer_id->get_type(peer_id))
@ -771,7 +773,9 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
}
}
peer_ip = tnccs->get_peer_ip(tnccs);
peer_ip = tnccs->tls.is_server(&tnccs->tls) ?
tnccs->get_peer_ip(tnccs) :
tnccs->get_server_ip(tnccs);
if (peer_ip)
{
switch (peer_ip->get_family(peer_ip))