From 447f7a7bc8eac6072ee513884a5225eab7644da8 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 16 Jan 2005 14:02:56 +0000 Subject: [PATCH] Owen tells me the Mac compiler complains at a char / unsigned char mismatch in the invocation of hmacmd5_key(). Do it properly with a void * argument. git-svn-id: svn://svn.tartarus.org/sgt/putty@5117 cda61777-01e9-0310-a592-d414129be87e --- ssh.h | 2 +- sshmd5.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ssh.h b/ssh.h index 9a57205d..0886d450 100644 --- a/ssh.h +++ b/ssh.h @@ -105,7 +105,7 @@ void MD5Simple(void const *p, unsigned len, unsigned char output[16]); void *hmacmd5_make_context(void); void hmacmd5_free_context(void *handle); -void hmacmd5_key(void *handle, unsigned char const *key, int len); +void hmacmd5_key(void *handle, void const *key, int len); void hmacmd5_do_hmac(void *handle, unsigned char const *blk, int len, unsigned char *hmac); diff --git a/sshmd5.c b/sshmd5.c index 325a5aeb..dbdd9714 100644 --- a/sshmd5.c +++ b/sshmd5.c @@ -230,10 +230,11 @@ void hmacmd5_free_context(void *handle) sfree(handle); } -void hmacmd5_key(void *handle, unsigned char const *key, int len) +void hmacmd5_key(void *handle, void const *keyv, int len) { struct MD5Context *keys = (struct MD5Context *)handle; unsigned char foo[64]; + unsigned char const *key = (unsigned char const *)keyv; int i; memset(foo, 0x36, 64); -- 2.11.0