Switch encoding of AR Identity Value from binary to UTF-8
This commit is contained in:
@@ -59,9 +59,14 @@ struct private_imv_scanner_state_t {
|
||||
u_int32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* Access Requestor ID
|
||||
* Access Requestor ID Type
|
||||
*/
|
||||
identification_t *ar_id;
|
||||
u_int32_t ar_id_type;
|
||||
|
||||
/**
|
||||
* Access Requestor ID Value
|
||||
*/
|
||||
chunk_t ar_id_value;
|
||||
|
||||
/**
|
||||
* IMV action recommendation
|
||||
@@ -171,16 +176,20 @@ METHOD(imv_state_t, get_max_msg_len, u_int32_t,
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, set_ar_id, void,
|
||||
private_imv_scanner_state_t *this, identification_t *ar_id)
|
||||
private_imv_scanner_state_t *this, u_int32_t id_type, chunk_t id_value)
|
||||
{
|
||||
/* no cloning, caller must not destroy object */
|
||||
this->ar_id = ar_id;
|
||||
this->ar_id_type = id_type;
|
||||
this->ar_id_value = chunk_clone(id_value);
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, get_ar_id, identification_t*,
|
||||
private_imv_scanner_state_t *this)
|
||||
METHOD(imv_state_t, get_ar_id, chunk_t,
|
||||
private_imv_scanner_state_t *this, u_int32_t *id_type)
|
||||
{
|
||||
return this->ar_id;
|
||||
if (id_type)
|
||||
{
|
||||
*id_type = this->ar_id_type;
|
||||
}
|
||||
return this->ar_id_value;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, change_state, void,
|
||||
@@ -256,10 +265,10 @@ METHOD(imv_state_t, get_remediation_instructions, bool,
|
||||
METHOD(imv_state_t, destroy, void,
|
||||
private_imv_scanner_state_t *this)
|
||||
{
|
||||
DESTROY_IF(this->ar_id);
|
||||
DESTROY_IF(this->reason_string);
|
||||
DESTROY_IF(this->remediation_string);
|
||||
this->violating_ports->destroy_function(this->violating_ports, free);
|
||||
free(this->ar_id_value.ptr);
|
||||
free(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user