mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
PPP: more const fixes
This commit is contained in:
parent
0454950564
commit
cb6adc643b
@ -80,8 +80,8 @@ static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name,
|
||||
/* Generate hash of ID, secret, challenge */
|
||||
md5_starts(&ctx);
|
||||
md5_update(&ctx, &idbyte, 1);
|
||||
md5_update(&ctx, (unsigned char*)secret, secret_len);
|
||||
md5_update(&ctx, (unsigned char*)challenge, challenge_len);
|
||||
md5_update(&ctx, secret, secret_len);
|
||||
md5_update(&ctx, challenge, challenge_len);
|
||||
md5_finish(&ctx, hash);
|
||||
|
||||
/* Test if our hash matches the peer's response */
|
||||
|
@ -288,7 +288,7 @@ static int chapms_verify_response(ppp_pcb *pcb, int id, const char *name,
|
||||
#endif
|
||||
|
||||
/* Generate the expected response. */
|
||||
ChapMS(pcb, (u_char *)challenge, (char *)secret, secret_len, md);
|
||||
ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md);
|
||||
|
||||
#ifdef MSLANMAN
|
||||
/* Determine which part of response to verify against */
|
||||
@ -327,8 +327,8 @@ static int chapms2_verify_response(ppp_pcb *pcb, int id, const char *name,
|
||||
goto bad; /* not even the right length */
|
||||
|
||||
/* Generate the expected response and our mutual auth. */
|
||||
ChapMS2(pcb, (u_char*)challenge, (u_char*)&response[MS_CHAP2_PEER_CHALLENGE], (char*)name,
|
||||
(char *)secret, secret_len, md,
|
||||
ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name,
|
||||
(const char *)secret, secret_len, md,
|
||||
(unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR);
|
||||
|
||||
/* compare MDs and send the appropriate status */
|
||||
|
Loading…
Reference in New Issue
Block a user