This patch makes p11-kit a bit less verbose.

>From f93cd7bd44bf7bd57202d037cc6bb736e7e93211 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <n...@redhat.com>
Date: Fri, 27 Jun 2014 17:21:06 +0200
Subject: [PATCH] do not print: The module has already been initialized

There are software modules which when are reinitialized
return CKR_CRYPTOKI_ALREADY_INITIALIZED. That patch makes p11-kit
less eager to complain about there errors.
---
 p11-kit/modules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/p11-kit/modules.c b/p11-kit/modules.c
index 030f19d..6cffe51 100644
--- a/p11-kit/modules.c
+++ b/p11-kit/modules.c
@@ -2038,7 +2038,7 @@ p11_kit_modules_initialize (CK_FUNCTION_LIST **modules,
 
 	for (i = 0, out = 0; modules[i] != NULL; i++, out++) {
 		rv = modules[i]->C_Initialize (NULL);
-		if (rv != CKR_OK) {
+		if (rv != CKR_OK && rv != CKR_CRYPTOKI_ALREADY_INITIALIZED) {
 			name = p11_kit_module_get_name (modules[i]);
 			if (name == NULL)
 				name = strdup ("(unknown)");
-- 
1.9.3

_______________________________________________
p11-glue mailing list
p11-glue@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/p11-glue

Reply via email to