Home | History | Annotate | Download | only in utils

Lines Matching refs:pin

226 static int scard_verify_pin(struct scard_data *scard, const char *pin);
424 * selected sim_type. In addition, local flag is set if a PIN is needed to
579 wpa_printf(MSG_DEBUG, "SCARD: Failed to determine whether PIN "
606 PIN (CHV1/PIN1) code for accessing SIM/USIM commands
608 * @pin: PIN code as an ASCII string (e.g., "1234")
611 int scard_set_pin(struct scard_data *scard, const char *pin)
618 if (pin == NULL) {
619 wpa_printf(MSG_DEBUG, "No PIN configured for SIM "
623 if (scard_verify_pin(scard, pin)) {
624 wpa_printf(MSG_INFO, "PIN verification failed for "
910 static int scard_verify_pin(struct scard_data *scard, const char *pin)
917 wpa_printf(MSG_DEBUG, "SCARD: verifying PIN");
919 if (pin == NULL || os_strlen(pin) > 8)
924 os_memcpy(cmd + 5, pin, os_strlen(pin));
925 os_memset(cmd + 5 + os_strlen(pin), 0xff, 8 - os_strlen(pin));
933 wpa_printf(MSG_WARNING, "SCARD: PIN verification failed");
937 wpa_printf(MSG_DEBUG, "SCARD: PIN verified successfully");
953 * file is PIN protected, scard_set_pin() must have been used to set the
954 * correct PIN code before calling scard_get_imsi().