diff options
Diffstat (limited to 'src/charon-cmd/cmd/cmd_creds.c')
-rw-r--r-- | src/charon-cmd/cmd/cmd_creds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/charon-cmd/cmd/cmd_creds.c b/src/charon-cmd/cmd/cmd_creds.c index 7fee85d78..45d008e7b 100644 --- a/src/charon-cmd/cmd/cmd_creds.c +++ b/src/charon-cmd/cmd/cmd_creds.c @@ -72,7 +72,7 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this, id_match_t *match_me, id_match_t *match_other) { shared_key_t *shared; - char *label, *pwd; + char *label, *pwd = NULL; if (type == this->prompted) { @@ -95,7 +95,9 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this, default: return NULL; } +#ifdef HAVE_GETPASS pwd = getpass(label); +#endif if (!pwd || strlen(pwd) == 0) { return NULL; |