Lines Matching refs:token

41 static void wps_remove_nfc_pw_token(struct wps_nfc_pw_token *token)  in wps_remove_nfc_pw_token()  argument
43 dl_list_del(&token->list); in wps_remove_nfc_pw_token()
44 bin_clear_free(token, sizeof(*token)); in wps_remove_nfc_pw_token()
50 struct wps_nfc_pw_token *token, *prev; in wps_free_nfc_pw_tokens() local
51 dl_list_for_each_safe(token, prev, tokens, struct wps_nfc_pw_token, in wps_free_nfc_pw_tokens()
53 if (pw_id == 0 || pw_id == token->pw_id) in wps_free_nfc_pw_tokens()
54 wps_remove_nfc_pw_token(token); in wps_free_nfc_pw_tokens()
62 struct wps_nfc_pw_token *token; in wps_get_nfc_pw_token() local
63 dl_list_for_each(token, tokens, struct wps_nfc_pw_token, list) { in wps_get_nfc_pw_token()
64 if (pw_id == token->pw_id) in wps_get_nfc_pw_token()
65 return token; in wps_get_nfc_pw_token()
2706 struct wps_nfc_pw_token *token; in wps_process_m1() local
2712 token = wps_get_nfc_pw_token( in wps_process_m1()
2714 if (token && token->peer_pk_hash_known) { in wps_process_m1()
2719 dl_list_del(&token->list); in wps_process_m1()
2720 wps->nfc_pw_token = token; in wps_process_m1()
2735 } else if (token) { in wps_process_m1()
2738 wps->nfc_pw_token = token; in wps_process_m1()
3722 struct wps_nfc_pw_token *token; in wps_registrar_add_nfc_pw_token() local
3736 token = os_zalloc(sizeof(*token)); in wps_registrar_add_nfc_pw_token()
3737 if (token == NULL) in wps_registrar_add_nfc_pw_token()
3740 token->peer_pk_hash_known = pubkey_hash != NULL; in wps_registrar_add_nfc_pw_token()
3742 os_memcpy(token->pubkey_hash, pubkey_hash, in wps_registrar_add_nfc_pw_token()
3744 token->pw_id = pw_id; in wps_registrar_add_nfc_pw_token()
3745 token->pk_hash_provided_oob = pk_hash_provided_oob; in wps_registrar_add_nfc_pw_token()
3747 wpa_snprintf_hex_uppercase((char *) token->dev_pw, in wps_registrar_add_nfc_pw_token()
3748 sizeof(token->dev_pw), in wps_registrar_add_nfc_pw_token()
3750 token->dev_pw_len = dev_pw_len * 2; in wps_registrar_add_nfc_pw_token()
3753 dl_list_add(&reg->nfc_pw_tokens, &token->list); in wps_registrar_add_nfc_pw_token()
3804 struct wps_nfc_pw_token *token) in wps_registrar_remove_nfc_pw_token() argument
3815 if (token->peer_pk_hash_known) in wps_registrar_remove_nfc_pw_token()
3816 os_free(token); in wps_registrar_remove_nfc_pw_token()