[pkg-opensc-commit] [libp11] 03/27: Don't warn about no keys during the first round of enumeration (#157)
Eric Dorland
eric at moszumanska.debian.org
Mon Aug 7 19:48:08 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 429db5cca398351f9c9ad9aa16e32e7ffd6017f3
Author: Mantas Mikulėnas <grawity at gmail.com>
Date: Mon May 1 17:15:38 2017 +0300
Don't warn about no keys during the first round of enumeration (#157)
It is possible (e.g. with softhsm2) that *all* keys require login and
will be found during the second round.
---
src/eng_back.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/eng_back.c b/src/eng_back.c
index 9dc50c4..01c4082 100644
--- a/src/eng_back.c
+++ b/src/eng_back.c
@@ -783,8 +783,9 @@ static EVP_PKEY *ctx_load_key(ENGINE_CTX *ctx, const char *s_slot_key_id,
}
}
if (key_count == 0) {
- fprintf(stderr, "No %s keys found.\n",
- (char *)(isPrivate ? "private" : "public"));
+ if (login) /* Only print the error on the second attempt */
+ fprintf(stderr, "No %s keys found.\n",
+ (char *)(isPrivate ? "private" : "public"));
return NULL;
}
if (ctx->verbose)
--
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