15510163 SUNBT6751375 debug slot selection code in the PKCS#11 engine needs some fixes
authorjenny.yung@oracle.com <jenny.yung@oracle.com>
Mon, 30 Sep 2013 16:08:58 -0700
changeset 1490 709dae0743cb
parent 1489 bad87e4131b9
child 1491 e753de6f1440
15510163 SUNBT6751375 debug slot selection code in the PKCS#11 engine needs some fixes
components/openssl/openssl-1.0.1/engines/pkcs11/e_pk11.c
--- a/components/openssl/openssl-1.0.1/engines/pkcs11/e_pk11.c	Fri Sep 27 15:22:40 2013 -0700
+++ b/components/openssl/openssl-1.0.1/engines/pkcs11/e_pk11.c	Mon Sep 30 16:08:58 2013 -0700
@@ -3078,7 +3078,8 @@
 		{
 		current_slot = pSlotList[i];
 
-		DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG, i);
+		DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG,
+		    current_slot);
 		/* Check if slot has random support. */
 		rv = pFuncList->C_GetTokenInfo(current_slot, &token_info);
 		if (rv != CKR_OK)
@@ -3107,7 +3108,8 @@
 		CK_BBOOL slot_has_dh = CK_FALSE;
 		current_slot = pSlotList[i];
 
-		DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG, i);
+		DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG,
+		    current_slot);
 		rv = pFuncList->C_GetTokenInfo(current_slot, &token_info);
 		if (rv != CKR_OK)
 			continue;
@@ -3220,9 +3222,11 @@
 	SLOTID = pSlotList[0];
 	for (i = 0; i < ulSlotCount; i++)
 		{
-		DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG, i);
-
 		current_slot = pSlotList[i];
+
+		DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG,
+		    current_slot);
+
 		current_slot_n_cipher = 0;
 		current_slot_n_digest = 0;
 		(void) memset(local_cipher_nids, 0, sizeof (local_cipher_nids));