1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Replace more (pointer, length) arg pairs with ptrlen.

The abstract method ssh_key_sign(), and the concrete functions
ssh_rsakex_newkey() and rsa_ssh1_public_blob_len(), now each take a
ptrlen argument in place of a separate pointer and length pair.

Partly that's because I'm generally preferring ptrlens these days and
it keeps argument lists short and tidy-looking, but mostly it's
because it will make those functions easier to wrap in my upcoming
test system.
This commit is contained in:
Simon Tatham
2019-01-01 21:07:48 +00:00
parent febef916a5
commit a2d1c211a7
8 changed files with 27 additions and 29 deletions

View File

@ -352,7 +352,7 @@ void pageant_handle_msg(BinarySink *bs,
}
signature = strbuf_new();
ssh_key_sign(key->key, sigdata.ptr, sigdata.len, flags,
ssh_key_sign(key->key, sigdata, flags,
BinarySink_UPCAST(signature));
put_byte(bs, SSH2_AGENT_SIGN_RESPONSE);
@ -1086,7 +1086,8 @@ int pageant_add_keyfile(Filename *filename, const char *passphrase,
}
/* Now skip over public blob */
if (type == SSH_KEYTYPE_SSH1) {
int n = rsa_ssh1_public_blob_len(p, keylistlen);
int n = rsa_ssh1_public_blob_len(
make_ptrlen(p, keylistlen));
if (n < 0) {
*retstr = dupstr("Received broken key list from agent");
sfree(keylist);