1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Improvements to PuTTYgen error reporting:

- will now display a reason when it fails to load a key
 - uses existing error return from native keys
 - import.c had a lot of error descriptions which weren't going anywhere;
   since the strings are probably taking up space in the binary, we
   may as well use them

[originally from svn r5408]
This commit is contained in:
Jacob Nevins
2005-02-27 23:01:11 +00:00
parent 114b750d93
commit bd6eadd196
4 changed files with 73 additions and 60 deletions

View File

@ -739,15 +739,14 @@ int main(int argc, char **argv)
case SSH_KEYTYPE_OPENSSH:
case SSH_KEYTYPE_SSHCOM:
ssh2key = import_ssh2(&infilename, intype, passphrase);
if (ssh2key && ssh2key != SSH2_WRONG_PASSPHRASE)
error = NULL;
else if (!error) {
if (ssh2key == SSH2_WRONG_PASSPHRASE)
error = "wrong passphrase";
ssh2key = import_ssh2(&infilename, intype, passphrase, &error);
if (ssh2key) {
if (ssh2key != SSH2_WRONG_PASSPHRASE)
error = NULL;
else
error = "unknown error";
}
error = "wrong passphrase";
} else if (!error)
error = "unknown error";
break;
default: