esc/src/lib/coolkey NSSManager.h, 1.5, 1.5.2.1 NSSManager.cpp, 1.6, 1.6.2.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv631
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
NSSManager.h NSSManager.cpp
Log Message:
Bug 528057 - ESC Installer does not support shared terminals.
Index: NSSManager.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/NSSManager.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- NSSManager.h 13 Jun 2009 23:44:52 -0000 1.5
+++ NSSManager.h 17 Nov 2009 23:38:43 -0000 1.5.2.1
@@ -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: NSSManager.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/NSSManager.cpp,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- NSSManager.cpp 13 Jun 2009 23:44:52 -0000 1.6
+++ NSSManager.cpp 17 Nov 2009 23:38:43 -0000 1.6.2.1
@@ -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
14 years, 4 months
esc/src/lib/coolkey CoolKey_Message.cpp,1.3,1.3.6.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32471
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
CoolKey_Message.cpp
Log Message:
Bug 523568 - rhcs80 esc - cannot enroll on some passwords when using SSHA password storage scheme.
Index: CoolKey_Message.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey_Message.cpp,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -r1.3 -r1.3.6.1
--- CoolKey_Message.cpp 24 Feb 2007 02:19:44 -0000 1.3
+++ CoolKey_Message.cpp 17 Nov 2009 23:36:15 -0000 1.3.6.1
@@ -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);
}
14 years, 4 months
esc/src/app/xul/esc/chrome/locale/en-US esc.properties, 1.9, 1.9.2.1
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-serv31671/chrome/locale/en-US
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
esc.properties
Log Message:
Bug 530482 - esc 1.1.0-8 WinXP tps 8.0 - no rendering in Smart Cart Enrollment window .
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.9.2.1
diff -u -r1.9 -r1.9.2.1
--- esc.properties 7 Jun 2009 00:09:16 -0000 1.9
+++ esc.properties 17 Nov 2009 23:33:11 -0000 1.9.2.1
@@ -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, 4 months
esc/src/app/xul/esc/chrome/content/esc ESC.js, 1.24, 1.24.2.1 esc.css, 1.6, 1.6.2.1 esc.xul, 1.6, 1.6.2.1
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-serv31671/chrome/content/esc
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
ESC.js esc.css esc.xul
Log Message:
Bug 530482 - esc 1.1.0-8 WinXP tps 8.0 - no rendering in Smart Cart Enrollment window .
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.24.2.1
diff -u -r1.24 -r1.24.2.1
--- ESC.js 7 Jun 2009 00:09:15 -0000 1.24
+++ ESC.js 17 Nov 2009 23:33:11 -0000 1.24.2.1
@@ -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.6.2.1
diff -u -r1.6 -r1.6.2.1
--- esc.css 26 Feb 2009 22:34:43 -0000 1.6
+++ esc.css 17 Nov 2009 23:33:11 -0000 1.6.2.1
@@ -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.6.2.1
diff -u -r1.6 -r1.6.2.1
--- esc.xul 7 May 2007 23:49:23 -0000 1.6
+++ esc.xul 17 Nov 2009 23:33:11 -0000 1.6.2.1
@@ -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, 4 months
esc/src/app/xul/esc application.ini,1.9,1.9.2.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30735
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
application.ini
Log Message:
Bump version.
Index: application.ini
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/application.ini,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -r1.9 -r1.9.2.1
--- application.ini 13 Jun 2009 23:44:51 -0000 1.9
+++ application.ini 17 Nov 2009 23:30:28 -0000 1.9.2.1
@@ -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, 4 months
esc/win32 build.sh,1.11.2.4,1.11.2.5
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/win32
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25148
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.4
retrieving revision 1.11.2.5
diff -u -r1.11.2.4 -r1.11.2.5
--- build.sh 17 Nov 2009 22:55:20 -0000 1.11.2.4
+++ build.sh 17 Nov 2009 23:13:17 -0000 1.11.2.5
@@ -340,7 +340,7 @@
then
echo "ESC already checked out.."
else
- cvs -d $FEDORA_CVS_ROOT -r $ESC_TAG co esc
+ cvs -d $FEDORA_CVS_ROOT co -r $ESC_TAG esc
fi
if [ $? != 0 ];
14 years, 4 months
esc/win32 build.sh,1.11.2.3,1.11.2.4
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/win32
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20693
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
build.sh
Log Message:
Bump versions.
Index: build.sh
===================================================================
RCS file: /cvs/dirsec/esc/win32/build.sh,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -r1.11.2.3 -r1.11.2.4
--- build.sh 9 Oct 2009 01:14:43 -0000 1.11.2.3
+++ build.sh 17 Nov 2009 22:55:20 -0000 1.11.2.4
@@ -85,7 +85,9 @@
#ESC values
ESC_NAME=esc
-ESC_VERSION_NO=1.1.0-8
+ESC_VERSION_NO=1.1.0-9
+ESC_TAG=PKI_8_0_RTM_BRANCH
+
#Cygwin values
@@ -110,7 +112,7 @@
echo "BUILDING NSS..."
- if [ $NUM_ARGS -ne 0 ] && [ $THE_ARG != -doNSS ] || [ $USE_64 == 1 ];
+ if [ $NUM_ARGS -ne 0 ] && [ $THE_ARG != -doNSS ] || [ X$USE_64 == X1 ];
then
echo "Do not build NSS."
return 0
@@ -189,7 +191,7 @@
ZLIB_LIB_PATH=${BASE_DIR}/zlib/lib
- if [ $USE_64 == 1 ];
+ if [ X$USE_64 == X1 ];
then
ZLIB_LIB_PATH=${BASE_DIR}/zlib/dll_x64
ZLIB_LIB_FLAGS=${BASE_DIR}/zlib/dll_x64/$ZLIB_DLL_64.dll
@@ -212,7 +214,7 @@
export ZLIB_LIB=$ZLIB_LIB_PATH
export ZLIB_INCLUDE=$ZLIB_INC_PATH
- if [ $USE_64 == 1 ];
+ if [ X$USE_64 == X1 ];
then
PK11=
else
@@ -245,7 +247,7 @@
cp -f coolkey/src/coolkey/.libs/libcoolkeypk11.dll BUILD/coolkeypk11.dll
cp -f coolkey/src/libckyapplet/.libs/libckyapplet-1.dll BUILD
- if [ $USE_64 == 1 ];
+ if [ X$USE_64 == X1 ];
then
cp -f zlib/dll_x64/zlibwapi.dll BUILD
else
@@ -255,7 +257,7 @@
# Grab pk11install
- if [ $USE_64 != 1 ];
+ if [ X$USE_64 != X1 ];
then
cp -f coolkey/src/install/pk11install.exe BUILD
fi
@@ -280,7 +282,7 @@
cd $ZLIB_NAME
- if [ $USE_64 == 1 ]
+ if [ X$USE_64 == X1 ]
then
wget $ZLIB_BIN_URL_64/$ZLIB_ARCHIVE_64.zip
@@ -328,7 +330,7 @@
echo "BUILDING ESC"
cd $BASE_DIR
- if [ $NUM_ARGS -ne 0 ] && [ $THE_ARG != -doEsc ] || [ $USE_64 == 1 ];
+ if [ $NUM_ARGS -ne 0 ] && [ $THE_ARG != -doEsc ] || [ X$USE_64 == X1 ];
then
echo "Do not build ESC."
return 0
@@ -338,7 +340,7 @@
then
echo "ESC already checked out.."
else
- cvs -d $FEDORA_CVS_ROOT co esc
+ cvs -d $FEDORA_CVS_ROOT -r $ESC_TAG co esc
fi
if [ $? != 0 ];
@@ -364,10 +366,14 @@
CKY_INCLUDE_PATH=`cygpath -m $CKY_INCLUDE_PATH`
cd ../..
+
+ 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 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 ];
then
echo "Can't make ESC."
@@ -516,7 +522,7 @@
#Move over extra files we don't keep in the open source world
- if [ $USE_64 == 1 ];
+ if [ X$USE_64 == X1 ];
then
INNO_SCRIPT=coolkey-64.iss
else
14 years, 4 months
mod_nss nss_engine_io.c,1.9,1.10
by Rob Crittenden
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20830
Modified Files:
nss_engine_io.c
Log Message:
Fix another place we should set PR_WOULD_BLOCK_ERROR during a read.
Index: nss_engine_io.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_io.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- nss_engine_io.c 19 Feb 2009 02:31:18 -0000 1.9
+++ nss_engine_io.c 11 Nov 2009 18:20:39 -0000 1.10
@@ -278,6 +278,7 @@
if (APR_STATUS_IS_EAGAIN(inctx->rc)
|| APR_STATUS_IS_EINTR(inctx->rc)) {
+ PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
return (int)inl;
}
14 years, 4 months