Lines Matching refs:pin

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