1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Const-correctness in public-key functions.

Several of the functions in ssh2_signkey, and one or two SSH-1 key
functions too, were still taking assorted non-const buffer parameters
that had never been properly constified. Sort them all out.
This commit is contained in:
Simon Tatham
2015-05-05 20:16:17 +01:00
parent 6b30316922
commit bcfcb169ef
6 changed files with 82 additions and 77 deletions

5
ssh.c
View File

@ -2627,7 +2627,7 @@ static void *ssh_pkt_getdata(struct Packet *pkt, int length)
return pkt->body + (pkt->savedpos - length);
}
static int ssh1_pkt_getrsakey(struct Packet *pkt, struct RSAKey *key,
unsigned char **keystr)
const unsigned char **keystr)
{
int j;
@ -3865,7 +3865,8 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen,
struct do_ssh1_login_state {
int crLine;
int len;
unsigned char *rsabuf, *keystr1, *keystr2;
unsigned char *rsabuf;
const unsigned char *keystr1, *keystr2;
unsigned long supported_ciphers_mask, supported_auths_mask;
int tried_publickey, tried_agent;
int tis_auth_refused, ccard_auth_refused;