Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Rename ssh_md5 and ssh_sha1 to ssh_hmac_md5 and ssh_hmac_sha1 respect…
Browse files Browse the repository at this point in the history
…ively.

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
  • Loading branch information
ben committed Aug 31, 2005
1 parent 5fe2909 commit 1993f32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ssh.c
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions ssh.h
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion sshmd5.c
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions sshsha.c
Expand Up @@ -282,15 +282,15 @@ 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",
20,
"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",
Expand Down

0 comments on commit 1993f32

Please sign in to comment.