[pkg-opensc-commit] [libp11] 05/12: No longer login to access a public key

Eric Dorland eric at moszumanska.debian.org
Sat Jan 28 08:45:04 UTC 2017


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

eric pushed a commit to branch master
in repository libp11.

commit 5cb1a26b6ddaa9050616e76c3a7d05813febb6d0
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Fri Jan 13 07:38:25 2017 +0100

    No longer login to access a public key
    
    Fixes #143
---
 src/eng_back.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/eng_back.c b/src/eng_back.c
index 4f7ce43..b2546fc 100644
--- a/src/eng_back.c
+++ b/src/eng_back.c
@@ -746,12 +746,12 @@ static EVP_PKEY *ctx_load_key(ENGINE_CTX *ctx, const char *s_slot_key_id,
 		}
 	}
 
-	/* Perform login to the token if required */
-	if (!ctx_login(ctx, slot, tok, ui_method, callback_data)) {
-		fprintf(stderr, "Login to token failed, returning NULL...\n");
-		return NULL;
-	}
 	if (isPrivate) {
+		/* Perform login to the token if required */
+		if (!ctx_login(ctx, slot, tok, ui_method, callback_data)) {
+			fprintf(stderr, "Login to token failed, returning NULL...\n");
+			return NULL;
+		}
 		/* Make sure there is at least one private key on the token */
 		if (PKCS11_enumerate_keys(tok, &keys, &key_count)) {
 			fprintf(stderr, "Unable to enumerate private keys\n");

-- 
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