aboutsummaryrefslogtreecommitdiff
path: root/contrib/hostapd/ms_funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/hostapd/ms_funcs.c')
-rw-r--r--contrib/hostapd/ms_funcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/hostapd/ms_funcs.c b/contrib/hostapd/ms_funcs.c
index 9c50185ca1d9..590b58949d74 100644
--- a/contrib/hostapd/ms_funcs.c
+++ b/contrib/hostapd/ms_funcs.c
@@ -158,12 +158,14 @@ void get_master_key(const u8 *password_hash_hash, const u8 *nt_response,
};
const unsigned char *addr[3];
const size_t len[3] = { 16, 24, sizeof(magic1) };
+ u8 hash[SHA1_MAC_LEN];
addr[0] = password_hash_hash;
addr[1] = nt_response;
addr[2] = magic1;
- sha1_vector(3, addr, len, master_key);
+ sha1_vector(3, addr, len, hash);
+ memcpy(master_key, hash, 16);
}