pki: Stop prompting for password when entering empty string

This commit is contained in:
Martin Willi 2014-03-10 17:35:06 +01:00
parent 1309cb7b1a
commit f1e7b9b0d7

View File

@ -182,7 +182,7 @@ static shared_key_t* cb(void *data, shared_key_type_t type,
#ifdef HAVE_GETPASS
secret = getpass(buf);
#endif
if (secret)
if (secret && strlen(secret))
{
if (match_me)
{