mirror of
https://github.com/cy384/ssheven.git
synced 2026-05-15 14:15:58 -06:00
if the key is invalid, don't save the path
This commit is contained in:
parent
b6cbaf43e1
commit
f8a6cd1043
1 changed files with 5 additions and 0 deletions
|
|
@ -1134,6 +1134,11 @@ void* read_thread(void* arg)
|
|||
else if (rc == LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED)
|
||||
{
|
||||
printf_i("Username/public key combination invalid!\r\n"); // TODO: have an alert for this
|
||||
if (prefs.pubkey_path[0] != '\0' || prefs.privkey_path[0] != '\0')
|
||||
{
|
||||
prefs.pubkey_path[0] = '\0';
|
||||
prefs.privkey_path[0] = '\0';
|
||||
}
|
||||
}
|
||||
else printf_i("unexpected failure: %s\r\n", libssh2_error_string(rc));
|
||||
ok = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue