• Home
  • Raw
  • Download

Lines Matching refs:pin

82 	u8 *pin;  member
92 static void wps_free_pin(struct wps_uuid_pin *pin) in wps_free_pin() argument
94 bin_clear_free(pin->pin, pin->pin_len); in wps_free_pin()
95 os_free(pin); in wps_free_pin()
99 static void wps_remove_pin(struct wps_uuid_pin *pin) in wps_remove_pin() argument
101 dl_list_del(&pin->list); in wps_remove_pin()
102 wps_free_pin(pin); in wps_remove_pin()
108 struct wps_uuid_pin *pin, *prev; in wps_free_pins() local
109 dl_list_for_each_safe(pin, prev, pins, struct wps_uuid_pin, list) in wps_free_pins()
110 wps_remove_pin(pin); in wps_free_pins()
199 struct wps_uuid_pin *pin);
713 struct wps_uuid_pin *pin; in wps_registrar_invalidate_unused() local
715 dl_list_for_each(pin, &reg->pins, struct wps_uuid_pin, list) { in wps_registrar_invalidate_unused()
716 if (pin->wildcard_uuid == 1 && !(pin->flags & PIN_LOCKED)) { in wps_registrar_invalidate_unused()
719 wps_registrar_remove_pin(reg, pin); in wps_registrar_invalidate_unused()
737 const u8 *uuid, const u8 *pin, size_t pin_len, in wps_registrar_add_pin() argument
751 p->pin = os_malloc(pin_len); in wps_registrar_add_pin()
752 if (p->pin == NULL) { in wps_registrar_add_pin()
756 os_memcpy(p->pin, pin, pin_len); in wps_registrar_add_pin()
773 wpa_hexdump_ascii_key(MSG_DEBUG, "WPS: PIN", pin, pin_len); in wps_registrar_add_pin()
792 struct wps_uuid_pin *pin) in wps_registrar_remove_pin() argument
797 if (is_zero_ether_addr(pin->enrollee_addr)) in wps_registrar_remove_pin()
800 addr = pin->enrollee_addr; in wps_registrar_remove_pin()
802 wps_remove_pin(pin); in wps_registrar_remove_pin()
809 struct wps_uuid_pin *pin, *prev; in wps_registrar_expire_pins() local
813 dl_list_for_each_safe(pin, prev, &reg->pins, struct wps_uuid_pin, list) in wps_registrar_expire_pins()
815 if ((pin->flags & PIN_EXPIRES) && in wps_registrar_expire_pins()
816 os_reltime_before(&pin->expiration, &now)) { in wps_registrar_expire_pins()
818 pin->uuid, WPS_UUID_LEN); in wps_registrar_expire_pins()
819 wps_registrar_remove_pin(reg, pin); in wps_registrar_expire_pins()
836 struct wps_uuid_pin *pin, *prev; in wps_registrar_invalidate_wildcard_pin() local
838 dl_list_for_each_safe(pin, prev, &reg->pins, struct wps_uuid_pin, list) in wps_registrar_invalidate_wildcard_pin()
840 if (dev_pw && pin->pin && in wps_registrar_invalidate_wildcard_pin()
841 (dev_pw_len != pin->pin_len || in wps_registrar_invalidate_wildcard_pin()
842 os_memcmp_const(dev_pw, pin->pin, dev_pw_len) != 0)) in wps_registrar_invalidate_wildcard_pin()
844 if (pin->wildcard_uuid) { in wps_registrar_invalidate_wildcard_pin()
846 pin->uuid, WPS_UUID_LEN); in wps_registrar_invalidate_wildcard_pin()
847 wps_registrar_remove_pin(reg, pin); in wps_registrar_invalidate_wildcard_pin()
864 struct wps_uuid_pin *pin, *prev; in wps_registrar_invalidate_pin() local
866 dl_list_for_each_safe(pin, prev, &reg->pins, struct wps_uuid_pin, list) in wps_registrar_invalidate_pin()
868 if (os_memcmp(pin->uuid, uuid, WPS_UUID_LEN) == 0) { in wps_registrar_invalidate_pin()
870 pin->uuid, WPS_UUID_LEN); in wps_registrar_invalidate_pin()
871 wps_registrar_remove_pin(reg, pin); in wps_registrar_invalidate_pin()
883 struct wps_uuid_pin *pin, *found = NULL; in wps_registrar_get_pin() local
887 dl_list_for_each(pin, &reg->pins, struct wps_uuid_pin, list) { in wps_registrar_get_pin()
888 if (!pin->wildcard_uuid && in wps_registrar_get_pin()
889 os_memcmp(pin->uuid, uuid, WPS_UUID_LEN) == 0) { in wps_registrar_get_pin()
890 found = pin; in wps_registrar_get_pin()
898 dl_list_for_each(pin, &reg->pins, struct wps_uuid_pin, list) { in wps_registrar_get_pin()
899 if (pin->wildcard_uuid == 1 || in wps_registrar_get_pin()
900 pin->wildcard_uuid == 2) { in wps_registrar_get_pin()
903 pin->wildcard_uuid++; in wps_registrar_get_pin()
904 os_memcpy(pin->uuid, uuid, WPS_UUID_LEN); in wps_registrar_get_pin()
905 found = pin; in wps_registrar_get_pin()
925 return found->pin; in wps_registrar_get_pin()
941 struct wps_uuid_pin *pin; in wps_registrar_unlock_pin() local
943 dl_list_for_each(pin, &reg->pins, struct wps_uuid_pin, list) { in wps_registrar_unlock_pin()
944 if (os_memcmp(pin->uuid, uuid, WPS_UUID_LEN) == 0) { in wps_registrar_unlock_pin()
945 if (pin->wildcard_uuid == 3) { in wps_registrar_unlock_pin()
950 pin->flags &= ~PIN_LOCKED; in wps_registrar_unlock_pin()
1356 const u8 *pin; in wps_get_dev_password() local
1364 pin = (const u8 *) "00000000"; in wps_get_dev_password()
1377 pin = wps->nfc_pw_token->dev_pw; in wps_get_dev_password()
1383 pin = wpabuf_head(wps->wps->ap_nfc_dev_pw); in wps_get_dev_password()
1387 pin = wps_registrar_get_pin(wps->wps->registrar, wps->uuid_e, in wps_get_dev_password()
1389 if (pin && wps->dev_pw_id >= 0x10) { in wps_get_dev_password()
1398 if (pin == NULL) { in wps_get_dev_password()
1410 os_memcpy(wps->dev_password, pin, pin_len); in wps_get_dev_password()