1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Add missing 'const' in the des_*_xdmauth functions.

[originally from svn r10077]
This commit is contained in:
Simon Tatham 2013-11-17 14:05:01 +00:00
parent b71b443c7c
commit 961503e449
2 changed files with 9 additions and 5 deletions

6
ssh.h
View File

@ -536,8 +536,10 @@ void aes256_encrypt_pubkey(unsigned char *key, unsigned char *blk,
void aes256_decrypt_pubkey(unsigned char *key, unsigned char *blk,
int len);
void des_encrypt_xdmauth(unsigned char *key, unsigned char *blk, int len);
void des_decrypt_xdmauth(unsigned char *key, unsigned char *blk, int len);
void des_encrypt_xdmauth(const unsigned char *key,
unsigned char *blk, int len);
void des_decrypt_xdmauth(const unsigned char *key,
unsigned char *blk, int len);
/*
* For progress updates in the key generation utility.

View File

@ -906,7 +906,7 @@ void des3_encrypt_pubkey_ossh(unsigned char *key, unsigned char *iv,
smemclr(ourkeys, sizeof(ourkeys));
}
static void des_keysetup_xdmauth(unsigned char *keydata, DESContext *dc)
static void des_keysetup_xdmauth(const unsigned char *keydata, DESContext *dc)
{
unsigned char key[8];
int i, nbits, j;
@ -929,14 +929,16 @@ static void des_keysetup_xdmauth(unsigned char *keydata, DESContext *dc)
des_key_setup(GET_32BIT_MSB_FIRST(key), GET_32BIT_MSB_FIRST(key + 4), dc);
}
void des_encrypt_xdmauth(unsigned char *keydata, unsigned char *blk, int len)
void des_encrypt_xdmauth(const unsigned char *keydata,
unsigned char *blk, int len)
{
DESContext dc;
des_keysetup_xdmauth(keydata, &dc);
des_cbc_encrypt(blk, 24, &dc);
}
void des_decrypt_xdmauth(unsigned char *keydata, unsigned char *blk, int len)
void des_decrypt_xdmauth(const unsigned char *keydata,
unsigned char *blk, int len)
{
DESContext dc;
des_keysetup_xdmauth(keydata, &dc);