Lines Matching refs:gd
1709 const struct wpa_gtk_data *gd, in wpa_supplicant_install_gtk() argument
1712 const u8 *_gtk = gd->gtk; in wpa_supplicant_install_gtk()
1715 wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len); in wpa_supplicant_install_gtk()
1717 "(keyidx=%d tx=%d).", gd->keyidx, gd->tx); in wpa_supplicant_install_gtk()
1718 wpa_hexdump(MSG_DEBUG, "WPA: RSC", key_rsc, gd->key_rsc_len); in wpa_supplicant_install_gtk()
1721 os_memcpy(gtk_buf, gd->gtk, 16); in wpa_supplicant_install_gtk()
1722 os_memcpy(gtk_buf + 16, gd->gtk + 24, 8); in wpa_supplicant_install_gtk()
1723 os_memcpy(gtk_buf + 24, gd->gtk + 16, 8); in wpa_supplicant_install_gtk()
1727 if (wpa_sm_set_key(sm, gd->alg, in wpa_supplicant_install_gtk()
1729 gd->keyidx, 1, key_rsc, gd->key_rsc_len, in wpa_supplicant_install_gtk()
1730 _gtk, gd->gtk_len) < 0) { in wpa_supplicant_install_gtk()
1735 } else if (wpa_sm_set_key(sm, gd->alg, in wpa_supplicant_install_gtk()
1737 gd->keyidx, gd->tx, key_rsc, gd->key_rsc_len, in wpa_supplicant_install_gtk()
1738 _gtk, gd->gtk_len) < 0) { in wpa_supplicant_install_gtk()
1771 struct wpa_gtk_data gd; in wpa_supplicant_pairwise_gtk() local
1781 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_pairwise_gtk()
1785 if (gtk_len < 2 || gtk_len - 2 > sizeof(gd.gtk)) in wpa_supplicant_pairwise_gtk()
1788 gd.keyidx = gtk[0] & 0x3; in wpa_supplicant_pairwise_gtk()
1789 gd.tx = wpa_supplicant_gtk_tx_bit_workaround(sm, in wpa_supplicant_pairwise_gtk()
1794 os_memcpy(gd.gtk, gtk, gtk_len); in wpa_supplicant_pairwise_gtk()
1795 gd.gtk_len = gtk_len; in wpa_supplicant_pairwise_gtk()
1799 &gd.key_rsc_len, &gd.alg) || in wpa_supplicant_pairwise_gtk()
1800 wpa_supplicant_install_gtk(sm, &gd, key->key_rsc)) { in wpa_supplicant_pairwise_gtk()
2965 struct wpa_gtk_data *gd) in wpa_supplicant_process_1_of_2_rsn() argument
2980 maxkeylen = gd->gtk_len = ie.gtk_len - 2; in wpa_supplicant_process_1_of_2_rsn()
2983 gd->gtk_len, maxkeylen, in wpa_supplicant_process_1_of_2_rsn()
2984 &gd->key_rsc_len, &gd->alg)) in wpa_supplicant_process_1_of_2_rsn()
2989 gd->keyidx = ie.gtk[0] & 0x3; in wpa_supplicant_process_1_of_2_rsn()
2990 gd->tx = wpa_supplicant_gtk_tx_bit_workaround(sm, in wpa_supplicant_process_1_of_2_rsn()
2992 if (ie.gtk_len - 2 > sizeof(gd->gtk)) { in wpa_supplicant_process_1_of_2_rsn()
2997 os_memcpy(gd->gtk, ie.gtk + 2, ie.gtk_len - 2); in wpa_supplicant_process_1_of_2_rsn()
3010 struct wpa_gtk_data *gd) in wpa_supplicant_process_1_of_2_wpa() argument
3015 gd->gtk_len = WPA_GET_BE16(key->key_length); in wpa_supplicant_process_1_of_2_wpa()
3034 gd->gtk_len, maxkeylen, in wpa_supplicant_process_1_of_2_wpa()
3035 &gd->key_rsc_len, &gd->alg)) in wpa_supplicant_process_1_of_2_wpa()
3038 gd->keyidx = (key_info & WPA_KEY_INFO_KEY_INDEX_MASK) >> in wpa_supplicant_process_1_of_2_wpa()
3043 if (keydatalen > sizeof(gd->gtk)) { in wpa_supplicant_process_1_of_2_wpa()
3049 os_memcpy(gd->gtk, key + 1, keydatalen); in wpa_supplicant_process_1_of_2_wpa()
3050 rc4_skip(ek, 32, 256, gd->gtk, keydatalen); in wpa_supplicant_process_1_of_2_wpa()
3057 if (maxkeylen > sizeof(gd->gtk)) { in wpa_supplicant_process_1_of_2_wpa()
3065 (const u8 *) (key + 1), gd->gtk)) { in wpa_supplicant_process_1_of_2_wpa()
3071 gd->tx = wpa_supplicant_gtk_tx_bit_workaround( in wpa_supplicant_process_1_of_2_wpa()
3119 struct wpa_gtk_data gd; in wpa_supplicant_process_1_of_2() local
3121 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_process_1_of_2()
3134 &gd); in wpa_supplicant_process_1_of_2()
3138 ver, &gd); in wpa_supplicant_process_1_of_2()
3146 if (wpa_supplicant_install_gtk(sm, &gd, key->key_rsc) || in wpa_supplicant_process_1_of_2()