Home | History | Annotate | Download | only in wps

Lines Matching refs:wps

24 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg)
28 wpa_printf(MSG_DEBUG, "WPS: * Public Key");
29 pubkey = dh_init(dh_groups_get(WPS_DH_GROUP), &wps->dh_privkey);
32 wpa_printf(MSG_DEBUG, "WPS: Failed to initialize "
41 if (wps->registrar) {
42 wpabuf_free(wps->dh_pubkey_r);
43 wps->dh_pubkey_r = pubkey;
45 wpabuf_free(wps->dh_pubkey_e);
46 wps->dh_pubkey_e = pubkey;
55 wpa_printf(MSG_DEBUG, "WPS: * Request Type");
65 wpa_printf(MSG_DEBUG, "WPS: * Config Methods (%x)", methods);
75 wpa_printf(MSG_DEBUG, "WPS: * UUID-E");
85 wpa_printf(MSG_DEBUG, "WPS: * Device Password ID (%d)", id);
95 wpa_printf(MSG_DEBUG, "WPS: * Configuration Error (%d)", err);
103 int wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg)
109 if (wps->last_msg == NULL) {
110 wpa_printf(MSG_DEBUG, "WPS: Last message not available for "
118 addr[0] = wpabuf_head(wps->last_msg);
119 len[0] = wpabuf_len(wps->last_msg);
122 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash);
124 wpa_printf(MSG_DEBUG, "WPS: * Authenticator");
135 wpa_printf(MSG_DEBUG, "WPS: * Version");
145 wpa_printf(MSG_DEBUG, "WPS: * Message Type (%d)", msg_type);
153 int wps_build_enrollee_nonce(struct wps_data *wps, struct wpabuf *msg)
155 wpa_printf(MSG_DEBUG, "WPS: * Enrollee Nonce");
158 wpabuf_put_data(msg, wps->nonce_e, WPS_NONCE_LEN);
163 int wps_build_registrar_nonce(struct wps_data *wps, struct wpabuf *msg)
165 wpa_printf(MSG_DEBUG, "WPS: * Registrar Nonce");
168 wpabuf_put_data(msg, wps->nonce_r, WPS_NONCE_LEN);
173 int wps_build_auth_type_flags(struct wps_data *wps, struct wpabuf *msg)
175 wpa_printf(MSG_DEBUG, "WPS: * Authentication Type Flags");
183 int wps_build_encr_type_flags(struct wps_data *wps, struct wpabuf *msg)
185 wpa_printf(MSG_DEBUG, "WPS: * Encryption Type Flags");
193 int wps_build_conn_type_flags(struct wps_data *wps, struct wpabuf *msg)
195 wpa_printf(MSG_DEBUG, "WPS: * Connection Type Flags");
203 int wps_build_assoc_state(struct wps_data *wps, struct wpabuf *msg)
205 wpa_printf(MSG_DEBUG, "WPS: * Association State");
213 int wps_build_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg)
217 wpa_printf(MSG_DEBUG, "WPS: * Key Wrap Authenticator");
218 hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, wpabuf_head(msg),
228 int wps_build_encr_settings(struct wps_data *wps, struct wpabuf *msg,
235 wpa_printf(MSG_DEBUG, "WPS: * Encrypted Settings");
250 if (aes_128_cbc_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain)))