mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
proposal: Add prefix for additional key exchanges when logging proposals
This commit is contained in:
parent
e05d86b27a
commit
c5a6938b9e
@ -849,7 +849,7 @@ static int print_alg(private_proposal_t *this, printf_hook_data_t *data,
|
||||
enumerator = array_create_enumerator(this->transforms);
|
||||
while (enumerator->enumerate(enumerator, &entry))
|
||||
{
|
||||
char *prefix = "/";
|
||||
char *prefix = "/", ake_prefix[5] = "";
|
||||
|
||||
if (type != entry->type)
|
||||
{
|
||||
@ -860,14 +860,19 @@ static int print_alg(private_proposal_t *this, printf_hook_data_t *data,
|
||||
prefix = "";
|
||||
*first = FALSE;
|
||||
}
|
||||
if (is_ke_transform(type) && type != KEY_EXCHANGE_METHOD)
|
||||
{
|
||||
sprintf(ake_prefix, "KE%d_", type - ADDITIONAL_KEY_EXCHANGE_1 + 1);
|
||||
}
|
||||
if (names)
|
||||
{
|
||||
written += print_in_hook(data, "%s%N", prefix, names, entry->alg);
|
||||
written += print_in_hook(data, "%s%s%N", prefix, ake_prefix,
|
||||
names, entry->alg);
|
||||
}
|
||||
else
|
||||
{
|
||||
written += print_in_hook(data, "%sUNKNOWN_%u_%u", prefix,
|
||||
entry->type, entry->alg);
|
||||
written += print_in_hook(data, "%s%sUNKNOWN_%u_%u", prefix,
|
||||
ake_prefix, entry->type, entry->alg);
|
||||
}
|
||||
if (entry->key_size)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user