Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17947/lib/coolkey
Modified Files:
CoolKeyHandler.cpp manifest.mn
Log Message:
Latest RHEL fixes.
Index: CoolKeyHandler.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKeyHandler.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CoolKeyHandler.cpp 7 Jun 2007 21:21:17 -0000 1.4
+++ CoolKeyHandler.cpp 4 Feb 2009 01:43:47 -0000 1.5
@@ -48,7 +48,9 @@
//static char *test_extended_login =
"s=325&msg_type=13&invalid_login=0&blocked=0&error=&required_parameter0=id%3DUSER%5FID%26name%3DUser+ID%26desc%3DUser+ID%26type%3Dstring%26option%3Doption1%2Coption2%2Coption3&required_parameter1=id%3DUSER%5FPWD%26name%3DUser+Password%26desc%3DUser+Password%26type%3Dpassword%26option%3D&required_parameter2=id%3DUSER%5FPIN%26name%3DPIN%26desc%3DOne+time+PIN+received+via+mail%26type%3Dpassword%26option%3D";
#include <string>
-
+#ifndef CKO_NETSCAPE
+#define CKO_NETSCAPE CKO_NSS
+#endif
#ifndef CKO_MOZILLA_READER
#define CKO_MOZILLA_READER (CKO_NETSCAPE+5)
#define CKA_MOZILLA_IS_COOL_KEY (CKO_NETSCAPE+24)
@@ -2162,11 +2164,6 @@
info->mReaderName[label.len] = 0;
info->mInfoFlags = MapGetFlags(&tokenInfo);
- //Handle the isCOOLKey flag
- if(isACOOLKey) {
- info->mInfoFlags |= COOLKEY_INFO_IS_REALLY_A_COOLKEY_MASK;
- }
-
info->mCUID = (char *)malloc(35); /* should be a define ! */
if (!info->mCUID) {
goto failed;
@@ -2177,6 +2174,22 @@
goto failed;
}
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: tokenInfo.label
length %d.\n",GetTStamp(tBuff,56),strlen((char *) tokenInfo.label)));
+
+ // Give the CAC card some sort of unique key ID
+
+ if(strlen(info->mCUID) == 0)
+ {
+ strncpy(info->mCUID,(char *)tokenInfo.label,35);
+ info->mCUID[34] = 0;
+ isACOOLKey = 0;
+ }
+
+ //Handle the isCOOLKey flag
+ if(isACOOLKey) {
+ info->mInfoFlags |= COOLKEY_INFO_IS_REALLY_A_COOLKEY_MASK;
+ }
+
SECITEM_FreeItem(&ATR,PR_FALSE);
SECITEM_FreeItem(&label,PR_FALSE);
SECITEM_FreeItem(&isCOOLKey,PR_FALSE);
Index: manifest.mn
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/manifest.mn,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- manifest.mn 10 Jan 2007 02:21:25 -0000 1.3
+++ manifest.mn 4 Feb 2009 01:43:47 -0000 1.4
@@ -27,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
-I$(XULRUNNER_BASE)/dist/public/nss -I$(XULRUNNER_BASE)/dist/include/nspr
+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
-I$(GECKO_SDK_PATH)/include/nspr -I$(GECKO_SDK_PATH)/include/nss
MAPFILE = $(OBJDIR)/ckymanager.def
#EXTRA_LIBS += -L$(DIST)/lib -lckyapplet
Show replies by thread