Lines Matching refs:pin
88 static int mlock_pin_in_memory(char *pin);
106 * 0 in case of troubles (and sets "*pin" to NULL)
112 pk11_get_pin(char *dialog, char **pin)
115 *pin = NULL;
122 *pin = getpassphrase("Enter token PIN: ");
123 if (*pin == NULL)
138 if ((pw = strdup(*pin)) == NULL)
145 memset(*pin, 0, strlen(*pin));
146 *pin = pw;
159 if ((*pin = run_askpass(dialog)) == NULL)
502 pk11_cache_pin(char *pin)
511 if ((token_pin = strdup(pin)) == NULL)
521 if (mlock_pin_in_memory(pin) == 0)
546 mlock_pin_in_memory(char *pin)
591 strlcpy(token_pin, pin, PK11_MAX_PIN_LEN + 1);
658 &uri_struct->pin) == 0)
679 CKU_USER, (CK_UTF8CHAR*)uri_struct->pin,
680 strlen(uri_struct->pin))) != CKR_OK)
721 if (pk11_cache_pin(uri_struct->pin) == 0)
739 * PIN it was already cached by now so filling "uri_struct.pin" with
742 if (uri_struct->pin != NULL)
743 memset(uri_struct->pin, 0, strlen(uri_struct->pin));
751 if (uri_struct->pin != NULL)
752 memset(uri_struct->pin, 0, strlen(uri_struct->pin));
781 char *pin = NULL;
785 pin = token_pin;
786 else if (pk11_get_pin(passphrasedialog, &pin) == 0)
791 (CK_UTF8CHAR_PTR)pin, strlen(pin))) != CKR_OK)
801 if (pin != token_pin)
803 memset(pin, 0, strlen(pin));
804 OPENSSL_free(pin);