diff options
author | Ilan Peer <ilan.peer@intel.com> | 2019-04-03 12:16:14 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2019-04-06 14:00:07 (GMT) |
commit | 277fa92b376726dbe4bdc765ed2e084d8050ee1e (patch) | |
tree | 36d487b7ff119a78f9b98c42be03491fcaf28584 /src | |
parent | 78ed42d8a2a54ae90a193f170b40ee56fad0a53b (diff) | |
download | hostap-277fa92b376726dbe4bdc765ed2e084d8050ee1e.zip hostap-277fa92b376726dbe4bdc765ed2e084d8050ee1e.tar.gz hostap-277fa92b376726dbe4bdc765ed2e084d8050ee1e.tar.bz2 |
crypto: Fix unreachable code in tls_prf_sha1_md5()
While commit 1c156e783d35 ("Fixed tls_prf() to handle keys with
odd length") added support for keys with odd length, the function
never reached this code as the function would return earlier in
case the key length was odd. Fix this by removing the first check
for the key length.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/sha1-tlsprf.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/crypto/sha1-tlsprf.c b/src/crypto/sha1-tlsprf.c index f9bc0eb..a11649a 100644 --- a/src/crypto/sha1-tlsprf.c +++ b/src/crypto/sha1-tlsprf.c @@ -40,9 +40,6 @@ int tls_prf_sha1_md5(const u8 *secret, size_t secret_len, const char *label, const unsigned char *SHA1_addr[3]; size_t SHA1_len[3]; - if (secret_len & 1) - return -1; - MD5_addr[0] = A_MD5; MD5_len[0] = MD5_MAC_LEN; MD5_addr[1] = (unsigned char *) label; |