Added missing lwip_md5_init and lwip_md5_free as suggested by:

https://github.com/ARMmbed/mbed-os/issues/6003#issuecomment-364127671
pull/6032/head
andreas.larsson 2018-02-08 16:54:01 +01:00 committed by Jarno Lamsa
parent 67772a5e95
commit 34099ba294
1 changed files with 2 additions and 0 deletions

View File

@ -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. */
/* Generate the hash, using MD5. */
lwip_md5_init(&ctx);
lwip_md5_starts(&ctx);
lwip_md5_update(&ctx, input, sizeof(input));
lwip_md5_finish(&ctx, output);
lwip_md5_free(&ctx);
/* Arbitrarily take the first 32 bits from the generated hash. */
MEMCPY(&isn, output, sizeof(isn));