aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pluto/keys.c')
-rw-r--r--src/pluto/keys.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pluto/keys.c b/src/pluto/keys.c
index dc78b0e7f..12a3ccfc9 100644
--- a/src/pluto/keys.c
+++ b/src/pluto/keys.c
@@ -554,12 +554,17 @@ typedef struct {
/**
* Passphrase callback to read from whack fd
*/
-static shared_key_t* whack_pass_cb(prompt_pass_t *pass,
+static shared_key_t* whack_pass_cb(prompt_pass_t *pass, shared_key_type_t type,
identification_t *me, identification_t *other,
id_match_t *match_me, id_match_t *match_other)
{
int n;
+ if (type != SHARED_ANY && type != SHARED_PRIVATE_KEY_PASS)
+ {
+ return NULL;
+ }
+
if (pass->try > MAX_PROMPT_PASS_TRIALS)
{
whack_log(RC_LOG_SERIOUS, "invalid passphrase, too many trials");