Lines Matching refs:token
43 static void wps_remove_nfc_pw_token(struct wps_nfc_pw_token *token) in wps_remove_nfc_pw_token() argument
45 dl_list_del(&token->list); in wps_remove_nfc_pw_token()
46 bin_clear_free(token, sizeof(*token)); in wps_remove_nfc_pw_token()
52 struct wps_nfc_pw_token *token, *prev; in wps_free_nfc_pw_tokens() local
53 dl_list_for_each_safe(token, prev, tokens, struct wps_nfc_pw_token, in wps_free_nfc_pw_tokens()
55 if (pw_id == 0 || pw_id == token->pw_id) in wps_free_nfc_pw_tokens()
56 wps_remove_nfc_pw_token(token); in wps_free_nfc_pw_tokens()
64 struct wps_nfc_pw_token *token; in wps_get_nfc_pw_token() local
65 dl_list_for_each(token, tokens, struct wps_nfc_pw_token, list) { in wps_get_nfc_pw_token()
66 if (pw_id == token->pw_id) in wps_get_nfc_pw_token()
67 return token; in wps_get_nfc_pw_token()
2692 struct wps_nfc_pw_token *token; in wps_process_m1() local
2698 token = wps_get_nfc_pw_token( in wps_process_m1()
2700 if (token && token->peer_pk_hash_known) { in wps_process_m1()
2705 dl_list_del(&token->list); in wps_process_m1()
2706 wps->nfc_pw_token = token; in wps_process_m1()
2721 } else if (token) { in wps_process_m1()
2724 wps->nfc_pw_token = token; in wps_process_m1()
3697 struct wps_nfc_pw_token *token; in wps_registrar_add_nfc_pw_token() local
3711 token = os_zalloc(sizeof(*token)); in wps_registrar_add_nfc_pw_token()
3712 if (token == NULL) in wps_registrar_add_nfc_pw_token()
3715 token->peer_pk_hash_known = pubkey_hash != NULL; in wps_registrar_add_nfc_pw_token()
3717 os_memcpy(token->pubkey_hash, pubkey_hash, in wps_registrar_add_nfc_pw_token()
3719 token->pw_id = pw_id; in wps_registrar_add_nfc_pw_token()
3720 token->pk_hash_provided_oob = pk_hash_provided_oob; in wps_registrar_add_nfc_pw_token()
3722 wpa_snprintf_hex_uppercase((char *) token->dev_pw, in wps_registrar_add_nfc_pw_token()
3723 sizeof(token->dev_pw), in wps_registrar_add_nfc_pw_token()
3725 token->dev_pw_len = dev_pw_len * 2; in wps_registrar_add_nfc_pw_token()
3728 dl_list_add(®->nfc_pw_tokens, &token->list); in wps_registrar_add_nfc_pw_token()
3779 struct wps_nfc_pw_token *token) in wps_registrar_remove_nfc_pw_token() argument
3790 if (token->peer_pk_hash_known) in wps_registrar_remove_nfc_pw_token()
3791 os_free(token); in wps_registrar_remove_nfc_pw_token()