mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Fix error messages in ppk_loadpub_s.
The function will accept a public key file or a PPK, but if it fails to parse as any of those, the error message says "not a PuTTY SSH-2 private key", which is particularly incongruous in situations where you're specifically _not_ after the private half of the key. Now says "not a public key or a PuTTY SSH-2 private key".
This commit is contained in:
@ -2418,7 +2418,7 @@ Private-MAC: 6f5e588e475e55434106ec2c3569695b03f423228b44993a9e97d52ffe7be5a8
|
||||
(True, algorithm, public_blob, comment, None))
|
||||
self.assertEqual(ppk_loadpub_s("not a key file"),
|
||||
(False, None, b'', None,
|
||||
b'not a PuTTY SSH-2 private key'))
|
||||
b'not a public key or a PuTTY SSH-2 private key'))
|
||||
|
||||
k1, c, e = ppk_load_s(input_clear_key, None)
|
||||
self.assertEqual((c, e), (comment, None))
|
||||
@ -2480,7 +2480,7 @@ Private-MAC: 5b1f6f4cc43eb0060d2c3e181bc0129343adba2b
|
||||
(True, algorithm, public_blob, comment, None))
|
||||
self.assertEqual(ppk_loadpub_s("not a key file"),
|
||||
(False, None, b'', None,
|
||||
b'not a PuTTY SSH-2 private key'))
|
||||
b'not a public key or a PuTTY SSH-2 private key'))
|
||||
|
||||
k1, c, e = ppk_load_s(v2_clear_key, None)
|
||||
self.assertEqual((c, e), (comment, None))
|
||||
|
Reference in New Issue
Block a user