Make sure getpass() is available
It's not on Android for example.
This commit is contained in:
@@ -144,13 +144,15 @@ CALLBACK(password_cb, shared_key_t*,
|
||||
identification_t *me, identification_t *other,
|
||||
id_match_t *match_me, id_match_t *match_other)
|
||||
{
|
||||
char *pwd;
|
||||
char *pwd = NULL;
|
||||
|
||||
if (type != SHARED_PRIVATE_KEY_PASS)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#ifdef HAVE_GETPASS
|
||||
pwd = getpass(prompt);
|
||||
#endif
|
||||
if (!pwd || strlen(pwd) == 0)
|
||||
{
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user