X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fchap-md5.c;h=000f880e89e3d0859698b018689437acb120023e;hb=81a4d35394096e4e9bd7b9b189e91190e58b02a7;hp=bc69778efd2b38605abf6ab03df3ec71ab128321;hpb=fd72d1cb02044e3ec19193206e22082fc4faca48;p=ppp.git diff --git a/pppd/chap-md5.c b/pppd/chap-md5.c index bc69778..000f880 100644 --- a/pppd/chap-md5.c +++ b/pppd/chap-md5.c @@ -30,6 +30,10 @@ #define RCSID "$Id: chap-md5.c,v 1.4 2004/11/09 22:39:25 paulus Exp $" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include "pppd.h" @@ -95,7 +99,7 @@ chap_md5_make_response(unsigned char *response, int id, char *our_name, MD5_Init(&ctx); MD5_Update(&ctx, &idbyte, 1); - MD5_Update(&ctx, 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;