]> git.ozlabs.org Git - ppp.git/commitdiff
Fix the argument type in call to MD5_Update properly
authorPaul Mackerras <paulus@samba.org>
Sun, 24 Aug 2008 07:12:02 +0000 (17:12 +1000)
committerPaul Mackerras <paulus@samba.org>
Sun, 24 Aug 2008 07:12:02 +0000 (17:12 +1000)
The secret needs to be cast to u_char * not char *.  Oops.

Signed-off-by: Paul Mackerras <paulus@samba.org>
pppd/chap-md5.c

index 43d0fe8c976cfcddf8f52f13e70f870ad5fae1ab..77dd4ecc705984bad999cb51fb6b8889f5b82f48 100644 (file)
@@ -95,7 +95,7 @@ chap_md5_make_response(unsigned char *response, int id, char *our_name,
 
        MD5_Init(&ctx);
        MD5_Update(&ctx, &idbyte, 1);
-       MD5_Update(&ctx, (char *)secret, secret_len);
+       MD5_Update(&ctx, (u_char *)secret, secret_len);
        MD5_Update(&ctx, challenge, challenge_len);
        MD5_Final(&response[1], &ctx);
        response[0] = MD5_HASH_SIZE;