mirror of https://github.com/ARMmbed/mbed-os.git
Added missing lwip_md5_init and lwip_md5_free as suggested by:
https://github.com/ARMmbed/mbed-os/issues/6003#issuecomment-364127671pull/6032/head
parent
67772a5e95
commit
34099ba294
|
@ -178,9 +178,11 @@ lwip_hook_tcp_isn(const void *local_ip_ptr, u16_t local_port,
|
||||||
/* The secret and padding are already filled in. */
|
/* The secret and padding are already filled in. */
|
||||||
|
|
||||||
/* Generate the hash, using MD5. */
|
/* Generate the hash, using MD5. */
|
||||||
|
lwip_md5_init(&ctx);
|
||||||
lwip_md5_starts(&ctx);
|
lwip_md5_starts(&ctx);
|
||||||
lwip_md5_update(&ctx, input, sizeof(input));
|
lwip_md5_update(&ctx, input, sizeof(input));
|
||||||
lwip_md5_finish(&ctx, output);
|
lwip_md5_finish(&ctx, output);
|
||||||
|
lwip_md5_free(&ctx);
|
||||||
|
|
||||||
/* Arbitrarily take the first 32 bits from the generated hash. */
|
/* Arbitrarily take the first 32 bits from the generated hash. */
|
||||||
MEMCPY(&isn, output, sizeof(isn));
|
MEMCPY(&isn, output, sizeof(isn));
|
||||||
|
|
Loading…
Reference in New Issue