Blame SOURCES/0004-Include-the-token-name-when-a-PIN-is-provided-but-is.patch

d4b2f2
From c029b32c04a9a5993b9c8715fb82421fee613137 Mon Sep 17 00:00:00 2001
d4b2f2
From: Rob Crittenden <rcritten@redhat.com>
d4b2f2
Date: Fri, 31 Aug 2018 10:37:12 -0400
d4b2f2
Subject: [PATCH 2/7] Include the token name when a PIN is provided but is
d4b2f2
 unused
d4b2f2
d4b2f2
This improves the output so the user will know which token
d4b2f2
the PIN is missing for. Theoretically it should be the token
d4b2f2
they asked for but this will show certmogner's view of it.
d4b2f2
---
d4b2f2
 src/certread-n.c | 6 +++---
d4b2f2
 src/keygen-n.c   | 4 ++--
d4b2f2
 2 files changed, 5 insertions(+), 5 deletions(-)
d4b2f2
d4b2f2
diff --git a/src/certread-n.c b/src/certread-n.c
d4b2f2
index f2e78c07..57a38dcf 100644
d4b2f2
--- a/src/certread-n.c
d4b2f2
+++ b/src/certread-n.c
d4b2f2
@@ -259,9 +259,9 @@ cm_certread_n_main(int fd, struct cm_store_ca *ca, struct cm_store_entry *entry,
d4b2f2
 			if ((pin != NULL) &&
d4b2f2
 			    (strlen(pin) > 0) &&
d4b2f2
 			    (cb_data.n_attempts == 0)) {
d4b2f2
-				cm_log(1, "PIN was not needed to auth to cert "
d4b2f2
-				       "db, though one was provided. "
d4b2f2
-				       "Treating this as an error.\n");
d4b2f2
+				cm_log(1, "PIN was not needed to auth to token "
d4b2f2
+				       "%s, though one was provided. "
d4b2f2
+				       "Treating this as an error.\n", token);
d4b2f2
 				goto next_slot;
d4b2f2
 			}
d4b2f2
 		}
d4b2f2
diff --git a/src/keygen-n.c b/src/keygen-n.c
d4b2f2
index 8078a520..84b0bbd3 100644
d4b2f2
--- a/src/keygen-n.c
d4b2f2
+++ b/src/keygen-n.c
d4b2f2
@@ -400,8 +400,8 @@ next_slot:
d4b2f2
 	    (strlen(pin) > 0) &&
d4b2f2
 	    (cb_data.n_attempts == 0)) {
d4b2f2
 		cm_log(1, "PIN was not needed to auth to key "
d4b2f2
-		       "store, though one was provided. "
d4b2f2
-		       "Treating this as an error.\n");
d4b2f2
+		       "store token %s, though one was provided. "
d4b2f2
+		       "Treating this as an error.\n", token);
d4b2f2
 		PK11_FreeSlotList(slotlist);
d4b2f2
 		error = NSS_ShutdownContext(ctx);
d4b2f2
 		if (error != SECSuccess) {
d4b2f2
-- 
d4b2f2
2.14.4
d4b2f2