From: ben Date: Wed, 31 Aug 2005 19:11:19 +0000 (+0000) Subject: Rename ssh_md5 and ssh_sha1 to ssh_hmac_md5 and ssh_hmac_sha1 respectively. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/1993f323773980444f97ee23b296c5ef63c0a396 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@6249 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/ssh.c b/ssh.c index 2a97bb52..837bbfa3 100644 --- a/ssh.c +++ b/ssh.c @@ -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) diff --git a/ssh.h b/ssh.h index 36924b83..6a47e4b6 100644 --- a/ssh.h +++ b/ssh.h @@ -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. diff --git a/sshmd5.c b/sshmd5.c index dbdd9714..215b81fd 100644 --- a/sshmd5.c +++ b/sshmd5.c @@ -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", diff --git a/sshsha.c b/sshsha.c index c17149ee..aaaad579 100644 --- a/sshsha.c +++ b/sshsha.c @@ -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",