mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-30 15:15:05 +00:00
PPP: Fix shadowing of global declaration 'sha1'
lwip/src/netif/ppp/mppe.c: In function `mppe_rekey': lwip/src/netif/ppp/mppe.c:74:15: error: declaration of`sha1' shadows a global declaration [-Werror=shadow] lwip/src/include/netif/ppp/polarssl/sha1.h:88:6: error: shadowed declaration is here [-Werror=shadow]
This commit is contained in:
parent
7fb832aa4e
commit
58895c3cf6
@ -71,19 +71,19 @@
|
|||||||
*/
|
*/
|
||||||
static void mppe_rekey(ppp_mppe_state * state, int initial_key)
|
static void mppe_rekey(ppp_mppe_state * state, int initial_key)
|
||||||
{
|
{
|
||||||
sha1_context sha1;
|
sha1_context sha1_ctx;
|
||||||
u8_t sha1_digest[SHA1_SIGNATURE_SIZE];
|
u8_t sha1_digest[SHA1_SIGNATURE_SIZE];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Key Derivation, from RFC 3078, RFC 3079.
|
* Key Derivation, from RFC 3078, RFC 3079.
|
||||||
* Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.
|
* Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.
|
||||||
*/
|
*/
|
||||||
sha1_starts(&sha1);
|
sha1_starts(&sha1_ctx);
|
||||||
sha1_update(&sha1, state->master_key, state->keylen);
|
sha1_update(&sha1_ctx, state->master_key, state->keylen);
|
||||||
sha1_update(&sha1, mppe_sha1_pad1, SHA1_PAD_SIZE);
|
sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE);
|
||||||
sha1_update(&sha1, state->session_key, state->keylen);
|
sha1_update(&sha1_ctx, state->session_key, state->keylen);
|
||||||
sha1_update(&sha1, mppe_sha1_pad2, SHA1_PAD_SIZE);
|
sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE);
|
||||||
sha1_finish(&sha1, sha1_digest);
|
sha1_finish(&sha1_ctx, sha1_digest);
|
||||||
MEMCPY(state->session_key, sha1_digest, state->keylen);
|
MEMCPY(state->session_key, sha1_digest, state->keylen);
|
||||||
|
|
||||||
if (!initial_key) {
|
if (!initial_key) {
|
||||||
|
Loading…
Reference in New Issue
Block a user