Pass type of requested key in the callback credential set
This commit is contained in:
@@ -689,12 +689,18 @@ typedef struct {
|
||||
* Callback function to receive Passphrases
|
||||
*/
|
||||
static shared_key_t* passphrase_cb(passphrase_cb_data_t *data,
|
||||
shared_key_type_t type,
|
||||
identification_t *me, identification_t *other,
|
||||
id_match_t *match_me, id_match_t *match_other)
|
||||
{
|
||||
chunk_t secret;
|
||||
char buf[256];
|
||||
|
||||
if (type != SHARED_ANY && type != SHARED_PRIVATE_KEY_PASS)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (data->try > 1)
|
||||
{
|
||||
if (data->try > 5)
|
||||
@@ -744,13 +750,18 @@ typedef struct {
|
||||
/**
|
||||
* Callback function to receive PINs
|
||||
*/
|
||||
static shared_key_t* pin_cb(pin_cb_data_t *data,
|
||||
static shared_key_t* pin_cb(pin_cb_data_t *data, shared_key_type_t type,
|
||||
identification_t *me, identification_t *other,
|
||||
id_match_t *match_me, id_match_t *match_other)
|
||||
{
|
||||
chunk_t secret;
|
||||
char buf[256];
|
||||
|
||||
if (type != SHARED_ANY && type != SHARED_PIN)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!me || !chunk_equals(me->get_encoding(me), data->keyid))
|
||||
{
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user