X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=blobdiff_plain;f=libeap%2Fsrc%2Fcrypto%2Fmd5.c;fp=libeap%2Fsrc%2Fcrypto%2Fmd5.c;h=f64dfd3d43cd8692c427adffe87239c9eeacaa10;hp=7f14e9b2ec16beb2fc7a1dc76d414e4444da0db2;hb=f3746d009c6d7f50025af1f58a85e5fee9680be6;hpb=244f18d04aaf29e68495b5ffeb40ef5cca50942f diff --git a/libeap/src/crypto/md5.c b/libeap/src/crypto/md5.c index 7f14e9b..f64dfd3 100644 --- a/libeap/src/crypto/md5.c +++ b/libeap/src/crypto/md5.c @@ -2,14 +2,8 @@ * MD5 hash implementation and interface functions * Copyright (c) 2003-2005, Jouni Malinen * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. + * This software may be distributed under the terms of the BSD license. + * See README for more details. */ #include "includes.h" @@ -36,6 +30,7 @@ int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, u8 tk[16]; const u8 *_addr[6]; size_t i, _len[6]; + int res; if (num_elem > 5) { /* @@ -91,7 +86,10 @@ int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, _len[0] = 64; _addr[1] = mac; _len[1] = MD5_MAC_LEN; - return md5_vector(2, _addr, _len, mac); + res = md5_vector(2, _addr, _len, mac); + os_memset(k_pad, 0, sizeof(k_pad)); + os_memset(tk, 0, sizeof(tk)); + return res; }