Changeset 3194
- Timestamp:
- 09/23/10 14:22:18 (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cscrypt/cscrypt.h
r712 r3194 34 34 35 35 #define MD5_DIGEST_LENGTH 16 36 char * __md5_crypt(const char *, const char * );36 char * __md5_crypt(const char *, const char *, char *); 37 37 unsigned char *MD5(const unsigned char *, unsigned long, unsigned char *); 38 38 unsigned long crc32(unsigned long, const unsigned char *, unsigned int); -
trunk/cscrypt/md5.c
r3181 r3194 539 539 */ 540 540 541 char * __md5_crypt( const char *pw, const char *salt )541 char * __md5_crypt( const char *pw, const char *salt, char *passwd ) 542 542 { 543 543 /* Static stuff */ 544 544 static const char *sp, *ep; 545 static char passwd[120],*p;545 static char *p; 546 546 547 547 unsigned char final[17]; /* final[16] exists only to aid in looping */ -
trunk/module-newcamd.c
r3191 r3194 286 286 287 287 uint32 index; 288 u int8 *passwdcrypt;288 uchar passwdcrypt[120]; 289 289 uint8 login_answer; 290 290 int bytes_received; … … 313 313 buf[1] = 0; 314 314 strcpy((char *)buf+index, reader[client[cs_idx].ridx].r_usr); 315 passwdcrypt = (uint8*)__md5_crypt(reader[client[cs_idx].ridx].r_pwd, "$1$abcdefgh$");315 __md5_crypt(reader[client[cs_idx].ridx].r_pwd, "$1$abcdefgh$", (char *)passwdcrypt); 316 316 index += strlen(reader[client[cs_idx].ridx].r_usr)+1; 317 317 strcpy((char *)buf+index, (const char *)passwdcrypt); … … 607 607 uchar buf[14]; 608 608 uchar *key=0; 609 u int8 *passwdcrypt = NULL;609 uchar passwdcrypt[120]; 610 610 int au=0; 611 611 struct s_ip *p_ip; … … 668 668 if (strcmp((char *)usr, account->usr) == 0) 669 669 { 670 passwdcrypt = (uint8*)__md5_crypt(account->pwd, "$1$abcdefgh$");670 __md5_crypt(account->pwd, "$1$abcdefgh$", (char *)passwdcrypt); 671 671 cs_debug("account->pwd=%s", passwdcrypt); 672 672 if (strcmp((char *)pwd, (const char *)passwdcrypt) == 0)
Note:
See TracChangeset
for help on using the changeset viewer.