esc/src/app/xul/esc/defaults/preferences esc-prefs.js, 1.7, 1.7.2.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/defaults/preferences
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21407
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
esc-prefs.js
Log Message:
Adjust for DOS line endings.
Index: esc-prefs.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/defaults/preferences/esc-prefs.js,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- esc-prefs.js 29 Mar 2009 00:54:57 -0000 1.7
+++ esc-prefs.js 23 Nov 2009 19:34:18 -0000 1.7.2.1
@@ -1,49 +1,49 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * 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.
- *
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#pref("toolkit.defaultChromeURI", "chrome://esc/content/settings.xul");
-
-
-pref("signed.applets.codebase_principal_support",true);
-
-pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
-pref("capability.principal.codebase.p0.id", "file://");
-
-pref("esc.tps.message.timeout","90");
-
-#Do we populate CAPI certs on windows?
-
-pref("esc.windows.do.capi","yes");
-
-
-#Sample Security Officer Enrollment UI
-
-#pref("esc.security.url","http://test.host.com:7888/cgi-bin/so/enroll.cgi");
-
-#Sample Security Officer Workstation UI
-
-#pref("esc.security.url","https://dhcp-170.sjc.redhat.com:7889/cgi-bin/sow/welcome.cgi");
-
-#Hide the format button or not.
-
-pref("esc.hide.format","no");
-
-
-#Use this if you absolutely want a global phone home url for all tokens
-#Not recommended!
-
-#pref("esc.global.phone.home.url","http:/test.host.com:7888/cgi-bin/home/index.cgi");
+/** BEGIN COPYRIGHT BLOCK
+ * This Program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; version 2 of the License.
+ *
+ * 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.
+ *
+ * Copyright (C) 2005 Red Hat, Inc.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+
+#pref("toolkit.defaultChromeURI", "chrome://esc/content/settings.xul");
+
+
+pref("signed.applets.codebase_principal_support",true);
+
+pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
+pref("capability.principal.codebase.p0.id", "file://");
+
+pref("esc.tps.message.timeout","90");
+
+#Do we populate CAPI certs on windows?
+
+pref("esc.windows.do.capi","yes");
+
+
+#Sample Security Officer Enrollment UI
+
+#pref("esc.security.url","http://test.host.com:7888/cgi-bin/so/enroll.cgi");
+
+#Sample Security Officer Workstation UI
+
+#pref("esc.security.url","https://dhcp-170.sjc.redhat.com:7889/cgi-bin/sow/welcome.cgi");
+
+#Hide the format button or not.
+
+pref("esc.hide.format","no");
+
+
+#Use this if you absolutely want a global phone home url for all tokens
+#Not recommended!
+
+#pref("esc.global.phone.home.url","http:/test.host.com:7888/cgi-bin/home/index.cgi");
14 years
esc/win32 build.sh,1.11.2.7,1.11.2.8
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/win32
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19813
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
build.sh
Log Message:
Quick tweak of link line for later versions of MSVC.
Index: build.sh
===================================================================
RCS file: /cvs/dirsec/esc/win32/build.sh,v
retrieving revision 1.11.2.7
retrieving revision 1.11.2.8
diff -u -r1.11.2.7 -r1.11.2.8
--- build.sh 20 Nov 2009 00:53:42 -0000 1.11.2.7
+++ build.sh 21 Nov 2009 01:28:35 -0000 1.11.2.8
@@ -377,7 +377,7 @@
echo 'CKY_INCLUDE="-I$ZLIB_INC_PATH -I$CKY_INCLUDE_PATH" CKY_LIB_LDD=$CKY_INCLUDE_PATH/.libs USE_XUL_SDK=1 ESC_VERSION=$ESC_VERSION_NO"'
- make BUILD_OPT=1 import
+ make BUILD_OPT=1 OS_RELEASE=$OS_RELEASE import
make OS_RELEASE=$OS_RELEASE BUILD_OPT=1 CKY_INCLUDE="-I$ZLIB_INC_PATH -I$CKY_INCLUDE_PATH" CKY_LIB_LDD=$CKY_INCLUDE_PATH/.libs USE_XUL_SDK=1 ESC_VERSION=$ESC_VERSION_NO
@@ -392,7 +392,7 @@
#take care of eginstall
cd src/app/eginstall
- make BUILD_OPT=1 install
+ make BUILD_OPT=1 OS_RELEASE=$OS_RELEASE install
cd ../../..
cp dist/WIN*/coolkey_drivers/egate/eginstall.exe ../BUILD/egate
14 years
esc/src/app/xpcom Makefile.sdk,1.4,1.4.2.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13390
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
Makefile.sdk
Log Message:
Quick tweak of link line for later versions of MSVC.
Index: Makefile.sdk
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/Makefile.sdk,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- Makefile.sdk 19 Jun 2009 21:03:39 -0000 1.4
+++ Makefile.sdk 21 Nov 2009 01:09:12 -0000 1.4.2.1
@@ -145,7 +145,7 @@
GECKO_INCLUDES += -I $(GECKO_SDK_PATH)/sdk/include
OBJECT = rhCoolKey.obj
OBJECTCSP = CoolKeyCSP.obj
-COOL_LDFLAGS = -IMPLIB:fake-import /LIBPATH:$(CORE_DIST)/lib ckymanager.lib httpchunked.lib $(GECKO_LD_LIBS) nssutil3.lib nss3.lib ssl3.lib smime3.lib softokn3.lib /LIBPATH:$(CKY_LIB_LDD) libckyapplet.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib /NODEFAULTLIB:libc.lib
+COOL_LDFLAGS = -IMPLIB:fake-import /LIBPATH:$(CORE_DIST)/lib ckymanager.lib httpchunked.lib $(GECKO_LD_LIBS) nssutil3.lib nss3.lib ssl3.lib smime3.lib softokn3.lib /LIBPATH:$(CKY_LIB_LDD) libckyapplet.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libmsvcrt.lib
endif
ifeq ($(OS_ARCH),Darwin)
14 years
esc/win32 build.sh,1.11.2.6,1.11.2.7
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/win32
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14187
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
build.sh
Log Message:
Fix typo.
Index: build.sh
===================================================================
RCS file: /cvs/dirsec/esc/win32/build.sh,v
retrieving revision 1.11.2.6
retrieving revision 1.11.2.7
diff -u -r1.11.2.6 -r1.11.2.7
--- build.sh 20 Nov 2009 00:51:06 -0000 1.11.2.6
+++ build.sh 20 Nov 2009 00:53:42 -0000 1.11.2.7
@@ -379,7 +379,7 @@
make BUILD_OPT=1 import
- make BUILD_OPT=1 CKY_INCLUDE="-I$ZLIB_INC_PATH -I$CKY_INCLUDE_PATH" CKY_LIB_LDD=$CKY_INCLUDE_PATH/.libs USE_XUL_SDK=1 ESC_VERSION=$ESC_VERSION_NO
+ make OS_RELEASE=$OS_RELEASE BUILD_OPT=1 CKY_INCLUDE="-I$ZLIB_INC_PATH -I$CKY_INCLUDE_PATH" CKY_LIB_LDD=$CKY_INCLUDE_PATH/.libs USE_XUL_SDK=1 ESC_VERSION=$ESC_VERSION_NO
if [ $? != 0 ];
14 years
esc/win32 build.sh,1.11.2.5,1.11.2.6
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/win32
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12763
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
build.sh
Log Message:
Fix script for later Visual Studio.
Index: build.sh
===================================================================
RCS file: /cvs/dirsec/esc/win32/build.sh,v
retrieving revision 1.11.2.5
retrieving revision 1.11.2.6
diff -u -r1.11.2.5 -r1.11.2.6
--- build.sh 17 Nov 2009 23:13:17 -0000 1.11.2.5
+++ build.sh 20 Nov 2009 00:51:06 -0000 1.11.2.6
@@ -98,11 +98,19 @@
#Value for the location of Moz Tools needed to compile
-MOZ_TOOLS_BIN_PATH=/cygdrive/c/moztools/bin:/cygdrive/d/moztools/bin
+#MOZ_TOOLS_BIN_PATH=/cygdrive/c/moztools/bin:/cygdrive/d/moztools/bin
+MOZ_TOOLS_BIN_PATH=/cygdrive/c/mozilla-build/moztools/bin
export PATH=${MOZ_TOOLS_BIN_PATH}:${ORIG_PATH}
-CORE_OBJ_DIR=`uname``uname -r`_OPT.OBJ
+if test "${OS_RELEASE+set}" != set ; then
+
+ CORE_OBJ_DIR=`uname``uname -r`_OPT.OBJ
+else
+ CORE_OBJ_DIR="WINNT$OS_RELEASE"_OPT.OBJ
+
+fi
+
export PATH=${ORIG_PATH}
@@ -143,7 +151,7 @@
fi
cd $NSS_NAME/mozilla/security/nss
- make BUILD_OPT=1 nss_build_all
+ make BUILD_OPT=1 OS_RELEASE=$OS_RELEASE nss_build_all
if [ $? != 0 ];
then
echo "Can't make nss."
14 years
esc/src/app/xul/esc/chrome/locale/en-US esc.properties, 1.9, 1.10
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/locale/en-US
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2183/app/xul/esc/chrome/locale/en-US
Modified Files:
esc.properties
Log Message:
Merge errata changes to the trunk.
Index: esc.properties
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/locale/en-US/esc.properties,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- esc.properties 7 Jun 2009 00:09:16 -0000 1.9
+++ esc.properties 17 Nov 2009 23:44:36 -0000 1.10
@@ -176,6 +176,10 @@
errorEnrolledFirst=Smart card must be enrolled first! Enroll card and try again.
enrollmentFor=Enrollment of your
errorNeedKeyForSecMode=Please insert enrolled smart card before attempting secure mode.
+
+errorEnrollmentUI=Problem loading Enrollment UI, check your network connection, re-insert the card, and try again!
+errorPhoneHomeInfo=Problem loading Phone Home Information, check your network connection, re-insert the card, and try again!
+
wasSuccessful=was successful.
pinResetSuccessful=Password Reset was successfull!
formatOf=Format of
14 years
esc/src/lib/coolkey CoolKey_Message.cpp, 1.3, 1.4 NSSManager.cpp, 1.6, 1.7 NSSManager.h, 1.5, 1.6 SmartCardMonitoringThread.cpp, 1.5, 1.6 SmartCardMonitoringThread.h, 1.1.1.1, 1.2
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2183/lib/coolkey
Modified Files:
CoolKey_Message.cpp NSSManager.cpp NSSManager.h
SmartCardMonitoringThread.cpp SmartCardMonitoringThread.h
Log Message:
Merge errata changes to the trunk.
Index: CoolKey_Message.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey_Message.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CoolKey_Message.cpp 24 Feb 2007 02:19:44 -0000 1.3
+++ CoolKey_Message.cpp 17 Nov 2009 23:44:37 -0000 1.4
@@ -560,7 +560,12 @@
string lPassword = getStringValue(pKey);
- aOutputVal += sKey + delim1 + lScreenName + delim + pKey + delim1 + lPassword;
+ string ScreenName_encoded, Password_encoded;
+
+ URLEncode_str(lScreenName, ScreenName_encoded);
+ URLEncode_str(lPassword, Password_encoded);
+
+ aOutputVal += sKey + delim1 + ScreenName_encoded + delim + pKey + delim1 + Password_encoded;
eCKMessage::encode(aOutputVal);
}
Index: NSSManager.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/NSSManager.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- NSSManager.cpp 13 Jun 2009 23:44:52 -0000 1.6
+++ NSSManager.cpp 17 Nov 2009 23:44:37 -0000 1.7
@@ -53,9 +53,7 @@
PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::NSSManager:\n",GetTStamp(tBuff,56)));
mpSCMonitoringThread = NULL;
NSSManager::lastError = NSS_NO_ERROR;
-#ifdef LINUX
systemCertDB = NULL;
-#endif
}
NSSManager::~NSSManager()
@@ -118,21 +116,44 @@
return E_FAIL;
}
-#ifdef LINUX
-
// Load our Linux only database
+ char modspec_alt[512];
+ // Load our alternate db, if provided.
- const char *modspec = "configdir='/etc/pki/nssdb' tokenDescripton='SystemDB' flags='readOnly'";
- PK11SlotInfo *systemCertDB = SECMOD_OpenUserDB(modspec);
+ const char *alt_db = CoolKeyGetConfig("esc.global.alt.nss.db");
- if(!systemCertDB)
+#ifdef LINUX
+
+ if(!alt_db)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager::InitNSS problem loading Linux System Cert Database!\n",GetTStamp(tBuff,56)));
+ alt_db = "/etc/pki/nssdb";
}
+ PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager alt_db %s \n",GetTStamp(tBuff,56),alt_db));
#endif
+ if(alt_db)
+ {
+ if(strlen(alt_db) < 400 )
+ {
+ sprintf(modspec_alt, "configdir='%s' tokenDescription='SystemDB' flags='readOnly'",alt_db);
+
+ PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager modspec_alt %s \n",GetTStamp(tBuff,56),modspec_alt));
+ systemCertDB = SECMOD_OpenUserDB(modspec_alt);
+
+ PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager systemCertDB %p \n",GetTStamp(tBuff,56),systemCertDB));
+
+ if(!systemCertDB)
+ {
+ PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager::InitNSS problem loading Alternate Cert Database!\n",GetTStamp(tBuff,56)));
+
+ }
+
+ }
+
+ }
+
mpSCMonitoringThread = new SmartCardMonitoringThread(userModule);
if (!mpSCMonitoringThread) {
SECMOD_UnloadUserModule(userModule);
@@ -157,16 +178,11 @@
// Logout all tokens.
PK11_LogoutAll();
-#ifdef LINUX
if(systemCertDB)
{
- SECMOD_CloseUserDB(systemCertDB);
-
PK11_FreeSlot(systemCertDB);
systemCertDB = NULL;
}
-
-#endif
}
bool
Index: NSSManager.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/NSSManager.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NSSManager.h 13 Jun 2009 23:44:52 -0000 1.5
+++ NSSManager.h 17 Nov 2009 23:44:37 -0000 1.6
@@ -15,6 +15,7 @@
* All rights reserved.
* END COPYRIGHT BLOCK **/
+
#ifdef DARWIN
#define COOLKEY_PKCS11_LIBRARY "/Library/Application Support/CoolKey/PKCS11/libcoolkeypk11.dylib"
#else
@@ -84,9 +85,7 @@
static unsigned int lastError;
-#ifdef LINUX
PK11SlotInfo *systemCertDB;
-#endif
SmartCardMonitoringThread *mpSCMonitoringThread;
};
Index: SmartCardMonitoringThread.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SmartCardMonitoringThread.cpp 6 Jun 2009 00:23:13 -0000 1.5
+++ SmartCardMonitoringThread.cpp 17 Nov 2009 23:44:37 -0000 1.6
@@ -33,7 +33,7 @@
static PRLogModuleInfo *coolKeyLogSC = PR_NewLogModule("coolKeySmart");
SmartCardMonitoringThread::SmartCardMonitoringThread(SECMODModule *aModule)
- : mModule(aModule), mThread(NULL)
+ : mModule(aModule), mThread(NULL), mGoingAway(0)
{
char tBuff[56];
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
@@ -67,6 +67,7 @@
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
("%s SmartCardMonitoringThread::Stop : \n",GetTStamp(tBuff,56)));
+ mGoingAway = 1;
Interrupt();
}
@@ -104,9 +105,9 @@
char tBuff[56];
PK11SlotInfo *slot;
- #ifdef LINUX
- sleep(3);
- #endif
+ //Give the rest of the systems time to come up properly
+
+ PR_Sleep(PR_SecondsToInterval(3));
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
("%s SmartCardMonitoringThread::Execute.\n",GetTStamp(tBuff,56)));
@@ -116,6 +117,7 @@
/* PK11SlotList *sl =
PK11_FindSlotsByNames(mModule->dllName, NULL, NULL, PR_TRUE);
PK11SlotListElement *sle;
+
if (sl) {
@@ -142,6 +144,11 @@
PR_LOG( coolKeyLogSC, PR_LOG_ERROR,
("%s SmartCard thread event detected, but the slot is NULL.\n",GetTStamp(tBuff,56)));
+ if(!mGoingAway) {
+ PR_Sleep(PR_SecondsToInterval(2));
+ continue;
+ }
+
break;
}
Index: SmartCardMonitoringThread.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- SmartCardMonitoringThread.h 12 Jun 2006 23:39:52 -0000 1.1.1.1
+++ SmartCardMonitoringThread.h 17 Nov 2009 23:44:37 -0000 1.2
@@ -45,7 +45,8 @@
void Remove(CoolKeyInfo *info);
static void LaunchExecute(void *arg);
-
+
+ int mGoingAway;
SECMODModule *mModule;
PRThread* mThread;
char* mCurrentActivation;
14 years
esc/src/app/xul/esc application.ini,1.9,1.10
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2183/app/xul/esc
Modified Files:
application.ini
Log Message:
Merge errata changes to the trunk.
Index: application.ini
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/application.ini,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- application.ini 13 Jun 2009 23:44:51 -0000 1.9
+++ application.ini 17 Nov 2009 23:44:36 -0000 1.10
@@ -25,7 +25,7 @@
Name=ESC
;
; This field specifies your application's version. This field is optional.
-Version=1.1.0-7
+Version=1.1.0-9
;
; This field specifies your application's build ID (timestamp). This field is
; required.
14 years
esc/src/app/xul/esc/chrome/content/esc ESC.js, 1.24, 1.25 esc.css, 1.6, 1.7 esc.xul, 1.6, 1.7
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2183/app/xul/esc/chrome/content/esc
Modified Files:
ESC.js esc.css esc.xul
Log Message:
Merge errata changes to the trunk.
Index: ESC.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ESC.js 7 Jun 2009 00:09:15 -0000 1.24
+++ ESC.js 17 Nov 2009 23:44:36 -0000 1.25
@@ -29,7 +29,6 @@
var gFactoryMode = 0;
var gHiddenPage = 0;
var gExternalUI = 0;
-
loadStringBundle();
//ESC constants
@@ -1279,7 +1278,8 @@
}
else
{
- UpdateEnrollmentArea(keyType,keyID,keyInserted,showFullUI);
+ MyAlert(getBundleString("errorPhoneHomeInfo"));
+ window.close();
}
}
@@ -3260,10 +3260,74 @@
window.resizeBy(0,1);
window.resizeBy(0,-1);
}
+// nsIWebProgressListener to oversee the loading of the external UI
+var uiListener = null;
+var esc_enroll_uri = null;
+
+const STATE_START = Components.interfaces.nsIWebProgressListener.STATE_START;
+const STATE_STOP = Components.interfaces.nsIWebProgressListener.STATE_STOP;
+const STATE_IS_DOCUMENT = Components.interfaces.nsIWebProgressListener.STATE_IS_DOCUMENT;
+uiListener =
+{
+ QueryInterface: function(aIID)
+ {
+ if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
+ aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
+ aIID.equals(Components.interfaces.nsISupports))
+ return this;
+ throw Components.results.NS_NOINTERFACE;
+ },
+
+ onStateChange: function(aWebProgress, aRequest, aFlag, aStatus)
+ {
+ if(aFlag & STATE_START && aFlag & STATE_IS_DOCUMENT)
+ {
+ }
+ if(aFlag & STATE_STOP && aFlag & STATE_IS_DOCUMENT)
+ {
+
+ var url = aWebProgress.DOMWindow.document.URL;
+
+ if(url != esc_enroll_uri)
+ {
+ MyAlert(getBundleString("errorEnrollmentUI"));
+
+ if(uiListener)
+ aWebProgress.removeProgressListener(uiListener);
+
+ var enrollWnd = IsPageWindowPresent(ENROLL_WINDOW);
+
+ if(enrollWnd)
+ {
+ enrollWnd.close();
+ }
+ }
+ else
+ {
+ if(uiListener)
+ aWebProgress.removeProgressListener(uiListener);
+ }
+ }
+ },
+
+ onLocationChange: function(aProgress, aRequest, aURI)
+ {
+ },
+ onProgressChange: function(aWebProgress, aRequest, curSelf, maxSelf, curTot, maxTot)
+ {
+ },
+ onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
+ {
+ },
+ onSecurityChange: function(aWebProgress, aRequest, aState)
+ {
+ }
+}
function loadExternalESCUI()
{
- var esc_enroll_uri = null;
+
+ esc_enroll_uri = null;
var keyType= null;
var keyID = null;
@@ -3285,7 +3349,6 @@
}
var esc_enrolled_token_url = null;
- var esc_enroll_uri = null;
if(keyID)
{
@@ -3323,8 +3386,9 @@
if(ui_id)
{
+ UpdateEnrollmentArea(keyType,keyID,inserted,showFullUI,showExternalUI);
+ ui_id.addProgressListener(uiListener,Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
ui_id.setAttribute("src",esc_enroll_uri);
- UpdateEnrollmentArea(keyType,keyID,inserted,showFullUI,showExternalUI)
}
}
Index: esc.css
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc.css,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- esc.css 26 Feb 2009 22:34:43 -0000 1.6
+++ esc.css 17 Nov 2009 23:44:36 -0000 1.7
@@ -334,6 +334,10 @@
border: black solid 4px;
}
+.BorderedBrowser {
+ border: black solid 4px;
+}
+
.SelectedRow {
color: white;
Index: esc.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc.xul,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- esc.xul 7 May 2007 23:49:23 -0000 1.6
+++ esc.xul 17 Nov 2009 23:44:36 -0000 1.7
@@ -147,7 +147,7 @@
</hbox>
</vbox>
- <iframe id="esc-ui" flex="1" class="BorderedIFrame" hidden="true"/>
+ <browser id="esc-ui" class="BorderedBrowser" height="725" flex="1" hidden="true" src="" />
</groupbox>
<hbox id = "enrollment_button_box">
<spacer flex = "4"/>
14 years
esc/src/lib/coolkey SmartCardMonitoringThread.cpp, 1.5, 1.5.2.1 SmartCardMonitoringThread.h, 1.1.1.1, 1.1.1.1.8.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1227
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
SmartCardMonitoringThread.cpp SmartCardMonitoringThread.h
Log Message:
Bug 530633 - ESC on 64 bit Windows does not recognize Gemalto token insert event.
Index: SmartCardMonitoringThread.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.cpp,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- SmartCardMonitoringThread.cpp 6 Jun 2009 00:23:13 -0000 1.5
+++ SmartCardMonitoringThread.cpp 17 Nov 2009 23:40:53 -0000 1.5.2.1
@@ -33,7 +33,7 @@
static PRLogModuleInfo *coolKeyLogSC = PR_NewLogModule("coolKeySmart");
SmartCardMonitoringThread::SmartCardMonitoringThread(SECMODModule *aModule)
- : mModule(aModule), mThread(NULL)
+ : mModule(aModule), mThread(NULL), mGoingAway(0)
{
char tBuff[56];
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
@@ -67,6 +67,7 @@
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
("%s SmartCardMonitoringThread::Stop : \n",GetTStamp(tBuff,56)));
+ mGoingAway = 1;
Interrupt();
}
@@ -104,9 +105,9 @@
char tBuff[56];
PK11SlotInfo *slot;
- #ifdef LINUX
- sleep(3);
- #endif
+ //Give the rest of the systems time to come up properly
+
+ PR_Sleep(PR_SecondsToInterval(3));
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
("%s SmartCardMonitoringThread::Execute.\n",GetTStamp(tBuff,56)));
@@ -116,6 +117,7 @@
/* PK11SlotList *sl =
PK11_FindSlotsByNames(mModule->dllName, NULL, NULL, PR_TRUE);
PK11SlotListElement *sle;
+
if (sl) {
@@ -142,6 +144,11 @@
PR_LOG( coolKeyLogSC, PR_LOG_ERROR,
("%s SmartCard thread event detected, but the slot is NULL.\n",GetTStamp(tBuff,56)));
+ if(!mGoingAway) {
+ PR_Sleep(PR_SecondsToInterval(2));
+ continue;
+ }
+
break;
}
Index: SmartCardMonitoringThread.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.8.1
diff -u -r1.1.1.1 -r1.1.1.1.8.1
--- SmartCardMonitoringThread.h 12 Jun 2006 23:39:52 -0000 1.1.1.1
+++ SmartCardMonitoringThread.h 17 Nov 2009 23:40:53 -0000 1.1.1.1.8.1
@@ -45,7 +45,8 @@
void Remove(CoolKeyInfo *info);
static void LaunchExecute(void *arg);
-
+
+ int mGoingAway;
SECMODModule *mModule;
PRThread* mThread;
char* mCurrentActivation;
14 years