moved ar_id from imv_agent to imv_state
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2011-2012 Andreas Steffen
|
||||
* Copyright (C) 2011-2013 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -72,11 +72,6 @@ struct private_imv_agent_t {
|
||||
*/
|
||||
rwlock_t *connection_lock;
|
||||
|
||||
/**
|
||||
* Access Requestor ID
|
||||
*/
|
||||
identification_t *ar_id;
|
||||
|
||||
/**
|
||||
* Inform a TNCS about the set of message types the IMV is able to receive
|
||||
*
|
||||
@@ -449,6 +444,7 @@ METHOD(imv_agent_t, create_state, TNC_Result,
|
||||
pen_type_t id_type, subject_type, auth_type;
|
||||
int tcg_id_type, tcg_subject_type, tcg_auth_type;
|
||||
chunk_t id_value;
|
||||
identification_t *ar_id;
|
||||
id_type_t ike_type;
|
||||
|
||||
id_type = tnc_id->get_identity_type(tnc_id);
|
||||
@@ -492,10 +488,11 @@ METHOD(imv_agent_t, create_state, TNC_Result,
|
||||
break;
|
||||
}
|
||||
|
||||
this->ar_id = identification_create_from_encoding(ike_type, id_value);
|
||||
ar_id = identification_create_from_encoding(ike_type, id_value);
|
||||
DBG2(DBG_IMV, " %N AR identity '%Y' authenticated by %N",
|
||||
TNC_Subject_names, tcg_subject_type, this->ar_id,
|
||||
TNC_Subject_names, tcg_subject_type, ar_id,
|
||||
TNC_Authentication_names, tcg_auth_type);
|
||||
state->set_ar_id(state, ar_id);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
@@ -598,12 +595,6 @@ METHOD(imv_agent_t, get_id, TNC_IMVID,
|
||||
return this->id;
|
||||
}
|
||||
|
||||
METHOD(imv_agent_t, get_ar_id, identification_t*,
|
||||
private_imv_agent_t *this)
|
||||
{
|
||||
return this->ar_id;
|
||||
}
|
||||
|
||||
METHOD(imv_agent_t, reserve_additional_ids, TNC_Result,
|
||||
private_imv_agent_t *this, int count)
|
||||
{
|
||||
@@ -793,7 +784,6 @@ METHOD(imv_agent_t, destroy, void,
|
||||
private_imv_agent_t *this)
|
||||
{
|
||||
DBG1(DBG_IMV, "IMV %u \"%s\" terminated", this->id, this->name);
|
||||
DESTROY_IF(this->ar_id);
|
||||
this->additional_ids->destroy(this->additional_ids);
|
||||
this->connections->destroy_offset(this->connections,
|
||||
offsetof(imv_state_t, destroy));
|
||||
@@ -828,7 +818,6 @@ imv_agent_t *imv_agent_create(const char *name,
|
||||
.get_state = _get_state,
|
||||
.get_name = _get_name,
|
||||
.get_id = _get_id,
|
||||
.get_ar_id = _get_ar_id,
|
||||
.reserve_additional_ids = _reserve_additional_ids,
|
||||
.count_additional_ids = _count_additional_ids,
|
||||
.create_id_enumerator = _create_id_enumerator,
|
||||
|
||||
Reference in New Issue
Block a user