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

Rename ssh_md5 and ssh_sha1 to ssh_hmac_md5 and ssh_hmac_sha1 respectively.

This is to make room for a hash abstraction that's likely to want to use
ssh_sha1, at least.

[originally from svn r6249]
This commit is contained in:
Ben Harris 2005-08-31 19:11:19 +00:00
parent aceea31760
commit 11d5c791ac
4 changed files with 9 additions and 8 deletions

4
ssh.c
View File

@ -462,10 +462,10 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen,
const static struct ssh_signkey *hostkey_algs[] = { &ssh_rsa, &ssh_dss };
const static struct ssh_mac *macs[] = {
&ssh_sha1, &ssh_md5
&ssh_hmac_sha1, &ssh_hmac_md5
};
const static struct ssh_mac *buggymacs[] = {
&ssh_sha1_buggy, &ssh_md5
&ssh_hmac_sha1_buggy, &ssh_hmac_md5
};
static void *ssh_comp_none_init(void)

7
ssh.h
View File

@ -241,9 +241,10 @@ extern const struct ssh_kex ssh_diffiehellman_group14;
extern const struct ssh_kex ssh_diffiehellman_gex;
extern const struct ssh_signkey ssh_dss;
extern const struct ssh_signkey ssh_rsa;
extern const struct ssh_mac ssh_md5;
extern const struct ssh_mac ssh_sha1;
extern const struct ssh_mac ssh_sha1_buggy;
extern const struct ssh_mac ssh_hmac_md5;
extern const struct ssh_mac ssh_hmac_sha1;
extern const struct ssh_mac ssh_hmac_sha1_buggy;
/*
* PuTTY version number formatted as an SSH version string.

View File

@ -308,7 +308,7 @@ static int hmacmd5_verify(void *handle, unsigned char *blk, int len,
return !memcmp(correct, blk + len, 16);
}
const struct ssh_mac ssh_md5 = {
const struct ssh_mac ssh_hmac_md5 = {
hmacmd5_make_context, hmacmd5_free_context, hmacmd5_key_16,
hmacmd5_generate, hmacmd5_verify,
"hmac-md5",

View File

@ -282,7 +282,7 @@ void hmac_sha1_simple(void *key, int keylen, void *data, int datalen,
SHA_Final(&states[1], output);
}
const struct ssh_mac ssh_sha1 = {
const struct ssh_mac ssh_hmac_sha1 = {
sha1_make_context, sha1_free_context, sha1_key,
sha1_generate, sha1_verify,
"hmac-sha1",
@ -290,7 +290,7 @@ const struct ssh_mac ssh_sha1 = {
"HMAC-SHA1"
};
const struct ssh_mac ssh_sha1_buggy = {
const struct ssh_mac ssh_hmac_sha1_buggy = {
sha1_make_context, sha1_free_context, sha1_key_buggy,
sha1_generate, sha1_verify,
"hmac-sha1",