]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Owen tells me the Mac compiler complains at a char / unsigned char
authorSimon Tatham <anakin@pobox.com>
Sun, 16 Jan 2005 14:02:56 +0000 (14:02 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 16 Jan 2005 14:02:56 +0000 (14:02 +0000)
mismatch in the invocation of hmacmd5_key(). Do it properly with a
void * argument.

[originally from svn r5117]

ssh.h
sshmd5.c

diff --git a/ssh.h b/ssh.h
index 9a57205d61eabefbf6f69d32ff0a33f75068540a..0886d450249c58b8786b1870646cf265fdf810d3 100644 (file)
--- 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);
 
index 325a5aebdd2cecb543f57f1d0a819a13c83994b5..dbdd97142247c80669dde1892552a02bb79661b7 100644 (file)
--- 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);