X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Frlm_mschap%2Fsmbdes.c;h=fac766d1923da50997658def54ce135bc7f1ddba;hb=94dc4bb60ec649ce899c1d5e32b575d9523a48f2;hp=7c6692d8453e0349796b634ca305bec414930ef7;hpb=5f3e8b84cd5dc5a7959c5c395d1d7a1e0c1415c0;p=freeradius.git diff --git a/src/modules/rlm_mschap/smbdes.c b/src/modules/rlm_mschap/smbdes.c index 7c6692d..fac766d 100644 --- a/src/modules/rlm_mschap/smbdes.c +++ b/src/modules/rlm_mschap/smbdes.c @@ -49,8 +49,9 @@ #include RCSID("$Id$") -#include +#include #include +#include "smbdes.h" #define uchar unsigned char @@ -315,11 +316,11 @@ static void smbhash(unsigned char *out, const unsigned char *in, unsigned char * * Converts the password to uppercase, and creates the LM * password hash. */ -void smbdes_lmpwdhash(const unsigned char *password,unsigned char *lmhash) +void smbdes_lmpwdhash(const char *password, uint8_t *lmhash) { int i; - unsigned char p14[14]; - static unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25}; + uint8_t p14[14]; + static uint8_t sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25}; memset(p14, 0, sizeof(p14)); for (i = 0; i < 14 && password[i]; i++) { @@ -335,10 +336,10 @@ void smbdes_lmpwdhash(const unsigned char *password,unsigned char *lmhash) * * The win_password MUST be exactly 16 bytes long. */ -void smbdes_mschap(const unsigned char *win_password, - const unsigned char *challenge, unsigned char *response) +void smbdes_mschap(const uint8_t win_password[16], + const uint8_t *challenge, uint8_t *response) { - unsigned char p21[21]; + uint8_t p21[21]; memset(p21, 0, sizeof(p21)); memcpy(p21, win_password, 16);