[pkg-opensc-commit] [libp11] 13/51: Allow PIN values of at least 4 characters
Eric Dorland
eric at moszumanska.debian.org
Wed Dec 7 17:51:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit 0f75b4ce3a46e8e3af5d01e4e7d98211faf96672
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date: Fri Oct 7 23:34:05 2016 +0200
Allow PIN values of at least 4 characters
---
src/eng_back.c | 2 +-
src/p11_key.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/eng_back.c b/src/eng_back.c
index 2fe18f4..45d8b5f 100644
--- a/src/eng_back.c
+++ b/src/eng_back.c
@@ -111,7 +111,7 @@ static int get_pin(ENGINE_CTX *ctx, UI_METHOD *ui_method, void *callback_data)
memset(ctx->pin, 0, MAX_PIN_LENGTH+1);
ctx->pin_length = MAX_PIN_LENGTH;
if (!UI_add_input_string(ui, "PKCS#11 token PIN: ",
- UI_INPUT_FLAG_DEFAULT_PWD, ctx->pin, 1, MAX_PIN_LENGTH)) {
+ UI_INPUT_FLAG_DEFAULT_PWD, ctx->pin, 4, MAX_PIN_LENGTH)) {
fprintf(stderr, "UI_add_input_string failed\n");
UI_free(ui);
return 0;
diff --git a/src/p11_key.c b/src/p11_key.c
index dd45aed..3a38907 100644
--- a/src/p11_key.c
+++ b/src/p11_key.c
@@ -362,7 +362,7 @@ int pkcs11_authenticate(PKCS11_KEY *key)
UI_add_user_data(ui, kpriv->ui_user_data);
memset(pin, 0, MAX_PIN_LENGTH+1);
if (!UI_add_input_string(ui, "PKCS#11 key PIN: ",
- UI_INPUT_FLAG_DEFAULT_PWD, pin, 1, MAX_PIN_LENGTH)) {
+ UI_INPUT_FLAG_DEFAULT_PWD, pin, 4, MAX_PIN_LENGTH)) {
UI_free(ui);
return PKCS11_UI_FAILED;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list