1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 04:22:47 -05:00

Move some manual freeing into freersakey().

Several pieces of old code were disposing of pieces of an RSAKey by
manually freeing them one at a time. We have a centralised
freersakey(), so we should use that instead wherever possible.

Where it wasn't possible to switch over to that, it was because we
were only freeing the private fields of the key - so I've fixed that
by cutting freersakey() down the middle and exposing the private-only
half as freersapriv().
This commit is contained in:
Simon Tatham
2018-12-14 19:42:47 +00:00
parent 55cea187e9
commit a80edab4b5
4 changed files with 38 additions and 34 deletions

1
ssh.h
View File

@ -514,6 +514,7 @@ bool rsa_verify(struct RSAKey *key);
void rsa_ssh1_public_blob(BinarySink *bs, struct RSAKey *key,
RsaSsh1Order order);
int rsa_ssh1_public_blob_len(void *data, int maxlen);
void freersapriv(struct RSAKey *key);
void freersakey(struct RSAKey *key);
unsigned long crc32_compute(const void *s, size_t len);