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:
15
cmdgen.c
15
cmdgen.c
@ -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:
|
||||
|
Reference in New Issue
Block a user