charon-cmd: match_me/match_other are optional in callback credentials

This commit is contained in:
Tobias Brunner 2013-04-12 19:32:01 +02:00
parent 89d350f46a
commit f77d6e16d2
1 changed files with 8 additions and 1 deletions

View File

@ -96,7 +96,14 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this,
return NULL;
}
this->prompted = TRUE;
*match_me = *match_other = ID_MATCH_PERFECT;
if (match_me)
{
*match_me = ID_MATCH_PERFECT;
}
if (match_other)
{
*match_other = ID_MATCH_PERFECT;
}
return shared_key_create(type, chunk_clone(chunk_from_str(pwd)));
}