1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-13 00:57:33 -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

View File

@ -1628,7 +1628,7 @@ struct ssh2_userkey *openssh_new_read(const Filename *filename,
retkey = NULL;
for (key_index = 0; key_index < key->nkeys; key_index++) {
unsigned char *thiskey;
const unsigned char *thiskey;
int thiskeylen;
/*
@ -1660,7 +1660,7 @@ struct ssh2_userkey *openssh_new_read(const Filename *filename,
goto error;
}
thiskey = (unsigned char *)priv;
thiskey = priv;
/*
* Skip over the pieces of key.