[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-directory-commits] esc/src/lib/coolkey CoolKey.cpp,1.2,1.3



Author: jmagne

Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31138

Modified Files:
	CoolKey.cpp 
Log Message:
Mac only fix for function GetIssuerInfo.



Index: CoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CoolKey.cpp	27 Sep 2006 17:47:46 -0000	1.2
+++ CoolKey.cpp	17 Jan 2007 19:11:59 -0000	1.3
@@ -860,9 +860,11 @@
 
     HRESULT result = S_OK;
 
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: Before CKYCardCreate_Context.\n"));
 
     CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
 
+     PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: After CKYCardCreate_Context. \n"));
      assert(cardCtxt);
     if (!cardCtxt) {
       PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Attempting to get key issuer info. Can't create Card Context !.\n"));
@@ -870,7 +872,9 @@
       goto done;
     }
 
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: Before CKYCardConnection_Create.\n"));
     conn = CKYCardConnection_Create(cardCtxt);
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: After CKYCardConnection_Create.\n"));
     assert(conn);
     if (!conn) {
       PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Attempting to get key issuer info.  Can't create Card Connection!\n"));
@@ -878,7 +882,9 @@
       goto done;
     }
 
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: Before GetReaderNameForKeyID.\n"));
     readerName = GetReaderNameForKeyID(aKey);
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: After GetReaderNameForKeyID.\n"));
     assert(readerName);
     if (!readerName) {
       PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Attempting to get key issuer info.  Can't get reader name!\n"));
@@ -886,7 +892,9 @@
       goto done;
     }
 
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: Before CKYCardConnection_Connect.\n"));
     status = CKYCardConnection_Connect(conn, readerName);
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: After CKYCardConnection_Connect.\n"));
     if (status != CKYSUCCESS) {
       PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Attempting to get key issuer info. Can't connect to Card!\n"));
 
@@ -894,18 +902,25 @@
       goto done;
     }
 
-CKYCardConnection_BeginTransaction(conn);
+    #ifndef DARWIN
+    CKYCardConnection_BeginTransaction(conn);
+    #endif
     apduRC = 0;
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: Before CKYApplet_SelectCoolKeyManager.\n"));
     status = CKYApplet_SelectCoolKeyManager(conn, &apduRC);
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: After CKYApplet_SelectCoolKeyManager.\n"));
     if (status != CKYSUCCESS) {
 
       PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Attempting to get key issuer info.  Can't select CoolKey manager!\n"));
       goto done;
     }
 
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: Before CKYApplet_GetIssuerInfo.\n"));
     status = CKYApplet_GetIssuerInfo(conn, &ISSUER_INFO,
                         &apduRC);
 
+    PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetIssuerInfo:: After CKYApplet_GetIssuerInfo.\n"));
+
     if(status != CKYSUCCESS)
     {
         PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Attempting to get key issuer info.  Error actually getting IssuerInfo!\n"));
@@ -941,7 +956,9 @@
     done:
 
     if (conn) {
+      #ifndef DARWIN
       CKYCardConnection_EndTransaction(conn);
+      #endif
       CKYCardConnection_Disconnect(conn);
       CKYCardConnection_Destroy(conn);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]