[Fedora-directory-commits] esc/src/lib/coolkey CoolKey.cpp, 1.3, 1.4 CoolKey.h, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1983
Modified Files:
CoolKey.cpp CoolKey.h
Log Message:
Add support to get card ATR.
Index: CoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CoolKey.cpp 17 Jan 2007 19:11:59 -0000 1.3
+++ CoolKey.cpp 9 Feb 2007 22:00:37 -0000 1.4
@@ -51,7 +51,8 @@
COOLKEY_API HRESULT CoolKeyInit(const char *aAppDir)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyInit:\n appDir %s",aAppDir));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyInit: appDir %s \n",aAppDir));
+
if (g_NSSManager)
{
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyInit:g_NSSManager already exists. \n"));
@@ -80,6 +81,7 @@
COOLKEY_API HRESULT CoolKeyShutdown()
{
+
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyShutdown:\n"));
DestroyCoolKeyList();
@@ -112,7 +114,14 @@
g_SetConfigValue = setconfigvalue;
- PK11_SetPasswordFunc( CoolKeyVerifyPassword);
+
+ char * suppressPINPrompt =(char*) CoolKeyGetConfig("esc.disable.password.prompt");
+
+
+ if(suppressPINPrompt && !strcmp(suppressPINPrompt,"yes"))
+ {
+ PK11_SetPasswordFunc( CoolKeyVerifyPassword);
+ }
// Set the verify password callback here, no params needed we know what it is
return 0;
}
@@ -840,8 +849,35 @@
return NSSManager::GetKeyIssuedTo(aKey,aBuf,aBufLength);
}
+
+HRESULT CoolKeyGetATR(const CoolKey *aKey, char *aBuf, int aBufLen)
+{
+
+ if (!aKey || !aKey->mKeyID || !aBuf || aBufLen < 1)
+ return E_FAIL;
+ aBuf[0] = 0;
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyGetATR::\n"));
+
+ HRESULT result = S_OK;
+
+ const char *atr = GetATRForKeyID(aKey);
+
+ if(!atr)
+ return result;
+
+ if((int) strlen(atr) < aBufLen)
+ {
+
+ sprintf(aBuf,"%s",(char *) atr);
+ }
+
+ return result;
+
+}
+
HRESULT CoolKeyGetIssuerInfo(const CoolKey *aKey, char *aBuf, int aBufLen)
{
+
if (!aKey || !aKey->mKeyID || !aBuf || aBufLen < 1)
return E_FAIL;
@@ -860,11 +896,9 @@
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"));
@@ -872,9 +906,7 @@
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"));
@@ -882,9 +914,7 @@
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"));
@@ -892,9 +922,7 @@
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"));
@@ -902,25 +930,20 @@
goto done;
}
- #ifndef DARWIN
- CKYCardConnection_BeginTransaction(conn);
- #endif
+#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"));
@@ -956,9 +979,9 @@
done:
if (conn) {
- #ifndef DARWIN
+#ifndef DARWIN
CKYCardConnection_EndTransaction(conn);
- #endif
+#endif
CKYCardConnection_Disconnect(conn);
CKYCardConnection_Destroy(conn);
}
Index: CoolKey.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CoolKey.h 27 Sep 2006 17:47:46 -0000 1.2
+++ CoolKey.h 9 Feb 2007 22:00:37 -0000 1.3
@@ -26,10 +26,8 @@
// platforms (coreconf will do the appropriate processing.
#define COOLKEY_API
-
#include <string.h>
#include <stdlib.h>
-
#include <vector>
#include <string>
@@ -172,6 +170,9 @@
COOLKEY_API HRESULT CoolKeyGetIssuerInfo(const CoolKey *aKey, char *aBuf, int aBufLen);
+COOLKEY_API HRESULT CoolKeyGetATR(const CoolKey *aKey, char *aBuf, int aBufLen);
+
+
COOLKEY_API int CoolKeyGetAppletVer(const CoolKey *aKey, const bool isMajor);
}
17 years, 3 months
[Fedora-directory-commits] esc/src/lib/NssHttpClient engine.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/NssHttpClient
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1926
Modified Files:
engine.cpp
Log Message:
Get client auth working.
Index: engine.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/NssHttpClient/engine.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- engine.cpp 27 Sep 2006 17:49:21 -0000 1.2
+++ engine.cpp 9 Feb 2007 21:56:36 -0000 1.3
@@ -284,7 +284,8 @@
char * localNickName = (char *)arg;
proto_win = SSL_RevealPinArg(socket);
-
+
+
if (localNickName) {
cert = PK11_FindCertFromNickname(localNickName, proto_win);
@@ -342,8 +343,11 @@
if (names != NULL) {
for( i=0; i < names->numnicknames; i++ ) {
- cert = PK11_FindCertFromNickname(names->nicknames[i],
- proto_win);
+
+
+ cert = CERT_FindUserCertByUsage(CERT_GetDefaultCertDB(),names->nicknames[i],certUsageSSLClient,PR_FALSE,proto_win);
+
+
if (!cert) {
continue;
}
@@ -456,7 +460,7 @@
return NULL;
}
- //SSL_SetPKCS11PinArg (sock,password);
+ SSL_SetPKCS11PinArg (sock,0);
int error = 0;
PRBool rv = SSL_OptionSet(sock, SSL_SECURITY, 1);
17 years, 3 months
[Fedora-directory-commits] esc/src/app/xul/esc/components escCLH.js, 1.1, 1.2
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/components
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1893
Modified Files:
escCLH.js
Log Message:
Add support for security mode.
Index: escCLH.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/components/escCLH.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- escCLH.js 13 Sep 2006 17:52:38 -0000 1.1
+++ escCLH.js 9 Feb 2007 21:55:31 -0000 1.2
@@ -48,10 +48,36 @@
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow(null);
+ var doSecMode = false;
+ var secModeURL=null;
+
+ secModeURL = cmdLine.handleFlagWithParam("secmode",false);
+ if (secModeURL) {
+ doSecMode = true;
+ cmdLine.preventDefault = true;
+ }
+
if(win)
{
- recordMessage("Subsequent invocation. Launch an Admin page.");
- win.launchSETTINGS();
+ recordMessage("Subsequent command invocation. Launch appropriate page.");
+
+ var locName = win.location.toString();
+
+ recordMessage("Base window . " + locName);
+
+ if(doSecMode)
+ {
+
+ var uri = cmdLine.resolveURI(secModeURL);
+ recordMessage("Attempting security mode. url: " + secModeURL);
+ win.launchESCSecMode(secModeURL);
+ }
+ else
+ {
+ win.launchSETTINGS();
+ }
+
+ recordMessage("Done command line handling...");
return;
}
@@ -59,11 +85,12 @@
recordMessage(chromeURI);
-
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(nsIWindowWatcher);
- wwatch.openWindow(null, chromeURI, "_blank",
+ win = wwatch.openWindow(null, chromeURI, "_blank",
"chrome,dialog,height=-1,width=-1,popup=yes", cmdLine);
+
+
}
catch(e) {}
17 years, 3 months
[Fedora-directory-commits] esc/src/app/xul/esc/chrome/locale/en-US esc.dtd, 1.4, 1.5 esc.properties, 1.3, 1.4
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/locale/en-US
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1861
Modified Files:
esc.dtd esc.properties
Log Message:
Support for security mode.
Index: esc.dtd
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/locale/en-US/esc.dtd,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- esc.dtd 25 Oct 2006 04:04:47 -0000 1.4
+++ esc.dtd 9 Feb 2007 21:54:22 -0000 1.5
@@ -70,6 +70,7 @@
<!ENTITY closeNow "Close">
<!ENTITY enrollKeyNow "Enroll My Smart Card Now">
<!ENTITY enrollKey "Enroll Smart Card">
+<!ENTITY enrollKeyNowGeneric "Continue">
<!ENTITY administerKeys "Manage Smart Cards">
<!ENTITY administerMessage "This tool helps you manage your smart cards and to examine their contents when you are having problems. To manage your smart cards, you must connect them to the computer.">
<!ENTITY blankKeyLabel "Blank Key">
Index: esc.properties
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/locale/en-US/esc.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- esc.properties 27 Sep 2006 17:45:14 -0000 1.3
+++ esc.properties 9 Feb 2007 21:54:22 -0000 1.4
@@ -44,6 +44,7 @@
tpsPhoneHomeURL=Phone Home URL:
status=Status:
issuer=Issuer:
+atr=Atr:
escLogEntries=Smart Card Activity
noLogFileOrData=No log file or log file has no data.
dataCopiedToClipboard=Diagnostics information copied to the clipboard.
@@ -63,6 +64,7 @@
coolkeyDetectedNumberKeys=Number of Smart Cards Detected:
enrolledDetected=Enrolled Smart Card Detected
enrolledDetectedMessage=Smart Card Manager has detected an already enrolled card. If you do not wish to re-enroll, press the "Close" button.
+enrolledDetectedMessageGeneric=Smart Card Manager has detected an already enrolled card. Click Proceed to continue.
unenrolledDetectedMessage=Smart Card Manager has detected that you have entered a new and un-enrolled smart card. Before you can use this smart card, you have to enroll it. Enrolling your smart card personalizes it so only you can use it for secure operations.
enrollAnyway=If you would like to re-enroll anyway, click Enroll My Smart Card Now.
readyToProceed=When you are ready to begin the process,click Enroll My Smart Card Now.
@@ -164,6 +166,7 @@
errorSelectKey=Please select a smart card.
errorEnrolledFirst=Smart card must be enrolled first! Enroll card and try again.
enrollmentFor=Enrollment for
+errorNeedKeyForSecMode=Please insert enrolled smart card before attempting secure mode.
wasSuccessful=was successful.
pinResetSuccessful=Password Reset was successfull!
formatOf=Format of
17 years, 3 months
[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc security.xul, NONE, 1.1
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1655
Added Files:
security.xul
Log Message:
Initial revision.
--- NEW FILE security.xul ---
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="esc.css" type="text/css"?>
<!-- ***** 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 ***** -->
<!DOCTYPE window SYSTEM "chrome://esc/locale/esc.dtd">
<window
class="escwindow"
id="esc-window"
title="&escTitle;"
onload="InitializeSecurityEnrollment()"
width ="600"
height= "575"
onunload="cleanup();OnSecurityPageHidden();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
<script src= "TRAY.js"/>
<script src="ESC.js"/>
<groupbox flex="1">
<iframe id="security-ui" flex="3" class="BorderedIFrameShort" />
</groupbox>
<hbox >
<spacer flex="3"/>
<button id="closebtn" label ="&closeNow;" oncommand="window.close();"/>
</hbox>
</window>
17 years, 3 months
[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc ESC.js, 1.5, 1.6
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1619
Modified Files:
ESC.js
Log Message:
Add initial support for security mode. Cleanup.
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.5 -r 1.6 ESC.js
Index: ESC.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ESC.js 30 Nov 2006 18:33:19 -0000 1.5
+++ ESC.js 9 Feb 2007 21:48:07 -0000 1.6
@@ -26,10 +26,8 @@
var gEnrollmentPage = 0;
var gAdminPage = 0;
-var gUsesListBox = 0;
var gFactoryMode = 0;
var gHiddenPage = 0;
-var gHiddenPageDone = 0;
var gExternalUI = 0;
loadStringBundle();
@@ -44,11 +42,16 @@
const ISSUER_TAG = "IssuerName";
const SERVICE_INFO_TAG = "ServiceInfo";
const ENROLLED_TOKEN_BROWSER_URL = "EnrolledTokenBrowserURL";
+const ENROLLED_TOKEN_URL = "EnrolledTokenURL";
+const TOKEN_TYPE = "TokenType";
const RESET_PHONE_HOME = "ResetPhoneHome";
const ESC_IGNORE_TOKEN_BROWSER_URL = "esc.ignore.token.browser.url";
const ESC_TOKEN_BROWSER_URL_ESTABLISHED = "esc.token.browser.established";
const ESC_IGNORE_KEY_ISSUER_INFO = "esc.ignore.key.issuer.info";
+const ESC_FACE_TO_FACE_MODE = "esc.face.to.face.mode";
+const ESC_SECURITY_URL="esc.security.url";
+const CLEAN_TOKEN = "cleanToken";
const UNINITIALIZED = 1;
const UNINITIALIZED_NOAPPLET = 2;
const ESC_ENROLL_WIDTH = 600;
@@ -61,13 +64,11 @@
const WIN_XP_PROG_OPEN = "C:\\Windows\\system32\\cmd.exe";
const WIN_2000_PROG_OPEN = "C:\\WINNT\\system32\\cmd.exe";
-
//Window names
-
const ENROLL_WINDOW = "esc.xul";
const ADMIN_WINDOW = "settings.xul";
const HIDDEN_WINDOW = "hiddenWindow.xul";
-
+const SECURITY_WINDOW = "security.xul";
function getUIForKey(aKeyID)
{
@@ -93,7 +94,7 @@
QueryInterface: function(iid)
{
- <!-- alert("iid: " + iid); -->
+ // alert("iid: " + iid);
if(!iid.equals(Components.interfaces.rhIKeyNotify) &&
!iid.equals(Components.interfaces.nsISupports))
{
@@ -107,6 +108,8 @@
//
// Attach to the object.
//
+ var gNotify=null;
+
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
netkey = Components.classes["@redhat.com/rhCoolKey"].getService();
@@ -122,7 +125,6 @@
//
function cleanup()
{
-
TrayRemoveWindow(null);
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
@@ -133,12 +135,10 @@
}
-var gScreenName = "";
var gKeyEnrollmentType = "userKey";
var gCurrentSelectedRow = null;
-
var gCurKeyType = null;
var gCurKeyID = null;
@@ -202,35 +202,6 @@
getBundleString("errorESCNoTalkTokenReader")
);
-//silent set of the tps uri connection on startup
-
-function testTPSURISilent()
-
-{
-
- var tps_uri = null;
-
- if(netkey)
- {
- try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
- tps_uri = netkey.GetCoolKeyConfigValue("esc.tps.url");
-
-
- } catch(e) {
- MyAlert(getBundleString("errorConfigValue") + e);
- }
-
- if(tps_uri)
- {
- testTPSURI(tps_uri);
-
- }
- }
-
-}
-
// Main function that oversees obtaining Phone Home Info from the Server
function DoPhoneHome(keyType,keyID)
@@ -247,19 +218,14 @@
issuer = getBundleString("unknownIssuer");
TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
UpdateRowWithPhoneHomeData(keyType,keyID);
-
recordMessage("cached issuer " + issuer);
-
var browserURL = GetCachedEnrolledTokenBrowserURL(keyID);
-
recordMessage("Cached browserURL " + browserURL);
if(browserURL)
{
DoCoolKeySetConfigValue(ESC_TOKEN_BROWSER_URL_ESTABLISHED,"yes");
-
DoHandleEnrolledBrowserLaunch();
-
}
}
@@ -267,12 +233,20 @@
{
issuer = getBundleString("unknownIssuer");
TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
- //launchCONFIG(keyType,keyID);
}
}
- if(IsPhoneHomeCached(keyID))
+ recordMessage("Attempting phone home...");
+
+ var home = DoCoolKeyGetIssuerUrl(keyType,keyID);
+
+ recordMessage("Returned IssuerURL " + home);
+
+ if(IsPhoneHomeCached(keyID) && home)
{
+ var phoneHomeURI = GetCachedPhoneHomeURL(keyID);
+
+ recordMessage("Phone home info cached...");
issuer = GetCachedIssuer(keyID);
TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
@@ -287,17 +261,18 @@
return true;
}
- var home = DoCoolKeyGetIssuerUrl(keyType,keyID);
var homeRes = false;
if(home)
{
+ recordMessage("About to actually phone home for real...");
homeRes = phoneHome(home,keyID,callback);
}
if(!home)
{
+ recordMessage("About to launch CONFIG , non secmode...");
launchCONFIG(keyType,keyID);
}
@@ -329,7 +304,6 @@
{
MyAlert(getBundleString("noTpsConfigUrl"));
return;
-
}
if(!url.value)
@@ -348,12 +322,10 @@
{
MyAlert(getBundleString("tpsConfigError"));
[...2480 lines suppressed...]
phoneHomeIssuer = GetCachedIssuer(aKeyID);
-
if(!phoneHomeIssuer)
return false;
tpsURL = GetCachedTPSURL(aKeyID);
-
if(!tpsURL)
return false;
tpsUI = GetCachedTPSUI(aKeyID);
-
return true;
}
@@ -4281,7 +3556,6 @@
var theValue = ConfigValueWithKeyID(aKeyID,aValue);
-
if(!theValue)
return null;
@@ -4290,9 +3564,17 @@
return retValue;
}
-function GetCachedEnrolledTokenBrowserURL(aKeyID)
+function GetCachedTokenType(aKeyID)
{
+ return GetCachedPhoneHomeValue(aKeyID,TOKEN_TYPE);
+}
+function GetCachedEnrolledTokenURL(aKeyID)
+{
+ return GetCachedPhoneHomeValue(aKeyID,ENROLLED_TOKEN_URL);
+}
+function GetCachedEnrolledTokenBrowserURL(aKeyID)
+{
return GetCachedPhoneHomeValue(aKeyID,ENROLLED_TOKEN_BROWSER_URL);
}
@@ -4305,7 +3587,6 @@
var urlValue = ConfigValueWithKeyID(aKeyID,KEY_ISSUER_URL);
-
if(!urlValue)
return null;
@@ -4356,7 +3637,6 @@
var urlValue = ConfigValueWithKeyID(aKeyID,TPS_URL);
-
if(!urlValue)
return null;
@@ -4365,9 +3645,9 @@
return url;
}
+//Update display when phone home data comes in
function UpdateRowWithPhoneHomeData(keyType,keyID)
{
-
if(gEnrollmentPage)
{
UpdateEnrollmentArea(keyType,keyID,1);
@@ -4378,10 +3658,9 @@
SelectRowByKeyID(keyType, keyID);
UpdateAdminListRow(keyType,keyID);
}
-
}
-//Phone home and get values
+//Phone home and actually get data values
function phoneHome(theUrl,aKeyID,resultCB)
{
@@ -4457,8 +3736,17 @@
for (var i = 0; i < len; i++)
{
var oChild = servicesNodes.item(i);
- var name = oChild.nodeName;
- var value = oChild.firstChild.data;
+
+ var name=null;
+ var value = null;
+ if(oChild)
+ {
+ name = oChild.nodeName;
+
+ if(oChild.firstChild)
+ value = oChild.firstChild.data;
+
+ }
if(name && value)
{
@@ -4474,9 +3762,7 @@
}
recordMessage("Done writing out phone home config cache.");
-
var browserURL = GetCachedEnrolledTokenBrowserURL(aKeyID);
-
recordMessage("Cached browserURL " + browserURL);
if(browserURL)
@@ -4495,7 +3781,7 @@
var result = DoCoolKeySetConfigValue(issuer_config_value,url);
resultCB(true);
}
- return;
+ return true;
}
}
@@ -4507,7 +3793,6 @@
function ReadESCLog()
{
-
const logFileName = "esc.log";
// Get executable directory
@@ -4529,7 +3814,6 @@
return null;
}
-
// read lines into array
var line = {}, lines = [], hasmore;
do {
@@ -4609,7 +3893,6 @@
function DoMyAlert(message,title)
{
-
if(!message || !title)
return; try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
@@ -4619,13 +3902,10 @@
} catch(e) {
-
alert("Problem with nsIPromptService " + e);
}
-
}
-
//Utility function to sleep for a short time
function Sleep(milliSeconds)
@@ -4633,26 +3913,20 @@
var then = new Date(new Date().getTime() + milliSeconds ); while (new Date() < then) {}
}
-
function DoCopyAdvancedInfoToClipBoard()
{
var textinfo = window.document.getElementById("advanced-info");
-
CopyDataToClipboard(gDiagnosticsDataText);
}
-
function CopyDataToClipboard(aDataText)
{
-
if(!aDataText)
- return;
-
+ return false;
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
-
if (!str)
return false;
@@ -4674,8 +3948,10 @@
clip.setData(trans,null,clipid.kGlobalClipboard);
MyAlert(getBundleString("dataCopiedToClipboard") );
+ return true;
}
+//Write message to Javascript console if open
function recordMessage( message ) {
17 years, 3 months
[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc esc.css, 1.3, 1.4
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1579
Modified Files:
esc.css
Log Message:
Add entry for short Iframe.
Index: esc.css
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc.css,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- esc.css 27 Sep 2006 17:31:51 -0000 1.3
+++ esc.css 9 Feb 2007 21:46:47 -0000 1.4
@@ -328,6 +328,12 @@
border: black solid 4px;
}
+.BorderedIFrameShort {
+ width: 600px;
+ height: 500px;
+ border: black solid 4px;
+}
+
.SelectedRow {
color: white;
17 years, 3 months
[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc esc.xul, 1.4, 1.5
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1494
Modified Files:
esc.xul
Log Message:
Cleanup.
Index: esc.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc.xul,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- esc.xul 25 Oct 2006 04:03:35 -0000 1.4
+++ esc.xul 9 Feb 2007 21:42:19 -0000 1.5
@@ -32,12 +32,6 @@
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
<script src= "TRAY.js"/>
<script src="ESC.js"/>
- <tabbox id="tablist" hidden="true">
- <tabs>
- <tab label="Settings" oncommand="loadSETTINGS();"/>
- <tab label="Configuration" oncommand="loadCONFIG();"/>
- </tabs>
- </tabbox>
<vbox flex ="1" >
<hbox class="logoBox" >
<image id="logoImage"/>
17 years, 3 months