mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Remove 'keystr' parameter in get_rsa_ssh1_pub.
This parameter returned a substring of the input, which was used for two purposes. Firstly, it was used to hash the host and server keys during the initial SSH-1 key setup phase; secondly, it was used to check the keys in Pageant against the public key blob of a key specified on the command line. Unfortunately, those two purposes didn't agree! The first one needs just the bare key modulus bytes (without even the SSH-1 mpint length header); the second needs the entire key blob. So, actually, it seems to have never worked in SSH-1 to say 'putty -i keyfile' and have PuTTY find that key in Pageant and not have to ask for the passphrase to decrypt the version on disk. Fixed by removing that parameter completely, which simplifies all the _other_ call sites, and replacing it by custom code in those two places that each does the actually right thing.
This commit is contained in:
2
cmdgen.c
2
cmdgen.c
@ -813,7 +813,7 @@ int main(int argc, char **argv)
|
||||
ret = rsa_ssh1_loadpub(infilename, BinarySink_UPCAST(blob),
|
||||
&origcomment, &error);
|
||||
BinarySource_BARE_INIT(src, blob->u, blob->len);
|
||||
get_rsa_ssh1_pub(src, ssh1key, NULL, RSA_SSH1_EXPONENT_FIRST);
|
||||
get_rsa_ssh1_pub(src, ssh1key, RSA_SSH1_EXPONENT_FIRST);
|
||||
strbuf_free(blob);
|
||||
|
||||
ssh1key->comment = dupstr(origcomment);
|
||||
|
Reference in New Issue
Block a user