Lines Matching refs:kde
38 static u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len)
42 RSN_SELECTOR_PUT(pos, kde);
103 /* Peer MAC Address KDE */
107 /* Error KDE */
166 /* Initiator MAC Address KDE */
185 struct wpa_eapol_ie_parse kde;
199 if (wpa_supplicant_parse_ies((const u8 *) (key + 1), extra_len, &kde) <
205 if (kde.rsn_ie == NULL || kde.mac_addr == NULL ||
206 kde.mac_addr_len < ETH_ALEN) {
207 wpa_printf(MSG_INFO, "RSN: No RSN IE or MAC address KDE in "
213 MAC2STR(kde.mac_addr));
215 if (kde.rsn_ie_len > PEERKEY_MAX_IE_LEN) {
221 if (wpa_parse_wpa_ie_rsn(kde.rsn_ie, kde.rsn_ie_len, &ie) < 0) {
235 wpa_supplicant_send_smk_error(sm, src_addr, kde.mac_addr,
247 os_memcpy(peerkey->addr, kde.mac_addr, ETH_ALEN);
249 os_memcpy(peerkey->rsnie_i, kde.rsn_ie, kde.rsn_ie_len);
250 peerkey->rsnie_i_len = kde.rsn_ie_len;
447 struct wpa_eapol_ie_parse *kde)
450 MAC2STR(kde->mac_addr));
452 if (os_memcmp(kde->smk + PMK_LEN, peerkey->pnonce, WPA_NONCE_LEN) != 0)
454 wpa_printf(MSG_INFO, "RSN: PNonce in SMK KDE does not "
459 if (os_memcmp(kde->nonce, peerkey->inonce, WPA_NONCE_LEN) != 0) {
474 struct wpa_eapol_ie_parse *kde)
480 MAC2STR(kde->mac_addr));
481 if (kde->rsn_ie == NULL || kde->rsn_ie_len > PEERKEY_MAX_IE_LEN ||
482 wpa_parse_wpa_ie_rsn(kde->rsn_ie, kde->rsn_ie_len, &ie) < 0) {
494 if (os_memcmp(kde->smk + PMK_LEN, peerkey->inonce, WPA_NONCE_LEN) != 0)
496 wpa_printf(MSG_INFO, "RSN: INonce in SMK KDE does not "
501 os_memcpy(peerkey->rsnie_p, kde->rsn_ie, kde->rsn_ie_len);
502 peerkey->rsnie_p_len = kde->rsn_ie_len;
503 os_memcpy(peerkey->pnonce, kde->nonce, WPA_NONCE_LEN);
514 "unacceptable cipher", MAC2STR(kde->mac_addr));
515 wpa_supplicant_send_smk_error(sm, src_addr, kde->mac_addr,
531 struct wpa_eapol_ie_parse kde;
541 if (wpa_supplicant_parse_ies((const u8 *) (key + 1), extra_len, &kde) <
547 if (kde.mac_addr == NULL || kde.mac_addr_len < ETH_ALEN ||
548 kde.nonce == NULL || kde.nonce_len < WPA_NONCE_LEN ||
549 kde.smk == NULL || kde.smk_len < PMK_LEN + WPA_NONCE_LEN ||
550 kde.lifetime == NULL || kde.lifetime_len < 4) {
552 "Lifetime KDE in SMK M4/M5");
557 if (os_memcmp(peerkey->addr, kde.mac_addr, ETH_ALEN) == 0 &&
566 MAC2STR(kde.mac_addr));
572 peerkey, &kde) < 0)
575 if (wpa_supplicant_process_smk_m4(peerkey, &kde) < 0)
579 kde.smk, PMK_LEN);
582 lifetime = WPA_GET_BE32(kde.lifetime);
612 struct wpa_eapol_ie_parse kde;
625 if (wpa_supplicant_parse_ies((const u8 *) (key + 1), extra_len, &kde) <
631 if (kde.error == NULL || kde.error_len < sizeof(error)) {
632 wpa_printf(MSG_INFO, "RSN: No Error KDE in SMK Error");
636 if (kde.mac_addr && kde.mac_addr_len >= ETH_ALEN)
637 os_memcpy(peer, kde.mac_addr, ETH_ALEN);
640 os_memcpy(&error, kde.error, sizeof(error));
643 "RSN: SMK Error KDE received: MUI %d error_type %d peer "
648 if (kde.mac_addr &&
654 if (os_memcmp(peerkey->addr, kde.mac_addr, ETH_ALEN) ==
676 const u8 *kde;
688 kde = (const u8 *) (key + 1);
690 wpa_hexdump(MSG_DEBUG, "RSN: msg 1/4 key data", kde, len);
691 if (wpa_supplicant_parse_ies(kde, len, &ie) < 0 || ie.pmkid == NULL) {
750 struct wpa_eapol_ie_parse *kde)
755 if (kde->lifetime == NULL || kde->lifetime_len < sizeof(lifetime))
758 lifetime = WPA_GET_BE32(kde->lifetime);
785 struct wpa_eapol_ie_parse kde;
792 os_memset(&kde, 0, sizeof(kde));
795 * from the peer. It may also include Lifetime KDE. */
799 if (wpa_supplicant_parse_ies(keydata, len, &kde) < 0 ||
800 kde.pmkid == NULL || kde.rsn_ie == NULL) {
805 if (os_memcmp(kde.pmkid, peerkey->smkid, PMKID_LEN) != 0) {
807 kde.pmkid, PMKID_LEN);
811 if (kde.rsn_ie_len != peerkey->rsnie_p_len ||
812 os_memcmp(kde.rsn_ie, peerkey->rsnie_p, kde.rsn_ie_len) != 0) {
818 kde.rsn_ie, kde.rsn_ie_len);
822 wpa_supplicant_update_smk_lifetime(sm, peerkey, &kde);
834 struct wpa_eapol_ie_parse kde;
843 os_memset(&kde, 0, sizeof(kde));
846 * Lifetime KDE. */
850 if (wpa_supplicant_parse_ies(keydata, len, &kde) < 0) {
856 if (kde.rsn_ie_len != peerkey->rsnie_i_len ||
857 os_memcmp(kde.rsn_ie, peerkey->rsnie_i, kde.rsn_ie_len) != 0) {
865 kde.rsn_ie, kde.rsn_ie_len);
877 wpa_supplicant_update_smk_lifetime(sm, peerkey, &kde);
1050 * MIC=MIC, DataKDs=(RSNIE_I, MAC_P KDE))
1117 /* Peer MAC address KDE */