[Fedora-directory-commits] esc/src/lib/coolkey Makefile, 1.1, 1.1.2.1 manifest.mn, 1.2, 1.2.2.1 CoolKey.cpp, 1.2, 1.2.2.1

Jack Magne (jmagne) fedora-directory-commits at redhat.com
Fri Jan 26 01:36:14 UTC 2007


Author: jmagne

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

Modified Files:
      Tag: ESC_CS_72_BRANCH
	Makefile manifest.mn CoolKey.cpp 
Log Message:
Mac Universal binary.


Index: Makefile
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/Makefile,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- Makefile	12 Jun 2006 23:39:52 -0000	1.1
+++ Makefile	26 Jan 2007 01:36:12 -0000	1.1.2.1
@@ -8,7 +8,7 @@
 # This Program is distributed in the hope that it will be useful, but WITHOUT
 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
+#       
 # You should have received a copy of the GNU General Public License along with
 # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
 # Place, Suite 330, Boston, MA 02111-1307 USA.
@@ -17,57 +17,30 @@
 # All rights reserved.
 # END COPYRIGHT BLOCK
 
+UNIVERSAL_OFFSET_PPC=ppc
+UNIVERSAL_OFFSET_386=i386
 
-#######################################################################
-# (1) Include initial platform-independent assignments (MANDATORY).   #
-#######################################################################
-
-include manifest.mn
-
-include config.mk
-
-#######################################################################
-# (2) Include "global" configuration information. (OPTIONAL)          #
-#######################################################################
-
+CORE_DEPTH=../../..
 include $(CORE_DEPTH)/coreconf/config.mk
 
-#only want the library
-SHARED_LIBRARY=
-IMPORT_LIBRARY=
-
-#######################################################################
-# (3) Include "component" configuration information. (OPTIONAL)       #
-#######################################################################
-
-DEFINES += -DDLL_PREFIX=\"$(DLL_PREFIX)\"
-DEFINES += -DDLL_SUFFIX=\"$(DLL_SUFFIX)\"
-
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
-#######################################################################
-
-#include config.mk
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL)                              #
-#######################################################################
-
 include $(CORE_DEPTH)/coreconf/rules.mk
 
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL)                           #
-#######################################################################
+libs::
 
+ifeq ($(OS_ARCH),Darwin)
 
+	echo "Build Darwin."
+	make -f Mac-universal.mk
+else
+	echo "Build Linux or Windows."
+	make -f common.mk
 
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL).                              #
-#######################################################################
-
-
-ifeq ($(OS_ARCH), WINNT)
-#CPPSRCS += CoolKeyCSP.cpp
 endif
 
+ifeq ($(OS_ARCH),Darwin)
+clean::
+	echo "Cleaning."
+	rm -rf $(UNIVERSAL_OFFSET_PPC)
+	rm -rf $(UNIVERSAL_OFFSET_386)
+	make -f common.mk clean
+endif


Index: manifest.mn
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/manifest.mn,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- manifest.mn	27 Sep 2006 17:47:46 -0000	1.2
+++ manifest.mn	26 Jan 2007 01:36:12 -0000	1.2.2.1
@@ -17,6 +17,9 @@
 
 CORE_DEPTH	= ../../..
 
+XULRUNNER_BASE=$(CORE_DEPTH)/dist/$(OBJDIR)//xulrunner_build
+
+
 SYS_INC		= /usr/include
 MODULE		= ckymanager
 LIBRARY_NAME	= $(MODULE)
@@ -24,7 +27,7 @@
 ifndef MOZ_OFFSET
 MOZ_OFFSET	= mozilla-1.7.13
 endif
-DEFINES		+= -I$(CORE_DEPTH)/esc/app/xpcom -I$(SYS_INC)/nspr4 -I$(SYS_INC)/nss3 -I$(SYS_INC)/PCSC  -I$(SYS_INC)/$(MOZ_OFFSET)/nspr -I$(SYS_INC)/$(MOZ_OFFSET)/nss
+DEFINES		+= -I$(CORE_DEPTH)/esc/app/xpcom -I$(SYS_INC)/nspr4 -I$(SYS_INC)/nss3 -I$(SYS_INC)/PCSC  -I$(SYS_INC)/$(MOZ_OFFSET)/nspr -I$(SYS_INC)/$(MOZ_OFFSET)/nss -I$(XULRUNNER_BASE)/dist/public/nss -I$(XULRUNNER_BASE)/dist/include/nspr
 MAPFILE 	= $(OBJDIR)/ckymanager.def
 
 #EXTRA_LIBS	+= -L$(DIST)/lib -lckyapplet


Index: CoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey.cpp,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- CoolKey.cpp	27 Sep 2006 17:47:46 -0000	1.2
+++ CoolKey.cpp	26 Jan 2007 01:36:12 -0000	1.2.2.1
@@ -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);
     }




More information about the Fedora-directory-commits mailing list