mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Remove obsolete functions.
There are several old functions that the previous commits have removed all, or nearly all, of the references to. match_ssh_id is superseded by ptrlen_eq_string; get_ssh_{string,uint32} is yet another replicated set of decode functions (this time _partly_ centralised into misc.c); the old APIs for the SSH-1 RSA decode functions are gone (together with their last couple of holdout clients), as are ssh{1,2}_{read,write}_bignum and ssh{1,2}_bignum_length. Particularly odd was the use of ssh1_{read,write}_bignum in the SSH-2 Diffie-Hellman implementation. I'd completely forgotten I did that! Now replaced with a raw bignum_from_bytes, which is simpler anyway.
This commit is contained in:
23
cmdgen.c
23
cmdgen.c
@ -807,30 +807,13 @@ int main(int argc, char **argv)
|
||||
ssh1key = snew(struct RSAKey);
|
||||
if (!load_encrypted) {
|
||||
strbuf *blob;
|
||||
int n, l;
|
||||
BinarySource src[1];
|
||||
|
||||
blob = strbuf_new();
|
||||
ret = rsa_ssh1_loadpub(infilename, BinarySink_UPCAST(blob),
|
||||
&origcomment, &error);
|
||||
|
||||
n = 4; /* skip modulus bits */
|
||||
|
||||
l = ssh1_read_bignum(blob->u + n,
|
||||
blob->len - n,
|
||||
&ssh1key->exponent);
|
||||
if (l < 0) {
|
||||
error = "SSH-1 public key blob was too short";
|
||||
} else {
|
||||
n += l;
|
||||
l = ssh1_read_bignum(
|
||||
blob->u + n,
|
||||
blob->len - n, &ssh1key->modulus);
|
||||
if (l < 0) {
|
||||
error = "SSH-1 public key blob was too short";
|
||||
} else
|
||||
n += l;
|
||||
}
|
||||
|
||||
BinarySource_BARE_INIT(src, blob->u, blob->len);
|
||||
get_rsa_ssh1_pub(src, ssh1key, NULL, RSA_SSH1_EXPONENT_FIRST);
|
||||
strbuf_free(blob);
|
||||
|
||||
ssh1key->comment = dupstr(origcomment);
|
||||
|
Reference in New Issue
Block a user