Home | History | Annotate | Download | only in utils

Lines Matching refs:pin

232 static int scard_verify_pin(struct scard_data *scard, const char *pin);
430 * selected sim_type. In addition, local flag is set if a PIN is needed to
585 wpa_printf(MSG_DEBUG, "SCARD: Failed to determine whether PIN "
612 * scard_set_pin - Set PIN (CHV1/PIN1) code for accessing SIM/USIM commands
614 * @pin: PIN code as an ASCII string (e.g., "1234")
617 int scard_set_pin(struct scard_data *scard, const char *pin)
624 if (pin == NULL) {
625 wpa_printf(MSG_DEBUG, "No PIN configured for SIM "
629 if (scard_verify_pin(scard, pin)) {
630 wpa_printf(MSG_INFO, "PIN verification failed for "
916 static int scard_verify_pin(struct scard_data *scard, const char *pin)
923 wpa_printf(MSG_DEBUG, "SCARD: verifying PIN");
925 if (pin == NULL || os_strlen(pin) > 8)
930 os_memcpy(cmd + 5, pin, os_strlen(pin));
931 os_memset(cmd + 5 + os_strlen(pin), 0xff, 8 - os_strlen(pin));
939 wpa_printf(MSG_WARNING, "SCARD: PIN verification failed");
943 wpa_printf(MSG_DEBUG, "SCARD: PIN verified successfully");
959 * file is PIN protected, scard_set_pin() must have been used to set the
960 * correct PIN code before calling scard_get_imsi().