vici: Clear cached strings in case the message contained shared secrets
This commit is contained in:
@@ -644,6 +644,13 @@ METHOD(vici_message_t, dump, bool,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CALLBACK(clear_strings, void,
|
||||||
|
char *str)
|
||||||
|
{
|
||||||
|
memwipe(str, strlen(str));
|
||||||
|
free(str);
|
||||||
|
}
|
||||||
|
|
||||||
METHOD(vici_message_t, destroy, void,
|
METHOD(vici_message_t, destroy, void,
|
||||||
private_vici_message_t *this)
|
private_vici_message_t *this)
|
||||||
{
|
{
|
||||||
@@ -651,7 +658,7 @@ METHOD(vici_message_t, destroy, void,
|
|||||||
{
|
{
|
||||||
chunk_clear(&this->encoding);
|
chunk_clear(&this->encoding);
|
||||||
}
|
}
|
||||||
this->strings->destroy_function(this->strings, free);
|
this->strings->destroy_function(this->strings, clear_strings);
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user