[pkg-opensc-commit] [opensc] 03/295: Move PIN type label front of description

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 22f9ad704a4d69a7cb08f92987413cfd633f7a81
Author: Raul Metsma <raul at metsma.ee>
Date:   Wed Apr 13 13:57:32 2016 +0300

    Move PIN type label front of description
    
    With very long labels it is unable identify which PIN Firefox is asking.
    PKCS11 label is 32 char's and it gets truncated.
    
    Current format "LABEL (PIN1)"
    New format "PIN1: LABEL"
---
 src/pkcs11/framework-pkcs15.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pkcs11/framework-pkcs15.c b/src/pkcs11/framework-pkcs15.c
index 0d7e140..9fcea24 100644
--- a/src/pkcs11/framework-pkcs15.c
+++ b/src/pkcs11/framework-pkcs15.c
@@ -972,7 +972,7 @@ pkcs15_init_slot(struct sc_pkcs15_card *p15card, struct sc_pkcs11_slot *slot,
 		}
 		else   {
 			if (auth->label[0])
-				snprintf(label, sizeof(label), "%s (%.*s)", p15card->tokeninfo->label, (int) sizeof auth->label, auth->label);
+				snprintf(label, sizeof(label), "%.*s: %s", (int) sizeof auth->label, auth->label, p15card->tokeninfo->label);
 			else
 				snprintf(label, sizeof(label), "%s", p15card->tokeninfo->label);
 			slot->token_info.flags |= CKF_LOGIN_REQUIRED;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list