commit | 2fd71f07579daa862d498e85b9cd6ebb95dbd7df | [log] [tgz] |
---|---|---|
author | Paul Bakker <p.j.bakker@polarssl.org> | Sat Jul 11 20:40:58 2009 +0000 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Sat Jul 11 20:40:58 2009 +0000 |
tree | 00ddcd5e3bfc7e49f88d04f4edea1cec921177b8 | |
parent | 396c52f711bde10ab88cd170f6fbc77ad44258f6 [diff] [blame] |
- Fixed HMAC-MD2 by modifying md2_starts(), so that the required HMAC ipad and opad variables are not cleared!
diff --git a/library/md2.c b/library/md2.c index 7bd5769..f6dd349 100644 --- a/library/md2.c +++ b/library/md2.c
@@ -70,7 +70,10 @@ */ void md2_starts( md2_context *ctx ) { - memset( ctx, 0, sizeof( md2_context ) ); + memset( ctx->cksum, 0, 16 ); + memset( ctx->state, 0, 46 ); + memset( ctx->buffer, 0, 16 ); + ctx->left = 0; } static void md2_process( md2_context *ctx )