Rebuild with loacl xulrunner instead of the removed system xulrunner.
This commit is contained in:
parent
99f187ef66
commit
68c2f3438a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
esc-1.1.0.tar.bz2
|
||||
/esc-1.1.1.tar.bz2
|
||||
|
2
esc
2
esc
@ -26,7 +26,7 @@ ESC_ARGS=
|
||||
ESC_PROFILE_BASE=~/.redhat/esc
|
||||
ESC_LOG_FILE=esc.log
|
||||
|
||||
ESC_PATH=$LIBDIR/esc-1.1.0
|
||||
ESC_PATH=$LIBDIR/esc-1.1.1
|
||||
ESC_BIN_PATH=/usr/bin
|
||||
ESC_EXEC=esc
|
||||
ESCD_EXEC=escd
|
||||
|
@ -1,38 +0,0 @@
|
||||
--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix1 2009-04-17 13:39:58.000000000 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2009-04-17 14:18:17.000000000 -0700
|
||||
@@ -23,20 +23,20 @@
|
||||
include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
-CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS)
|
||||
+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC
|
||||
endif
|
||||
|
||||
|
||||
# Change this to point at your Gecko SDK directory.
|
||||
ifndef GECKO_SDK_PATH
|
||||
-GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9pre/sdk
|
||||
+GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9/sdk
|
||||
endif
|
||||
GECKO_SDK_INCLUDE_PATH=$(GECKO_SDK_PATH)/include
|
||||
ifndef GECKO_INCLUDE_PATH
|
||||
-GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9pre
|
||||
+GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9
|
||||
endif
|
||||
ifndef GECKO_BIN_PATH
|
||||
-GECKO_BIN_PATH=/usr/lib/xulrunner-1.9pre
|
||||
+GECKO_BIN_PATH=/usr/lib/xulrunner-1.9
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
@@ -148,6 +148,10 @@
|
||||
|
||||
endif
|
||||
|
||||
+ifeq ($(OS_ARCH),Linux)
|
||||
+GECKO_LD_LIBS= -L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue_s.a
|
||||
+endif
|
||||
+
|
||||
|
||||
# GCC only define which allows us to not have to #include mozilla-config
|
||||
# in every .cpp file. If your not using GCC remove this line and add
|
@ -1,29 +0,0 @@
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix10 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix10 2011-07-19 03:47:15.264254844 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-07-19 03:47:30.224254842 -0700
|
||||
@@ -542,7 +542,7 @@ PRBool rhCoolKey::InitInstance()
|
||||
static const GREVersionRange greVersion =
|
||||
{
|
||||
"1.9", PR_TRUE,
|
||||
- "2", PR_TRUE
|
||||
+ "9.9", PR_TRUE
|
||||
};
|
||||
|
||||
nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcom_path, 4096);
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix10 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix10 2011-07-19 03:42:23.368254822 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2011-07-19 03:42:40.531254827 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-13
|
||||
+Version=1.1.0-15
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001013
|
||||
+BuildID=0000001015
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
@ -1,93 +0,0 @@
|
||||
diff -up ./esc/src/app/xpcom/Makefile.sdk.fix11 ./esc/src/app/xpcom/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/Makefile.sdk.fix11 2011-09-16 11:28:43.413286053 -0700
|
||||
+++ ./esc/src/app/xpcom/Makefile.sdk 2011-09-16 11:28:43.529286053 -0700
|
||||
@@ -108,7 +108,7 @@ endif
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
CPPFLAGS += -fno-rtti \
|
||||
-fno-exceptions \
|
||||
- -fshort-wchar -fPIC
|
||||
+ -fshort-wchar -fPIC -std=gnu++0x
|
||||
GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue.a -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
|
||||
endif
|
||||
|
||||
@@ -129,6 +129,10 @@ ifdef ESC_VERSION
|
||||
GECKO_DEFINES += -DESC_VERSION=$(ESC_VERSION)
|
||||
endif
|
||||
|
||||
+ifdef GECKO_BIN_PATH
|
||||
+GECKO_DEFINES += -DGECKO_BIN_PATH=$(GECKO_BIN_PATH)
|
||||
+endif
|
||||
+
|
||||
NSS_INCLUDE = /usr/include/nss3
|
||||
NSPR_INCLUDE = /usr/include/nspr4
|
||||
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix11 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix11 2011-09-16 11:28:43.510286053 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-09-16 11:28:43.530286053 -0700
|
||||
@@ -538,7 +538,7 @@ PRBool rhCoolKey::InitInstance()
|
||||
|
||||
char xpcom_path[4096];
|
||||
xpcom_path[0] = 0;
|
||||
-
|
||||
+/*
|
||||
static const GREVersionRange greVersion =
|
||||
{
|
||||
"1.9", PR_TRUE,
|
||||
@@ -550,6 +550,13 @@ PRBool rhCoolKey::InitInstance()
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
+*/
|
||||
+
|
||||
+ char *grePath = (char *) GETSTRING(GECKO_BIN_PATH);
|
||||
+
|
||||
+
|
||||
+ snprintf(xpcom_path,4096,grePath);
|
||||
+
|
||||
char *lib_name =(char *) XPCOM_LIB_NAME ;
|
||||
|
||||
|
||||
diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix11 ./esc/src/app/xpcom/tray/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix11 2011-09-16 11:31:59.645286087 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2011-09-16 11:32:10.859286088 -0700
|
||||
@@ -23,7 +23,7 @@ include $(CORE_DEPTH)/coreconf/config.mk
|
||||
include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
-CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC
|
||||
+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC -std=gnu++0x
|
||||
endif
|
||||
|
||||
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix11 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix11 2011-09-16 11:28:43.511286053 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2011-09-16 11:28:43.532286053 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-15
|
||||
+Version=1.1.0-16
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001015
|
||||
+BuildID=0000001016
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
@@ -41,12 +41,12 @@ ID={6380471b-1924-4b48-b652-49f42951af86
|
||||
; This field is required. It specifies the minimum Gecko version that this
|
||||
; application requires. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
-MinVersion=1.99
|
||||
+MinVersion=6.0.0
|
||||
;
|
||||
; This field is optional. It specifies the maximum Gecko version that this
|
||||
; application requires. It should be specified if your application uses
|
||||
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
-MaxVersion=2.99
|
||||
+MaxVersion=20.0.0
|
||||
|
||||
[Shell]
|
@ -1,50 +0,0 @@
|
||||
diff -up ./esc/coreconf/Linux3.1.mk.fix12 ./esc/coreconf/Linux3.1.mk
|
||||
--- ./esc/coreconf/Linux3.1.mk.fix12 2011-11-28 13:55:27.623816205 -0800
|
||||
+++ ./esc/coreconf/Linux3.1.mk 2011-11-28 13:56:11.119536737 -0800
|
||||
@@ -0,0 +1,35 @@
|
||||
+# 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
|
||||
+
|
||||
+#
|
||||
+# Config stuff for Linux 3.1 (ELF)
|
||||
+#
|
||||
+
|
||||
+include $(CORE_DEPTH)/coreconf/Linux.mk
|
||||
+
|
||||
+OS_REL_CFLAGS += -DLINUX2_1
|
||||
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
+ifdef BUILD_OPT
|
||||
+ OPTIMIZER = -O2
|
||||
+endif
|
||||
+
|
||||
+ifdef MAPFILE
|
||||
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
|
||||
+endif
|
||||
+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \
|
||||
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||
+
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix12 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix12 2011-11-28 19:29:53.894102752 -0800
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-11-28 19:30:46.003028405 -0800
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "prlink.h"
|
||||
#include "prthread.h"
|
||||
#include "nscore.h"
|
||||
-#include "nsCopySupport.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <time.h>
|
@ -1,273 +0,0 @@
|
||||
diff -up ./esc/coreconf/Linux3.2.mk.fix13 ./esc/coreconf/Linux3.2.mk
|
||||
--- ./esc/coreconf/Linux3.2.mk.fix13 2012-02-20 18:08:55.637187190 -0800
|
||||
+++ ./esc/coreconf/Linux3.2.mk 2012-02-20 18:09:16.296139174 -0800
|
||||
@@ -0,0 +1,35 @@
|
||||
+# 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
|
||||
+
|
||||
+#
|
||||
+# Config stuff for Linux 3.2 (ELF)
|
||||
+#
|
||||
+
|
||||
+include $(CORE_DEPTH)/coreconf/Linux.mk
|
||||
+
|
||||
+OS_REL_CFLAGS += -DLINUX2_1
|
||||
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
+ifdef BUILD_OPT
|
||||
+ OPTIMIZER = -O2
|
||||
+endif
|
||||
+
|
||||
+ifdef MAPFILE
|
||||
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
|
||||
+endif
|
||||
+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \
|
||||
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||
+
|
||||
diff -up ./esc/src/app/xpcom/Makefile.sdk.fix13 ./esc/src/app/xpcom/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/Makefile.sdk.fix13 2012-02-20 18:01:49.522177961 -0800
|
||||
+++ ./esc/src/app/xpcom/Makefile.sdk 2012-02-20 18:01:49.526177952 -0800
|
||||
@@ -35,7 +35,12 @@ ifndef GECKO_BIN_PATH
|
||||
GECKO_BIN_PATH=/usr/lib/xulrunner-1.9pre
|
||||
endif
|
||||
XUL_FRAMEWORK_BIN_PATH=$(GECKO_BIN_PATH)
|
||||
-
|
||||
+ifndef GECKO_IDL_PATH
|
||||
+GECKO_IDL_PATH=/usr/share/idl/xulrunner-2
|
||||
+endif
|
||||
+ifndef PYTHON_BIN_PATH
|
||||
+PYTHON_BIN=python
|
||||
+endif
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
ifndef GECKO_SDK_PATH
|
||||
@@ -190,13 +195,14 @@ endif
|
||||
all:: export libs
|
||||
|
||||
libs::
|
||||
- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhIKeyNotify.idl
|
||||
|
||||
- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhIKeyNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhIKeyNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl
|
||||
+
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhIKeyNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl
|
||||
|
||||
- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhICoolKey.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhICoolKey.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl
|
||||
|
||||
- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhICoolKey.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhICoolKey.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
$(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES)
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix13 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix13 2012-02-20 18:01:49.524177956 -0800
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2012-02-20 18:01:49.526177952 -0800
|
||||
@@ -98,6 +98,7 @@ static PRLogModuleInfo *coolKeyLog = PR_
|
||||
|
||||
rhCoolKey *single = NULL;
|
||||
|
||||
+
|
||||
class CoolKeyShutdownObserver : public nsIObserver
|
||||
{
|
||||
public:
|
||||
@@ -364,9 +365,9 @@ SECStatus rhCoolKey::badCertHandler(void
|
||||
GetTStamp(tBuff,56),err,host,port)
|
||||
);
|
||||
|
||||
- PRBool isTemporaryOverride = PR_FALSE;
|
||||
+ bool isTemporaryOverride = PR_FALSE;
|
||||
PRUint32 overrideBits = 0;
|
||||
- PRBool overrideResult = PR_FALSE;
|
||||
+ bool overrideResult = PR_FALSE;
|
||||
|
||||
// Use the nsICertOverrideService to see if we have
|
||||
// previously trusted this certificate.
|
||||
@@ -554,14 +555,14 @@ PRBool rhCoolKey::InitInstance()
|
||||
char *grePath = (char *) GETSTRING(GECKO_BIN_PATH);
|
||||
|
||||
|
||||
- snprintf(xpcom_path,4096,grePath);
|
||||
+ snprintf(xpcom_path,4096,"%s%s",grePath,"libxpcom.so");
|
||||
|
||||
char *lib_name =(char *) XPCOM_LIB_NAME ;
|
||||
|
||||
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::xpcom_path %s \n",GetTStamp(tBuff,56),xpcom_path));
|
||||
|
||||
- XPCOMGlueStartup(xpcom_path);
|
||||
+ XPCOMGlueStartup("/usr/lib/xulrunner-2/libxpcom.so");
|
||||
|
||||
nssComponent
|
||||
= do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
@@ -1309,7 +1310,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyStatu
|
||||
/* boolean GetCoolKeyIsReallyCoolKey (in unsigned long aKeyType, in string aKeyID); */
|
||||
|
||||
|
||||
-NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, bool *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
@@ -1328,7 +1329,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIsRea
|
||||
}
|
||||
|
||||
/* long GetCoolKeyGetAppletVer (in unsigned long aKeyType, in string aKeyID, in boolean aIsMajor); */
|
||||
-NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID, PRBool aIsMajor, PRInt32 *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID, bool aIsMajor, PRInt32 *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyAppletVer thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
@@ -1344,7 +1345,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAp
|
||||
|
||||
/* boolean rhCoolKeyIsEnrolled (in unsigned long aKeyType, in string aKeyID); */
|
||||
|
||||
-NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID, bool *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyIsEnrolled thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
@@ -1586,7 +1587,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssue
|
||||
}
|
||||
|
||||
/* boolean SetCoolKeyConfigValue (in string aName, in string aValue); */
|
||||
-NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, PRBool *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, bool *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::SetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
@@ -1620,7 +1621,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyConfi
|
||||
|
||||
/* boolean rhCoolKeyRequiresAuthentication (in unsigned long aKeyType, in string aKeyID); */
|
||||
|
||||
-NS_IMETHODIMP rhCoolKey::GetCoolKeyRequiresAuthentication(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::GetCoolKeyRequiresAuthentication(PRUint32 aKeyType, const char *aKeyID, bool *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyRequiresAuthentication thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
@@ -1640,7 +1641,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyRequi
|
||||
|
||||
/* boolean rhGetCoolKeyIsAuthenticated (in unsigned long aKeyType, in string aKeyID); */
|
||||
|
||||
-NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAuthenticated(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAuthenticated(PRUint32 aKeyType, const char *aKeyID, bool *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyIsAuthenticated thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
@@ -1660,7 +1661,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAut
|
||||
|
||||
/* boolean rhAuthenticateCoolKey (in unsigned long aKeyType, in string aKeyID, in string aPIN); */
|
||||
|
||||
-NS_IMETHODIMP rhCoolKey::AuthenticateCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aPIN, PRBool *_retval)
|
||||
+NS_IMETHODIMP rhCoolKey::AuthenticateCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aPIN, bool *_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhAuthenticateCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix13 ./esc/src/app/xpcom/tray/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix13 2012-02-20 18:01:49.522177961 -0800
|
||||
+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2012-02-20 18:01:49.526177952 -0800
|
||||
@@ -39,6 +39,15 @@ ifndef GECKO_BIN_PATH
|
||||
GECKO_BIN_PATH=/usr/lib/xulrunner-1.9
|
||||
endif
|
||||
|
||||
+ifndef GECKO_IDL_PATH
|
||||
+GECKO_IDL_PATH=/usr/share/idl/xulrunner-2
|
||||
+endif
|
||||
+
|
||||
+ifndef PYTHON_BIN_PATH
|
||||
+PYTHON_BIN=python
|
||||
+endif
|
||||
+
|
||||
+
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
ifndef GECKO_SDK_PATH
|
||||
GECKO_SDK_PATH =/Users/jmagne/Desktop/gecko-sdk-mac-universal
|
||||
@@ -220,13 +229,14 @@ all:: export libs
|
||||
|
||||
libs::
|
||||
echo "PPC_BUILD $(PPC_BUILD)"
|
||||
- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhITray.idl
|
||||
|
||||
- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhITray.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITray.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl
|
||||
+
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITray.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl
|
||||
|
||||
- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhITrayWindNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITrayWindNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl
|
||||
|
||||
- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhITrayWindNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITrayWindNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
$(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES)
|
||||
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix13 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix13 2012-02-20 18:01:49.512177984 -0800
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2012-02-20 18:01:49.526177952 -0800
|
||||
@@ -215,7 +215,7 @@ NS_IMETHODIMP rhTray::Show(nsIBaseWindow
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-NS_IMETHODIMP rhTray::IsInitializedAlready(PRBool *_retval)
|
||||
+NS_IMETHODIMP rhTray::IsInitializedAlready(bool *_retval)
|
||||
{
|
||||
*_retval = 0;
|
||||
|
||||
@@ -749,7 +749,7 @@ void rhTray::NotifyTrayWindListeners(PRU
|
||||
std::list< nsCOMPtr <rhITrayWindNotify> >::const_iterator it;
|
||||
for(it=gTrayWindNotifyListeners.begin(); it!=gTrayWindNotifyListeners.end(); ++it) {
|
||||
|
||||
- PRBool claimed = 0;
|
||||
+ bool claimed = 0;
|
||||
|
||||
PR_LOG( trayLog, PR_LOG_DEBUG, ("%s NotifyTrayWindListeners about to notify \n",GetTStamp(tBuff,56)));
|
||||
((rhITrayWindNotify *) (*it))->RhTrayWindEventNotify(aEvent,aEventData, aKeyData, aData1, aData2, &claimed);
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix13 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix13 2012-02-20 18:01:49.523177958 -0800
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2012-02-20 18:01:49.527177950 -0800
|
||||
@@ -25,7 +25,7 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-16
|
||||
+Version=1.1.0-15
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix13 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix13 2012-02-20 18:01:49.514177980 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2012-02-20 18:01:49.527177950 -0800
|
||||
@@ -118,7 +118,7 @@ jsNotify.prototype = {
|
||||
if(!iid.equals(Components.interfaces.rhIKeyNotify) &&
|
||||
!iid.equals(Components.interfaces.nsISupports))
|
||||
{
|
||||
- MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
+ //MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
return this;
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix13 ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix13 2012-02-20 18:01:49.515177978 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js 2012-02-20 18:01:49.528177948 -0800
|
||||
@@ -49,7 +49,7 @@ jsWindNotify.prototype = {
|
||||
if(!iid.equals(Components.interfaces.rhITrayWindNotify) &&
|
||||
!iid.equals(Components.interfaces.nsISupports))
|
||||
{
|
||||
- MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
+ //MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
return this;
|
@ -1,458 +0,0 @@
|
||||
diff -up ./esc/coreconf/Linux3.3.mk.fix14 ./esc/coreconf/Linux3.3.mk
|
||||
--- ./esc/coreconf/Linux3.3.mk.fix14 2012-05-10 15:09:37.298143842 -0700
|
||||
+++ ./esc/coreconf/Linux3.3.mk 2012-05-10 15:09:37.298143842 -0700
|
||||
@@ -0,0 +1,35 @@
|
||||
+# 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
|
||||
+
|
||||
+#
|
||||
+# Config stuff for Linux 3.3 (ELF)
|
||||
+#
|
||||
+
|
||||
+include $(CORE_DEPTH)/coreconf/Linux.mk
|
||||
+
|
||||
+OS_REL_CFLAGS += -DLINUX2_1
|
||||
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
+ifdef BUILD_OPT
|
||||
+ OPTIMIZER = -O2
|
||||
+endif
|
||||
+
|
||||
+ifdef MAPFILE
|
||||
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
|
||||
+endif
|
||||
+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \
|
||||
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||
+
|
||||
diff -up ./esc/coreconf/Linux3.4.mk.fix14 ./esc/coreconf/Linux3.4.mk
|
||||
--- ./esc/coreconf/Linux3.4.mk.fix14 2012-05-10 15:09:37.298143842 -0700
|
||||
+++ ./esc/coreconf/Linux3.4.mk 2012-05-10 15:09:37.298143842 -0700
|
||||
@@ -0,0 +1,35 @@
|
||||
+# 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
|
||||
+
|
||||
+#
|
||||
+# Config stuff for Linux 3.4 (ELF)
|
||||
+#
|
||||
+
|
||||
+include $(CORE_DEPTH)/coreconf/Linux.mk
|
||||
+
|
||||
+OS_REL_CFLAGS += -DLINUX2_1
|
||||
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
+ifdef BUILD_OPT
|
||||
+ OPTIMIZER = -O2
|
||||
+endif
|
||||
+
|
||||
+ifdef MAPFILE
|
||||
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
|
||||
+endif
|
||||
+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \
|
||||
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||
+
|
||||
diff -up ./esc/coreconf/Linux3.5.mk.fix14 ./esc/coreconf/Linux3.5.mk
|
||||
--- ./esc/coreconf/Linux3.5.mk.fix14 2012-05-10 15:09:37.299143830 -0700
|
||||
+++ ./esc/coreconf/Linux3.5.mk 2012-05-10 15:09:37.298143842 -0700
|
||||
@@ -0,0 +1,35 @@
|
||||
+# 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
|
||||
+
|
||||
+#
|
||||
+# Config stuff for Linux 3.5 (ELF)
|
||||
+#
|
||||
+
|
||||
+include $(CORE_DEPTH)/coreconf/Linux.mk
|
||||
+
|
||||
+OS_REL_CFLAGS += -DLINUX2_1
|
||||
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
+ifdef BUILD_OPT
|
||||
+ OPTIMIZER = -O2
|
||||
+endif
|
||||
+
|
||||
+ifdef MAPFILE
|
||||
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
|
||||
+endif
|
||||
+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \
|
||||
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||
+
|
||||
diff -up ./esc/src/app/xpcom/Makefile.sdk.fix14 ./esc/src/app/xpcom/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/Makefile.sdk.fix14 2012-05-10 15:09:37.293143904 -0700
|
||||
+++ ./esc/src/app/xpcom/Makefile.sdk 2012-05-10 15:25:17.138394220 -0700
|
||||
@@ -106,15 +106,14 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
-GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -W1, $(GECKO_SDK_PATH)/lib/libxpcomglue.a -L$(XUL_FRAMEWORK_BIN_PATH) -lnss3 -lssl3 -lsoftokn3 -lplds4 -lplc4 -lnssutil3
|
||||
+GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -W1, $(GECKO_SDK_PATH)/lib/libxpcomglue.a -L$(XUL_FRAMEWORK_BIN_PATH) -lnss3 -lssl3 -lsoftokn3 -lplds4 -lplc4 -lnssutil3
|
||||
endif
|
||||
|
||||
-
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
-CPPFLAGS += -fno-rtti \
|
||||
- -fno-exceptions \
|
||||
- -fshort-wchar -fPIC -std=gnu++0x
|
||||
-GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue.a -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
|
||||
+CPPFLAGS += -g -fno-rtti \
|
||||
+ -DXPCOM_GLUE_USE_NSPR -fno-exceptions \
|
||||
+ -fshort-wchar -fPIC -std=gnu++0x
|
||||
+GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L$(GECKO_SDK_PATH)/lib -lxpcomglue_s -lxpcom
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
@@ -128,15 +127,15 @@ endif
|
||||
# #include "mozilla-config.h" to each of your .cpp files.
|
||||
#GECKO_CONFIG_INCLUDE = -include mozilla-config.h
|
||||
|
||||
-GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_CLIENT
|
||||
+GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_CLIENT
|
||||
|
||||
ifdef ESC_VERSION
|
||||
GECKO_DEFINES += -DESC_VERSION=$(ESC_VERSION)
|
||||
endif
|
||||
|
||||
-ifdef GECKO_BIN_PATH
|
||||
-GECKO_DEFINES += -DGECKO_BIN_PATH=$(GECKO_BIN_PATH)
|
||||
-endif
|
||||
+#ifdef GECKO_BIN_PATH
|
||||
+#GECKO_DEFINES += -DGECKO_BIN_PATH=$(GECKO_BIN_PATH)
|
||||
+#endif
|
||||
|
||||
NSS_INCLUDE = /usr/include/nss3
|
||||
NSPR_INCLUDE = /usr/include/nspr4
|
||||
@@ -162,7 +161,7 @@ COOL_LDFLAGS += -lsystemStubs -framewor
|
||||
endif
|
||||
|
||||
GECKO_LDFLAGS= -lnspr4 \
|
||||
- -lplds4 -lplc4 -ldl -lpthread -Wl -z \
|
||||
+ -lplds4 -lplc4 -ldl -lpthread -z \
|
||||
$(GECKO_LD_LIBS)
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
@@ -215,7 +214,7 @@ ifeq ($(OS_ARCH),Linux)
|
||||
|
||||
$(CXX) $(CPPFLAGS) -shared -o $(TARGET) $(OBJECT) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(GECKO_LDFLAGS) $(COOL_LDFLAGS)
|
||||
chmod +x $(TARGET)
|
||||
- strip $(TARGET)
|
||||
+ #strip $(TARGET)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix14 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix14 2012-05-10 15:09:37.294143891 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2012-05-10 15:09:37.300143818 -0700
|
||||
@@ -16,7 +16,6 @@
|
||||
* END COPYRIGHT BLOCK **/
|
||||
|
||||
#define FORCE_PR_LOG 1
|
||||
-
|
||||
#include <stdio.h>
|
||||
#include "rhCoolKey.h"
|
||||
#include "CoolKey.h"
|
||||
@@ -34,7 +33,7 @@
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsCOMPtr.h"
|
||||
-#include "nsIProxyObjectManager.h"
|
||||
+#include "nsThreadUtils.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsXPCOMGlue.h"
|
||||
@@ -91,6 +90,7 @@ std::list<CoolKeyNode*>rhCoolKey::gASCAv
|
||||
std::list< nsCOMPtr <rhIKeyNotify> > rhCoolKey::gNotifyListeners;
|
||||
|
||||
PRLock* rhCoolKey::certCBLock=NULL;
|
||||
+PRLock* rhCoolKey::eventLock= NULL;
|
||||
|
||||
PRBool rhCoolKey::gAutoEnrollBlankTokens = PR_FALSE;
|
||||
|
||||
@@ -162,6 +162,70 @@ ASCCalcBase64DecodedLength(const char *a
|
||||
|
||||
return ((numValidChars / 4) * 3) - numEqualSigns;
|
||||
}
|
||||
+class CoolKeyResultTask : public nsRunnable
|
||||
+{
|
||||
+public:
|
||||
+ ~CoolKeyResultTask() {
|
||||
+
|
||||
+ char tBuff[56];
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s ~CoolKeyResultTask thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
+
|
||||
+ if (mKeyID) {
|
||||
+ free(mKeyID);
|
||||
+ }
|
||||
+
|
||||
+ if (mStrData) {
|
||||
+ free(mStrData);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ CoolKeyResultTask(unsigned long keyType, const char *keyID, unsigned long keyState,
|
||||
+ unsigned long data, const char *strData, rhICoolKey *listener)
|
||||
+ : mKeyType(keyType), mKeyState(keyState),
|
||||
+ mData(data), mListener(listener)
|
||||
+ {
|
||||
+
|
||||
+ mStrData = NULL;
|
||||
+ mKeyID = NULL;
|
||||
+
|
||||
+ MOZ_ASSERT(!NS_IsMainThread());
|
||||
+
|
||||
+ if (keyID) {
|
||||
+ mKeyID = strdup(keyID);
|
||||
+ }
|
||||
+
|
||||
+ if (strData) {
|
||||
+ mStrData = strdup(strData);
|
||||
+ }
|
||||
+
|
||||
+ char tBuff[56];
|
||||
+
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyResultTask::CoolKeyResultTask thread: %p keyID %s \n",GetTStamp(tBuff,56),PR_GetCurrentThread(),mKeyID));
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ NS_IMETHOD Run() {
|
||||
+ MOZ_ASSERT(NS_IsMainThread());
|
||||
+
|
||||
+ char tBuff[56];
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyResultTask::Run thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
+
|
||||
+ if (mListener != NULL) {
|
||||
+ mListener->RhNotifyKeyStateChange(mKeyType, mKeyID, mKeyState,
|
||||
+ mData, mStrData);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+private:
|
||||
+ unsigned long mKeyType;
|
||||
+ char *mKeyID;
|
||||
+ unsigned long mKeyState;
|
||||
+ unsigned long mData;
|
||||
+ char *mStrData;
|
||||
+ rhICoolKey *mListener;
|
||||
+};
|
||||
|
||||
unsigned int
|
||||
ASCCalcBase64EncodedLength(unsigned int aDataLength)
|
||||
@@ -200,6 +264,14 @@ rhCoolKey::rhCoolKey()
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+ eventLock = PR_NewLock();
|
||||
+
|
||||
+ if(!eventLock) {
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Failed to create event lock exiting! \n", GetTStamp(tBuff,56)));
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
PRBool res = InitInstance();
|
||||
|
||||
if(res == PR_FALSE)
|
||||
@@ -221,6 +293,10 @@ rhCoolKey::~rhCoolKey()
|
||||
if(certCBLock) {
|
||||
PR_DestroyLock(certCBLock);
|
||||
}
|
||||
+
|
||||
+ if(eventLock) {
|
||||
+ PR_DestroyLock(eventLock);
|
||||
+ }
|
||||
}
|
||||
|
||||
void rhCoolKey::ShutDownInstance()
|
||||
@@ -255,8 +331,17 @@ HRESULT rhCoolKey::Dispatch( rhICoolKey
|
||||
unsigned long keyType, const char *keyID, unsigned long keyState,
|
||||
unsigned long data, const char *strData)
|
||||
{
|
||||
- return listener->RhNotifyKeyStateChange(keyType,keyID, keyState,
|
||||
- data, strData);
|
||||
+
|
||||
+ char tBuff[56];
|
||||
+
|
||||
+ PR_Lock(eventLock);
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::Dispatch: thead: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
|
||||
+ nsCOMPtr<nsIRunnable> result = new CoolKeyResultTask(keyType, keyID,keyState, data, strData, listener);
|
||||
+
|
||||
+ NS_DispatchToMainThread(result);
|
||||
+
|
||||
+ PR_Unlock(eventLock);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
HRESULT rhCoolKey::Reference( rhICoolKey *listener )
|
||||
@@ -536,34 +621,6 @@ PRBool rhCoolKey::InitInstance()
|
||||
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InitInstance %p \n",GetTStamp(tBuff,56),this));
|
||||
|
||||
- char xpcom_path[4096];
|
||||
- xpcom_path[0] = 0;
|
||||
-/*
|
||||
- static const GREVersionRange greVersion =
|
||||
- {
|
||||
- "1.9", PR_TRUE,
|
||||
- "9.9", PR_TRUE
|
||||
- };
|
||||
-
|
||||
- nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcom_path, 4096);
|
||||
- if (NS_FAILED(rv)) {
|
||||
- return PR_FALSE;
|
||||
- }
|
||||
-
|
||||
-*/
|
||||
-
|
||||
- char *grePath = (char *) GETSTRING(GECKO_BIN_PATH);
|
||||
-
|
||||
-
|
||||
- snprintf(xpcom_path,4096,"%s%s",grePath,"libxpcom.so");
|
||||
-
|
||||
- char *lib_name =(char *) XPCOM_LIB_NAME ;
|
||||
-
|
||||
-
|
||||
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::xpcom_path %s \n",GetTStamp(tBuff,56),xpcom_path));
|
||||
-
|
||||
- XPCOMGlueStartup("/usr/lib/xulrunner-2/libxpcom.so");
|
||||
-
|
||||
nssComponent
|
||||
= do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
|
||||
@@ -640,23 +697,8 @@ PRBool rhCoolKey::InitInstance()
|
||||
|
||||
rhICoolKey* rhCoolKey::CreateProxyObject()
|
||||
{
|
||||
- char tBuff[56];
|
||||
- rhICoolKey *proxyObject = NULL;
|
||||
-
|
||||
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::CreateProxyObject: \n",GetTStamp(tBuff,56)));
|
||||
-
|
||||
- nsCOMPtr<nsIProxyObjectManager> manager =
|
||||
- do_GetService(NS_XPCOMPROXY_CONTRACTID);
|
||||
-
|
||||
- PR_ASSERT(manager);
|
||||
-
|
||||
-
|
||||
- manager->GetProxyForObject(NULL, NS_GET_IID(rhICoolKey), this, NS_PROXY_SYNC | NS_PROXY_ALWAYS, (void**)&proxyObject);
|
||||
-
|
||||
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::CreateProxyObject: original: %p proxy %p \n",GetTStamp(tBuff,56),this,proxyObject));
|
||||
-
|
||||
- return proxyObject;
|
||||
-
|
||||
+ // Now we are using nsRunnable, no more proxy object manager.
|
||||
+ return this;
|
||||
}
|
||||
|
||||
CoolKeyNode* rhCoolKey::GetCoolKeyInfo(unsigned long aKeyType, const char * aKeyID)
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix14 ./esc/src/app/xpcom/rhCoolKey.h
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.h.fix14 2012-05-10 15:09:37.274144142 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.h 2012-05-10 15:09:37.300143818 -0700
|
||||
@@ -120,6 +120,7 @@ protected:
|
||||
static std::list< nsCOMPtr <rhIKeyNotify> > gNotifyListeners;
|
||||
|
||||
static PRLock* certCBLock;
|
||||
+ static PRLock* eventLock;
|
||||
|
||||
rhICoolKey* mProxy;
|
||||
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix14 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix14 2012-05-10 15:09:37.295143878 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2012-05-10 15:09:37.300143818 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-15
|
||||
+Version=1.1.0-16
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001016
|
||||
+BuildID=0000001017
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/password.xul.fix14 ./esc/src/app/xul/esc/chrome/content/esc/password.xul
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/password.xul.fix14 2012-05-10 15:09:37.251144429 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/password.xul 2012-05-10 15:09:37.301143805 -0700
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
|
||||
<script src="password.js"/>
|
||||
-<script src="TRAY.js"/>
|
||||
|
||||
<spacer class = "horSpacerVeryShort"/>
|
||||
<grid>
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix14 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix14 2009-02-03 17:43:47.000000000 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2012-05-10 15:09:37.302143792 -0700
|
||||
@@ -451,7 +451,6 @@ HRESULT CoolKeyHandler::Init(const CoolK
|
||||
PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CoolKeyHandler::Init:\n",GetTStamp(tBuff,56)));
|
||||
|
||||
bool connected = false;
|
||||
- PRThread* cThread = NULL;
|
||||
const char *readerName = NULL;
|
||||
|
||||
if (!aKey || aKey->mKeyType != eCKType_CoolKey || !aKey->mKeyID) {
|
||||
@@ -461,9 +460,6 @@ HRESULT CoolKeyHandler::Init(const CoolK
|
||||
|
||||
readerName = GetReaderNameForKeyID(aKey);
|
||||
|
||||
- cThread = PR_GetCurrentThread();
|
||||
-
|
||||
-
|
||||
mKey = *aKey;
|
||||
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix14 ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp
|
||||
--- ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix14 2012-05-10 15:09:37.250144442 -0700
|
||||
+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp 2012-05-10 15:09:37.302143792 -0700
|
||||
@@ -29,6 +29,9 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
+#ifdef LINUX
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
static PRLogModuleInfo *coolKeyLogSC = PR_NewLogModule("coolKeySmart");
|
||||
|
@ -1,724 +0,0 @@
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix15 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix15 2012-11-26 14:34:39.963604936 -0800
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2012-11-26 14:34:57.012934189 -0800
|
||||
@@ -16,6 +16,7 @@
|
||||
* END COPYRIGHT BLOCK **/
|
||||
|
||||
#define FORCE_PR_LOG 1
|
||||
+#define nsnull NULL
|
||||
#include <stdio.h>
|
||||
#include "rhCoolKey.h"
|
||||
#include "CoolKey.h"
|
||||
diff -up ./esc/src/app/xpcom/rhICoolKey.idl.fix15 ./esc/src/app/xpcom/rhICoolKey.idl
|
||||
--- ./esc/src/app/xpcom/rhICoolKey.idl.fix15 2012-11-26 14:33:41.730480795 -0800
|
||||
+++ ./esc/src/app/xpcom/rhICoolKey.idl 2012-11-26 14:34:08.479996487 -0800
|
||||
@@ -48,11 +48,11 @@ interface rhICoolKey:nsISupports
|
||||
|
||||
void CancelCoolKeyOperation(in unsigned long aKeyType, in string aKeyID);
|
||||
|
||||
- void GetAvailableCoolKeys(out PRUint32 count,
|
||||
+ void GetAvailableCoolKeys(out uint32_t count,
|
||||
[retval, array, size_is(count)] out string str);
|
||||
|
||||
void GetCoolKeyCertNicknames(in unsigned long aKeyType, in string aKeyID,
|
||||
- out PRUint32 count, [retval, array, size_is(count)] out string str);
|
||||
+ out uint32_t count, [retval, array, size_is(count)] out string str);
|
||||
|
||||
|
||||
unsigned long GetCoolKeyStatus(in unsigned long aKeyType,in string aKeyID);
|
||||
diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix15 ./esc/src/app/xpcom/tray/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix15 2012-11-21 11:55:24.396959829 -0800
|
||||
+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2012-11-21 11:55:35.227171392 -0800
|
||||
@@ -248,7 +248,7 @@ ifeq ($(OS_ARCH),Linux)
|
||||
|
||||
$(CXX) $(CPPFLAGS) -shared -o $(TARGET) $(OBJECT) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(GECKO_LDFLAGS) $(COOLKEY_LIBS)
|
||||
chmod +x $(TARGET)
|
||||
- strip $(TARGET)
|
||||
+ #strip $(TARGET)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix15 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix15 2012-11-21 11:56:16.677981170 -0800
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2012-11-26 14:26:03.793664849 -0800
|
||||
@@ -290,7 +290,7 @@ HRESULT rhTray::Initialize()
|
||||
|
||||
PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Initialize \n",GetTStamp(tBuff,56)));
|
||||
g_set_print_handler(rhTray::TrayPrintHandler);
|
||||
- notify_icon_create_with_image_file(COOLKEY_ICON);
|
||||
+ notify_icon_create_with_image_file((char *)COOLKEY_ICON);
|
||||
|
||||
HRESULT res = notify_icon_created_ok();
|
||||
|
||||
@@ -690,7 +690,7 @@ rhITrayWindNotify* rhTray::GetTrayWindNo
|
||||
|
||||
PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",GetTStamp(tBuff,56),listener));
|
||||
|
||||
- return nsnull;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
int rhTray::GetTrayWindNotifyListSize()
|
||||
diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix15 ./esc/src/app/xpcom/tray/rhTray.h
|
||||
--- ./esc/src/app/xpcom/tray/rhTray.h.fix15 2012-11-21 11:57:47.827762126 -0800
|
||||
+++ ./esc/src/app/xpcom/tray/rhTray.h 2012-11-21 11:57:58.304966858 -0800
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
int maxSize = 55;
|
||||
if(aSize < maxSize)
|
||||
return NULL;
|
||||
- char *tFormat = "[%c]";
|
||||
+ char *tFormat = (char *) "[%c]";
|
||||
time_t tm = time(NULL);
|
||||
struct tm *ptr = localtime(&tm);
|
||||
strftime(aTime ,maxSize ,tFormat,ptr);
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/advancedinfo.xul.fix15 ./esc/src/app/xul/esc/chrome/content/esc/advancedinfo.xul
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/advancedinfo.xul.fix15 2012-11-21 14:23:47.146114600 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/advancedinfo.xul 2012-11-21 14:24:57.057408644 -0800
|
||||
@@ -22,6 +22,9 @@
|
||||
<window
|
||||
class="escwindow"
|
||||
id="esc-window"
|
||||
+ height="500"
|
||||
+ width="600"
|
||||
+ persist="width height"
|
||||
onload="ShowAdvancedInfo();"
|
||||
onunload="cleanup();"
|
||||
title="&escTitle;"
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/config.xul.fix15 ./esc/src/app/xul/esc/chrome/content/esc/config.xul
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/config.xul.fix15 2012-11-21 14:25:17.956795502 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/config.xul 2012-11-21 14:25:53.737457832 -0800
|
||||
@@ -26,6 +26,7 @@
|
||||
onload="InitializePhoneHomeConfigUI();"
|
||||
width ="650"
|
||||
height= "400"
|
||||
+ persist="width height"
|
||||
onunload="cleanup();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/esc.css.fix15 ./esc/src/app/xul/esc/chrome/content/esc/esc.css
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/esc.css.fix15 2012-11-21 14:26:08.849737580 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/esc.css 2012-11-21 14:27:06.947813071 -0800
|
||||
@@ -334,6 +334,10 @@ tr [COOLKeyPresent="yes"]{
|
||||
border: black solid 4px;
|
||||
}
|
||||
|
||||
+.BorderedBrowser {
|
||||
+ border: black solid 4px;
|
||||
+}
|
||||
+
|
||||
.SelectedRow {
|
||||
|
||||
color: white;
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix15 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix15 2012-11-20 16:10:36.281805678 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2012-11-21 14:55:47.392037184 -0800
|
||||
@@ -29,6 +29,7 @@ var gAdminPage = 0;
|
||||
var gFactoryMode = 0;
|
||||
var gHiddenPage = 0;
|
||||
var gExternalUI = 0;
|
||||
+var gErrorAlready = 0;
|
||||
|
||||
loadStringBundle();
|
||||
|
||||
@@ -116,9 +117,10 @@ jsNotify.prototype = {
|
||||
{
|
||||
// alert("iid: " + iid);
|
||||
if(!iid.equals(Components.interfaces.rhIKeyNotify) &&
|
||||
- !iid.equals(Components.interfaces.nsISupports))
|
||||
+ !iid.equals(Components.interfaces.nsISupports) &&
|
||||
+ !iid.equals(Components.interfaces.nsIClassInfo))
|
||||
{
|
||||
- //MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
+ MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
return this;
|
||||
@@ -885,7 +887,7 @@ function DoShowAdvancedInfo()
|
||||
textDump += getBundleString("noLogFileOrData");
|
||||
}
|
||||
|
||||
- var wnd = window.openDialog("chrome://esc/content/advancedinfo.xul","Info","chrome,centerscreen,width=600,height=500,modal=yes",textDump);
|
||||
+ var wnd = window.openDialog("chrome://esc/content/advancedinfo.xul","Info","chrome,centerscreen,modal=yes",textDump);
|
||||
|
||||
}
|
||||
|
||||
@@ -1279,7 +1281,8 @@ function DoShowFullEnrollmentUI()
|
||||
}
|
||||
else
|
||||
{
|
||||
- UpdateEnrollmentArea(keyType,keyID,keyInserted,showFullUI);
|
||||
+ MyAlert(getBundleString("errorPhoneHomeInfo"));
|
||||
+ window.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1424,7 +1427,7 @@ function UpdateEnrollmentArea(keyType,ke
|
||||
HideItem(yes_key_area);
|
||||
HideItem(enroll_key_message);
|
||||
HideItem(enrollBtn);
|
||||
- UpdateESCSize(ESC_ENROLL_WIDTH,ESC_ENROLL_HEIGHT);
|
||||
+ UpdateESCSize();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1453,7 +1456,7 @@ function UpdateEnrollmentArea(keyType,ke
|
||||
|
||||
if(!alreadyEnrolled && inserted && showExternalUI)
|
||||
{
|
||||
- UpdateESCSize(ESC_ENROLL_WIDTH,ESC_ENROLL_HEIGHT);
|
||||
+ UpdateESCSize();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1792,9 +1795,73 @@ function InitializeEnrollment()
|
||||
UpdateCoolKeyAvailabilityForEnrollment();
|
||||
}
|
||||
|
||||
+function AdminKeyPressHandler(evt)
|
||||
+{
|
||||
+ var newitem = null;
|
||||
+ var olditem = null;
|
||||
+ var offset = 0;
|
||||
+ var selectedIndex = 0;
|
||||
+
|
||||
+ var list = document.getElementById("AdminBindingList");
|
||||
+ if(!list)
|
||||
+ return;
|
||||
+
|
||||
+ var numRows = list.getRowCount();
|
||||
+ if(numRows == 0)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ list.selectItem(gCurrentSelectedRow);
|
||||
+ selectedIndex = list.selectedIndex;
|
||||
+
|
||||
+ if(selectedIndex == -1)
|
||||
+ {
|
||||
+ olditem = list.getItemAtIndex(0);
|
||||
+ if(olditem) {
|
||||
+ list.selectItem(olditem);
|
||||
+ olditem.click();
|
||||
+ }
|
||||
+ }
|
||||
+ selectedIndex = list.selectedIndex;
|
||||
+ olditem = list.getItemAtIndex(selectedIndex);
|
||||
+
|
||||
+ if(evt.keyCode == KeyEvent.DOM_VK_UP) {
|
||||
+ offset = -1;
|
||||
+ }
|
||||
+ if(evt.keyCode == KeyEvent.DOM_VK_DOWN) {
|
||||
+ offset = 1;
|
||||
+ }
|
||||
+
|
||||
+ if(offset == 0)
|
||||
+ return;
|
||||
+
|
||||
+ if(olditem) {
|
||||
+ list.moveByOffset( offset , 1, 0);
|
||||
+ newitem = list.getItemAtIndex(list.selectedIndex);
|
||||
+ olditem.blur();
|
||||
+ if(newitem)
|
||||
+ newitem.click();
|
||||
+ }
|
||||
+
|
||||
+ var item = null;
|
||||
+ for( i = 0; i < list.getRowCount(); i ++) {
|
||||
+ item = list.getItemAtIndex(i);
|
||||
+
|
||||
+ if(item && item != gCurrentSelectedRow) {
|
||||
+ item.setAttribute("class","UnSelectedRow");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
function InitializeAdminBindingList()
|
||||
{
|
||||
|
||||
+ var list = document.getElementById("AdminBindingList");
|
||||
+
|
||||
+ if(list) {
|
||||
+ list.addEventListener("keypress", AdminKeyPressHandler, false);
|
||||
+ }
|
||||
+
|
||||
gAdminPage = 1;
|
||||
|
||||
UpdateAdminBindingListAvailability();
|
||||
@@ -1802,8 +1869,7 @@ function InitializeAdminBindingList()
|
||||
DoSetEnrolledBrowserLaunchState();
|
||||
DoHandleEnrolledBrowserLaunch();
|
||||
|
||||
- window.setTimeout('ShowWindow()',250);
|
||||
-
|
||||
+ list.focus();
|
||||
}
|
||||
|
||||
//Window related functions
|
||||
@@ -1974,12 +2040,18 @@ function SelectESCPage(keyType,keyID,pho
|
||||
var enrollWnd = IsPageWindowPresent(ENROLL_WINDOW);
|
||||
var adminWnd = IsPageWindowPresent(ADMIN_WINDOW);
|
||||
|
||||
- if(keyUninitialized == UNINITIALIZED && !phoneHomeFailed ) //formatted uninitialized card
|
||||
+ var arr = GetAvailableCoolKeys();
|
||||
+ var no_launch_external_ui = 0;
|
||||
+
|
||||
+ if (arr && arr.length > 1)
|
||||
+ no_launch_external_ui = 1;
|
||||
+
|
||||
+
|
||||
+ if(keyUninitialized == UNINITIALIZED && !phoneHomeFailed && !no_launch_external_ui ) //formatted uninitialized card
|
||||
{
|
||||
if(enrollWnd) //Enrollment window is already up
|
||||
{
|
||||
enrollWnd.focus();
|
||||
- enrollWnd.ShowWindow();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2332,12 +2404,14 @@ function UpdateAdminKeyDetailsArea(keyTy
|
||||
}
|
||||
else
|
||||
{
|
||||
+ DisableItem(enrollbtn);
|
||||
DisableItem(resetpinbtn);
|
||||
DisableItem(formatbtn);
|
||||
if(adminkeymenu)
|
||||
{
|
||||
DisableItem(menu_format);
|
||||
DisableItem(menu_resetpassword);
|
||||
+ DisableItem(menu_enroll);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2762,6 +2836,7 @@ function DoEnrollCoolKey()
|
||||
var tokencode = null;
|
||||
|
||||
var failed = 0;
|
||||
+ gErrorAlready = 0;
|
||||
|
||||
if (type == "userKey")
|
||||
{
|
||||
@@ -2792,12 +2867,13 @@ function DoEnrollCoolKey()
|
||||
{
|
||||
UpdateAdminListRow(keyType,keyID);
|
||||
UpdateAdminKeyDetailsArea(keyType,keyID);
|
||||
- if(!failed)
|
||||
+ if(!failed && !gErrorAlready)
|
||||
{
|
||||
AdminToggleStatusProgress(1,keyType,keyID);
|
||||
UpdateAdminKeyAreaDetailsLabel(getBundleString("enrollingToken"));
|
||||
}
|
||||
}
|
||||
+ gErrorAlready = 0;
|
||||
}
|
||||
|
||||
function DoCollectPassword(operation)
|
||||
@@ -2822,6 +2898,7 @@ function DoResetSelectedCoolKeyPIN()
|
||||
var screennamepwd = null;
|
||||
|
||||
var failed = 0;
|
||||
+ gErrorAlready = 0;
|
||||
|
||||
if (GetCoolKeyIsEnrolled(keyType, keyID))
|
||||
{
|
||||
@@ -2843,12 +2920,13 @@ function DoResetSelectedCoolKeyPIN()
|
||||
UpdateAdminListRow(keyType,keyID);
|
||||
UpdateAdminKeyDetailsArea(keyType,keyID);
|
||||
|
||||
- if(!failed)
|
||||
+ if(!failed && !gErrorAlready)
|
||||
{
|
||||
AdminToggleStatusProgress(1,keyType,keyID);
|
||||
UpdateAdminKeyAreaDetailsLabel(getBundleString("resettingTokenPIN"));
|
||||
}
|
||||
}
|
||||
+ gErrorAlready = 0;
|
||||
}
|
||||
|
||||
function DoFormatCoolKey(type)
|
||||
@@ -2865,6 +2943,7 @@ function DoFormatCoolKey(type)
|
||||
var failed = 0;
|
||||
var globalType = GetCachedTokenType(keyID);
|
||||
|
||||
+ gErrorAlready = 0;
|
||||
if(!type)
|
||||
lType = gKeyEnrollmentType;
|
||||
else
|
||||
@@ -2890,12 +2969,13 @@ function DoFormatCoolKey(type)
|
||||
{
|
||||
UpdateAdminListRow(keyType,keyID);
|
||||
UpdateAdminKeyDetailsArea(keyType,keyID);
|
||||
- if(!failed)
|
||||
+ if(!failed && !gErrorAlready)
|
||||
{
|
||||
AdminToggleStatusProgress(1,keyType,keyID);
|
||||
UpdateAdminKeyAreaDetailsLabel(getBundleString("formatingToken"));
|
||||
}
|
||||
}
|
||||
+ gErrorAlready = 0;
|
||||
}
|
||||
function DoCancelOperation()
|
||||
{
|
||||
@@ -3156,6 +3236,7 @@ function OnCoolKeyStateError(keyType, ke
|
||||
AdminToggleStatusProgress(0,keyType,keyID);
|
||||
}
|
||||
|
||||
+ gErrorAlready = 1;
|
||||
if(!CheckForSecurityMode())
|
||||
MyAlert(typeStr);
|
||||
ClearProgressBar(KeyToProgressBarID(keyType, keyID));
|
||||
@@ -3261,9 +3342,73 @@ function refresh()
|
||||
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;
|
||||
@@ -3324,6 +3469,7 @@ function loadExternalESCUI()
|
||||
if(ui_id)
|
||||
{
|
||||
ui_id.setAttribute("src",esc_enroll_uri);
|
||||
+ ///ui_id.addProgressListener(uiListener,Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
|
||||
UpdateEnrollmentArea(keyType,keyID,inserted,showFullUI,showExternalUI)
|
||||
}
|
||||
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/esc.xul.fix15 ./esc/src/app/xul/esc/chrome/content/esc/esc.xul
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/esc.xul.fix15 2012-11-21 11:14:42.545118881 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/esc.xul 2012-11-21 11:16:21.542042804 -0800
|
||||
@@ -147,7 +147,8 @@
|
||||
</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"/>
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/password.js.fix15 ./esc/src/app/xul/esc/chrome/content/esc/password.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/password.js.fix15 2012-11-21 11:16:28.740186184 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/password.js 2012-11-21 11:18:32.722686536 -0800
|
||||
@@ -42,6 +42,21 @@ function doOperation()
|
||||
window.close();
|
||||
}
|
||||
|
||||
+//
|
||||
+// unregister out notify event
|
||||
+//
|
||||
+function cleanup()
|
||||
+{
|
||||
+ TrayRemoveWindow(null);
|
||||
+ try {
|
||||
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
+ netkey.rhCoolKeyUnSetNotifyCallback(gNotify);
|
||||
+ } catch(e) {
|
||||
+ MyAlert(getBundleString("errorUniversalXPConnect") + e);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
|
||||
function GetLocalPINValue()
|
||||
{
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/password.xul.fix15 ./esc/src/app/xul/esc/chrome/content/esc/password.xul
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/security.xul.fix15 ./esc/src/app/xul/esc/chrome/content/esc/security.xul
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/security.xul.fix15 2012-11-21 14:52:14.192045524 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/security.xul 2012-11-21 14:52:57.839863826 -0800
|
||||
@@ -26,6 +26,7 @@
|
||||
onload="InitializeSecurityEnrollment()"
|
||||
width ="600"
|
||||
height= "575"
|
||||
+ persist="width height"
|
||||
onunload="cleanup();OnSecurityPageHidden();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/settings.xul.fix15 ./esc/src/app/xul/esc/chrome/content/esc/settings.xul
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/settings.xul.fix15 2012-11-21 14:53:16.829219643 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/settings.xul 2012-11-21 14:53:42.456699662 -0800
|
||||
@@ -28,6 +28,7 @@
|
||||
width ="720"
|
||||
height= "415"
|
||||
name="admin"
|
||||
+ persist="width height"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix15 ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix15 2012-11-21 14:54:00.574038897 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js 2012-11-21 14:58:29.722107000 -0800
|
||||
@@ -47,9 +47,10 @@ jsWindNotify.prototype = {
|
||||
{
|
||||
//alert("iid: " + iid);
|
||||
if(!iid.equals(Components.interfaces.rhITrayWindNotify) &&
|
||||
- !iid.equals(Components.interfaces.nsISupports))
|
||||
+ !iid.equals(Components.interfaces.nsISupports) &&
|
||||
+ !iid.equals(Components.interfaces.nsIClassInfo)
|
||||
{
|
||||
- //MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
+ MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
return this;
|
||||
@@ -423,6 +424,13 @@ alert("exception " + e);
|
||||
}
|
||||
}
|
||||
|
||||
+//Cleanup this window if ESC.js doesn't do it
|
||||
+function traycleanup()
|
||||
+{
|
||||
+ TrayRemoveWindow(null);
|
||||
+}
|
||||
+
|
||||
+
|
||||
//String bundling related functions
|
||||
|
||||
function loadStringBundle()
|
||||
diff -up ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties.fix15 ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties
|
||||
--- ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties.fix15 2012-11-21 11:21:31.426280759 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties 2012-11-21 11:22:33.427512763 -0800
|
||||
@@ -176,6 +176,8 @@ errorSelectKey=Please select a smart car
|
||||
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
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix15 ./esc/src/lib/coolkey/CoolKey.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix15 2012-11-21 14:58:53.164558727 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2012-11-21 15:02:47.425039628 -0800
|
||||
@@ -1412,7 +1412,7 @@ char *GetTStamp(char *aTime,int aSize)
|
||||
if(aSize < maxSize)
|
||||
return NULL;
|
||||
|
||||
- char *tFormat = "[%c]";
|
||||
+ char *tFormat = (char *) "[%c]";
|
||||
time_t tm = time(NULL);
|
||||
struct tm *ptr = localtime(&tm);
|
||||
strftime(aTime ,maxSize ,tFormat,ptr);
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix15 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix15 2012-11-21 15:03:00.069280046 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2012-11-21 15:04:00.118420187 -0800
|
||||
@@ -1096,7 +1096,7 @@ HRESULT CoolKeyHandler::HttpBeginOpReque
|
||||
|
||||
char ascii_port[50];
|
||||
char host_port[200];
|
||||
- char *method = "POST";
|
||||
+ char *method = (char *) "POST";
|
||||
|
||||
if(mCharScreenName && mCharScreenNamePwd)
|
||||
{
|
||||
@@ -1131,7 +1131,7 @@ HRESULT CoolKeyHandler::HttpBeginOpReque
|
||||
|
||||
string ext_buffer = "";
|
||||
|
||||
- char *clientVer = "ESC 1.0.1";
|
||||
+ char *clientVer = (char *) "ESC 1.0.1";
|
||||
sprintf(buffer,"clientVersion=%s",clientVer);
|
||||
|
||||
ext_buffer = buffer;
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey_Message.cpp.fix15 ./esc/src/lib/coolkey/CoolKey_Message.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKey_Message.cpp.fix15 2012-11-21 11:25:37.996165274 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKey_Message.cpp 2012-11-21 11:27:42.797605767 -0800
|
||||
@@ -560,7 +560,12 @@ void eCKMessage_LOGIN_RESPONSE::encode(s
|
||||
|
||||
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);
|
||||
}
|
||||
diff -up ./esc/src/lib/coolkey/NSSManager.cpp.fix15 ./esc/src/lib/coolkey/NSSManager.cpp
|
||||
--- ./esc/src/lib/coolkey/NSSManager.cpp.fix15 2012-11-21 15:04:06.329537968 -0800
|
||||
+++ ./esc/src/lib/coolkey/NSSManager.cpp 2012-11-21 15:04:53.612433763 -0800
|
||||
@@ -96,7 +96,7 @@ HRESULT NSSManager::InitNSS(const char *
|
||||
}
|
||||
}
|
||||
|
||||
- char *libName = COOLKEY_PKCS11_LIBRARY ;
|
||||
+ char *libName = (char *) COOLKEY_PKCS11_LIBRARY ;
|
||||
|
||||
PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS: About to try SECMOD_AddNewModule :%s \n",GetTStamp(tBuff,56),libName));
|
||||
|
||||
@@ -330,8 +330,8 @@ NSSManager::GetKeyCertNicknames( const C
|
||||
|
||||
CERTCertNicknames *nicknames =
|
||||
CERT_NicknameStringsFromCertList(certs,
|
||||
- NICKNAME_EXPIRED_STRING,
|
||||
- NICKNAME_NOT_YET_VALID_STRING);
|
||||
+ (char *) NICKNAME_EXPIRED_STRING,
|
||||
+ (char *) NICKNAME_NOT_YET_VALID_STRING);
|
||||
|
||||
char *curName = NULL;
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix15 ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp
|
||||
--- ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix15 2012-11-21 15:05:09.934742670 -0800
|
||||
+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp 2012-11-21 15:40:49.570037221 -0800
|
||||
@@ -35,8 +35,10 @@
|
||||
|
||||
static PRLogModuleInfo *coolKeyLogSC = PR_NewLogModule("coolKeySmart");
|
||||
|
||||
+static const PRUint32 COOLKEY_SHUTDOWN_WAIT_INTERVAL = 3;
|
||||
+
|
||||
SmartCardMonitoringThread::SmartCardMonitoringThread(SECMODModule *aModule)
|
||||
- : mModule(aModule), mThread(NULL)
|
||||
+ : mModule(aModule), mThread(NULL), mExitThread(NULL)
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
@@ -184,6 +186,9 @@ void SmartCardMonitoringThread::Execute(
|
||||
|
||||
} while (1);
|
||||
|
||||
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
+ ("%s SmartCardMonitoringThread::Execute Leaving thread : \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
}
|
||||
|
||||
void SmartCardMonitoringThread::Interrupt()
|
||||
@@ -195,6 +200,14 @@ void SmartCardMonitoringThread::Interrup
|
||||
if(mThread)
|
||||
{
|
||||
SECStatus rv;
|
||||
+
|
||||
+ if (!mExitThread) {
|
||||
+ mExitThread = PR_CreateThread(PR_SYSTEM_THREAD, ExitTimeout, this,
|
||||
+ PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
|
||||
+ PR_JOINABLE_THREAD, 0);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
rv = SECMOD_CancelWait(mModule);
|
||||
if (rv !=SECSuccess) {
|
||||
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
@@ -255,3 +268,28 @@ void SmartCardMonitoringThread::LaunchEx
|
||||
{
|
||||
((SmartCardMonitoringThread*)arg)->Execute();
|
||||
}
|
||||
+
|
||||
+void SmartCardMonitoringThread::ExitTimeout(void *arg)
|
||||
+{
|
||||
+ char tBuff[56];
|
||||
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
+ ("%s SmartCardMonitoringThread::ExitTimeout : \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
+
|
||||
+ if (arg == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ PR_Sleep(PR_SecondsToInterval(COOLKEY_SHUTDOWN_WAIT_INTERVAL));
|
||||
+
|
||||
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
+ ("%s SmartCardMonitoringThread::ExitTimeout : wait is done. \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
+ if(((SmartCardMonitoringThread*)arg)->mThread != NULL) {
|
||||
+
|
||||
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
+ ("%s SmartCardMonitoringThread::ExitTimeout : Timeout expired while SECMOD_Cancel is hanging, good-bye..! \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
+ _exit(0);
|
||||
+ }
|
||||
+}
|
||||
diff -up ./esc/src/lib/coolkey/SmartCardMonitoringThread.h.fix15 ./esc/src/lib/coolkey/SmartCardMonitoringThread.h
|
||||
--- ./esc/src/lib/coolkey/SmartCardMonitoringThread.h.fix15 2012-11-21 15:14:55.270744772 -0800
|
||||
+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.h 2012-11-21 15:16:42.068742060 -0800
|
||||
@@ -45,9 +45,11 @@ class SmartCardMonitoringThread
|
||||
void Remove(CoolKeyInfo *info);
|
||||
|
||||
static void LaunchExecute(void *arg);
|
||||
+ static void ExitTimeout(void *arg);
|
||||
|
||||
SECMODModule *mModule;
|
||||
PRThread* mThread;
|
||||
+ PRThread* mExitThread;
|
||||
char* mCurrentActivation;
|
||||
};
|
||||
|
||||
diff -up ./esc/src/lib/notifytray/notifytray.c.fix15 ./esc/src/lib/notifytray/notifytray.c
|
||||
--- ./esc/src/lib/notifytray/notifytray.c.fix15 2012-11-21 15:35:54.119380073 -0800
|
||||
+++ ./esc/src/lib/notifytray/notifytray.c 2012-11-21 15:36:57.948605760 -0800
|
||||
@@ -218,7 +218,7 @@ void notify_icon_send_tooltip_msg(const
|
||||
if(!message || !notify)
|
||||
return;
|
||||
|
||||
- gchar *msg_title = NULL;
|
||||
+ const gchar *msg_title = NULL;
|
||||
|
||||
|
||||
if(!title)
|
@ -1,423 +0,0 @@
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix16 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix16 2012-11-28 14:47:47.510976503 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2012-11-28 14:49:58.889984069 -0800
|
||||
@@ -133,7 +133,6 @@ jsNotify.prototype = {
|
||||
var gNotify=null;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey = Components.classes["@redhat.com/rhCoolKey;1"].getService();
|
||||
netkey = netkey.QueryInterface(Components.interfaces.rhICoolKey);
|
||||
gNotify = new jsNotify;
|
||||
@@ -152,7 +151,6 @@ function cleanup()
|
||||
{
|
||||
TrayRemoveWindow(null);
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.rhCoolKeyUnSetNotifyCallback(gNotify);
|
||||
} catch(e) {
|
||||
MyAlert(getBundleString("errorUniversalXPConnect") + e);
|
||||
@@ -425,7 +423,6 @@ function commitConfigValues()
|
||||
var res = 0;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
res = netkey.SetCoolKeyConfigValue("esc.tps.url",tps_uri_value);
|
||||
|
||||
} catch(e) {
|
||||
@@ -434,7 +431,6 @@ function commitConfigValues()
|
||||
}
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
res = netkey.SetCoolKeyConfigValue("esc.enroll.ui.url",esc_enroll_value);
|
||||
grantPrivilegesURL(esc_enroll_value);
|
||||
@@ -466,7 +462,6 @@ function InitializeConfigUI()
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
tps_uri = netkey.GetCoolKeyConfigValue("esc.tps.url");
|
||||
|
||||
@@ -487,7 +482,6 @@ function InitializeConfigUI()
|
||||
var esc_enroll_uri = null;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
esc_enroll_uri = netkey.GetCoolKeyConfigValue("esc.enroll.ui.url");
|
||||
|
||||
@@ -550,7 +544,6 @@ function CoolKeySetDataValue(aKeyType,aK
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
netkey.SetCoolKeyDataValue(aKeyType,aKeyID,name,value);
|
||||
|
||||
@@ -567,7 +560,6 @@ function CoolKeySetTokenPin(pin)
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"TokenPin",pin);
|
||||
|
||||
} catch(e) {
|
||||
@@ -581,7 +573,6 @@ function CoolKeySetUidPassword(uid,pwd)
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"UserId",uid);
|
||||
netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"Password",pwd);
|
||||
|
||||
@@ -646,7 +637,6 @@ function ReportException(msg, e)
|
||||
function GetCoolKeyStatus(keyType, keyID)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.GetCoolKeyStatus(keyType, keyID);
|
||||
} catch (e) {
|
||||
ReportException(getBundleString("errorCoolKeyGetStatus"), e);
|
||||
@@ -665,7 +655,6 @@ function ConfigValueWithKeyID(keyID,conf
|
||||
function GetCoolKeyPolicy(keyType, keyID)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.GetCoolKeyPolicy(keyType, keyID);
|
||||
} catch (e) {
|
||||
//ReportException(getBundleString("errorCoolKeyGetPolicy"), e);
|
||||
@@ -676,7 +665,6 @@ function GetCoolKeyPolicy(keyType, keyID
|
||||
function GetCoolKeyRequiresAuth(keyType, keyID)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.GetCoolKeyRequiresAuthentication(keyType, keyID);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorCoolKeyRequiresAuth"), e);
|
||||
@@ -687,7 +675,6 @@ function GetCoolKeyRequiresAuth(keyType,
|
||||
function AuthenticateCoolKey(keyType, keyID,aPIN)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.AuthenticateCoolKey(keyType, keyID,"netscape");
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorAuthCoolKey"), e);
|
||||
@@ -698,7 +685,6 @@ function AuthenticateCoolKey(keyType, ke
|
||||
function GetCoolKeyIsAuthed(keyType, keyID)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.GetCoolKeyIsAuthenticated(keyType, keyID);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorCoolKeyIsAuth"), e);
|
||||
@@ -717,7 +703,6 @@ function GetCoolKeyIssuer(keyType,keyID)
|
||||
if(!issuer && (GetStatusForKeyID(keyType, keyID) == getBundleString("statusEnrolled")))
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
issuer = netkey.GetCoolKeyIssuer(keyType,keyID);
|
||||
|
||||
var issuer_url = ConfigValueWithKeyID(keyID,KEY_ISSUER_URL);
|
||||
@@ -757,7 +742,6 @@ function GetCoolKeyIssuedTo(keyType,keyI
|
||||
var issuedTo = null;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
issuedTo = netkey.GetCoolKeyIssuedTo(keyType,keyID);
|
||||
|
||||
} catch (e)
|
||||
@@ -895,7 +879,6 @@ function GetCoolKeyCertNicknames(aKeyTyp
|
||||
{
|
||||
try {
|
||||
var nameArr;
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var inArray = netkey.GetCoolKeyCertNicknames(aKeyType,aKeyId, {} );
|
||||
nameArr = new Array(inArray.length);
|
||||
var i;
|
||||
@@ -915,7 +898,6 @@ function GetCoolKeyVersion()
|
||||
var result = null;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
result = netkey.GetCoolKeyVersion();
|
||||
return result;
|
||||
} catch(e) {
|
||||
@@ -928,7 +910,6 @@ function GetCoolKeyCertInfo(aKeyType,aKe
|
||||
{
|
||||
try {
|
||||
var info = null;
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
info = netkey.GetCoolKeyCertInfo(aKeyType,aKeyId, aCertNickname );
|
||||
return info;
|
||||
} catch(e) {
|
||||
@@ -942,7 +923,6 @@ function GetAvailableCoolKeys()
|
||||
try {
|
||||
var keyArr;
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var inArray = netkey.GetAvailableCoolKeys( {} );
|
||||
keyArr = new Array(inArray.length);
|
||||
var i;
|
||||
@@ -963,7 +943,6 @@ function CoolKeyLogMsg(aLogLevel,aMessag
|
||||
return;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.CoolKeyLogMsg(aLogLevel,aMessage);
|
||||
} catch(e) {
|
||||
}
|
||||
@@ -972,7 +951,6 @@ function CoolKeyLogMsg(aLogLevel,aMessag
|
||||
function ChallengeCoolKey(keyType, keyID, data)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.ChallengeCoolKey(keyType, keyID, data);
|
||||
} catch(e) {
|
||||
return [];
|
||||
@@ -982,7 +960,6 @@ function ChallengeCoolKey(keyType, keyID
|
||||
function EnrollCoolKey(keyType, keyID, enrollmentType, screenname, pin,screennamepwd,tokencode)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.EnrollCoolKey(keyType, keyID, enrollmentType, screenname, pin,screennamepwd,tokencode);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorEnollCoolKey"), e);
|
||||
@@ -995,7 +972,6 @@ function EnrollCoolKey(keyType, keyID, e
|
||||
function GetCoolKeyIsEnrolled(keyType, keyID)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return netkey.GetCoolKeyIsEnrolled(keyType, keyID);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorCoolKeyIsEnrolled"), e);
|
||||
@@ -1006,7 +982,6 @@ function GetCoolKeyIsEnrolled(keyType, k
|
||||
function ResetCoolKeyPIN(keyType, keyID, screenname, pin,screennamepwd)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.ResetCoolKeyPIN(keyType, keyID, screenname, pin,screennamepwd);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorResetCoolKeyPIN"), e);
|
||||
@@ -1017,7 +992,6 @@ function ResetCoolKeyPIN(keyType, keyID,
|
||||
function FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorFormatCoolKey"), e);
|
||||
@@ -1029,7 +1003,6 @@ function FormatCoolKey(keyType, keyID, t
|
||||
function CancelCoolKeyOperation(keyType, keyID)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
netkey.CancelCoolKeyOperation(keyType, keyID);
|
||||
} catch(e) {
|
||||
ReportException(getBundleString("errorCancelCoolKey"), e);
|
||||
@@ -3653,7 +3626,6 @@ function getESCEnrollmentUI()
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
esc_enroll_uri = netkey.GetCoolKeyConfigValue("esc.enroll.ui.url");
|
||||
|
||||
} catch(e) {
|
||||
@@ -3692,7 +3664,6 @@ function grantPrivilegesURL(aURL)
|
||||
if(prePath)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
res = netkey.SetCoolKeyConfigValue("capability.principal.codebase.p0.id",prePath);
|
||||
|
||||
@@ -3716,7 +3687,6 @@ function DoCoolKeySetConfigValue(configV
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
result = netkey.SetCoolKeyConfigValue(configValue,newValue);
|
||||
|
||||
@@ -3739,7 +3709,6 @@ function DoCoolKeyGetConfigValue(configV
|
||||
if(netkey)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
result = netkey.GetCoolKeyConfigValue(configValue);
|
||||
|
||||
@@ -3791,7 +3760,6 @@ function DoGetCoolKeyIsReallyCoolKey(key
|
||||
return 0;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var isCool = netkey.GetCoolKeyIsReallyCoolKey(keyType, keyID);
|
||||
|
||||
return isCool;
|
||||
@@ -3824,7 +3792,6 @@ function DoCoolKeyGetIssuerUrl(keyType,k
|
||||
}
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var tries = 0;
|
||||
while(tries < 3 )
|
||||
@@ -3908,7 +3875,6 @@ function DoCoolKeyGetATR(keyType,keyID)
|
||||
{
|
||||
var atr = null;
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
atr = netkey.GetCoolKeyATR(keyType, keyID);
|
||||
} catch (e) {
|
||||
return atr;
|
||||
@@ -3925,7 +3891,6 @@ function DoCoolKeyGetTokenName(keyType,k
|
||||
|
||||
var name = null;
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
name = netkey.GetCoolKeyTokenName(keyType, keyID);
|
||||
} catch (e) {
|
||||
return name;
|
||||
@@ -3940,7 +3905,6 @@ function DoGetCoolKeyGetAppletVer(keyTyp
|
||||
var ver = -1;
|
||||
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var ver = netkey.GetCoolKeyGetAppletVer(keyType, keyID,isMajor);
|
||||
} catch (e) {
|
||||
ver = -1;
|
||||
@@ -4633,7 +4597,6 @@ function DoMyAlert(message,title)
|
||||
{
|
||||
if(!message || !title)
|
||||
return; try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
||||
|
||||
prompts.alert(window,title,message);
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix16 ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix16 2012-11-28 14:47:52.965976817 -0800
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js 2012-11-28 14:48:43.665979745 -0800
|
||||
@@ -48,7 +48,7 @@ jsWindNotify.prototype = {
|
||||
//alert("iid: " + iid);
|
||||
if(!iid.equals(Components.interfaces.rhITrayWindNotify) &&
|
||||
!iid.equals(Components.interfaces.nsISupports) &&
|
||||
- !iid.equals(Components.interfaces.nsIClassInfo)
|
||||
+ !iid.equals(Components.interfaces.nsIClassInfo))
|
||||
{
|
||||
MyAlert(getBundleString("errorJsNotifyInterface"));
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
@@ -63,7 +63,6 @@ jsWindNotify.prototype = {
|
||||
|
||||
// GECKO ONLY initialization
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
gTray = Components.classes["@redhat.com/rhTray;1"].getService();
|
||||
|
||||
|
||||
@@ -129,7 +128,6 @@ function GetTrayIsInitialized()
|
||||
|
||||
try
|
||||
{
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
rv = gTray.isInitializedAlready();
|
||||
|
||||
@@ -155,7 +153,6 @@ function ShowAllWindows()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.showall();
|
||||
|
||||
@@ -175,7 +172,6 @@ function HideAllWindows()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.hideall();
|
||||
|
||||
@@ -196,7 +192,6 @@ function ShowWindow()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.show(gBaseWindow);
|
||||
|
||||
@@ -216,7 +211,6 @@ function HideWindow()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.hide(gBaseWindow);
|
||||
|
||||
@@ -235,7 +229,6 @@ function TrayRemoveWindowNotify()
|
||||
{
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.unsetwindnotifycallback(gWindNotify);
|
||||
|
||||
@@ -254,7 +247,6 @@ function TrayRemoveWindow(doPreserveNoti
|
||||
{
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.remove(gBaseWindow);
|
||||
|
||||
@@ -277,7 +269,6 @@ function TrayAddWindow()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
gTray.add(gBaseWindow);
|
||||
|
||||
@@ -304,7 +295,6 @@ function TraySendNotificationMessage(aTi
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
|
||||
|
||||
|
||||
gTray.sendnotification(aTitle,aMessage,aSeverity,aTimeout,aIcon);
|
||||
@@ -329,7 +319,6 @@ function TrayHideNotificationIcon()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
|
||||
|
||||
gTray.hideicon();
|
||||
|
||||
@@ -361,7 +350,6 @@ function TrayShowNotificationIcon()
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
gTray.settooltipmsg(getBundleString("escTitle"));
|
||||
gTray.showicon();
|
||||
|
||||
@@ -383,7 +371,6 @@ function TrayShowTooltip(aMessage)
|
||||
|
||||
try {
|
||||
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
|
||||
;
|
||||
gTray.settooltipmsg(aMessage);
|
||||
|
||||
@@ -413,7 +400,6 @@ function TrayChangeMenuItemText(aIndex,
|
||||
if(gTray && gBaseWindow)
|
||||
{
|
||||
try {
|
||||
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
|
||||
gTray.setmenuitemtext(aIndex,aText);
|
||||
gTray.showicon();
|
||||
} catch(e) {
|
@ -1,126 +0,0 @@
|
||||
diff -up ./esc/coreconf/Linux3.9.mk.fix17 ./esc/coreconf/Linux3.9.mk
|
||||
--- ./esc/coreconf/Linux3.9.mk.fix17 2013-06-17 18:52:29.341000000 -0400
|
||||
+++ ./esc/coreconf/Linux3.9.mk 2013-06-17 18:52:48.988000000 -0400
|
||||
@@ -0,0 +1,35 @@
|
||||
+# 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
|
||||
+
|
||||
+#
|
||||
+# Config stuff for Linux 3.9 (ELF)
|
||||
+#
|
||||
+
|
||||
+include $(CORE_DEPTH)/coreconf/Linux.mk
|
||||
+
|
||||
+OS_REL_CFLAGS += -DLINUX2_1
|
||||
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
+ifdef BUILD_OPT
|
||||
+ OPTIMIZER = -O2
|
||||
+endif
|
||||
+
|
||||
+ifdef MAPFILE
|
||||
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
|
||||
+endif
|
||||
+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \
|
||||
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||
+
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix17 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix17 2013-06-17 18:48:27.263000000 -0400
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2013-06-17 18:48:27.328000000 -0400
|
||||
@@ -1383,7 +1383,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAp
|
||||
|
||||
*_retval = ver;
|
||||
|
||||
- return S_OK;
|
||||
+ return NS_OK;
|
||||
}
|
||||
|
||||
/* boolean rhCoolKeyIsEnrolled (in unsigned long aKeyType, in string aKeyID); */
|
||||
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix17 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix17 2013-06-17 18:48:27.267000000 -0400
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2013-06-17 18:48:27.329000000 -0400
|
||||
@@ -152,7 +152,10 @@ NS_IMETHODIMP rhTray::Unsetwindnotifycal
|
||||
NS_IMETHODIMP rhTray::Add(nsIBaseWindow *aWindow)
|
||||
{
|
||||
char tBuff[56];
|
||||
- NS_ENSURE_ARG(aWindow);
|
||||
+
|
||||
+ if ( aWindow == NULL) {
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
|
||||
PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Add %p \n",GetTStamp(tBuff,56),aWindow));
|
||||
HRESULT res = Initialize();
|
||||
@@ -509,7 +512,7 @@ HRESULT rhTray::AddListener(nsIBaseWindo
|
||||
nsresult rv;
|
||||
|
||||
PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddListener %p \n",GetTStamp(tBuff,56),aWindow));
|
||||
- NS_ENSURE_ARG(aWindow);
|
||||
+ //NS_ENSURE_ARG(aWindow);
|
||||
|
||||
nativeWindow aNativeWindow;
|
||||
rv = aWindow->GetParentNativeWindow( &aNativeWindow );
|
||||
@@ -635,13 +638,13 @@ NS_IMETHODIMP rhTray::Setmenuitemtext(PR
|
||||
PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Setmenuitemtext: index: %d text %s. \n",GetTStamp(tBuff,56),aIndex,aText));
|
||||
|
||||
if(!aText)
|
||||
- return S_OK;
|
||||
+ return NS_OK;
|
||||
|
||||
if(!mIconMenu)
|
||||
- return S_OK;
|
||||
+ return NS_OK;
|
||||
|
||||
if(aIndex < 0 || aIndex > 10)
|
||||
- return S_OK;
|
||||
+ return NS_OK;
|
||||
|
||||
GList *iterate = NULL;
|
||||
|
||||
@@ -670,7 +673,7 @@ NS_IMETHODIMP rhTray::Setmenuitemtext(PR
|
||||
i++;
|
||||
}
|
||||
|
||||
- return S_OK;
|
||||
+ return NS_OK;
|
||||
}
|
||||
|
||||
//rhTrayWindNotify methods
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix17 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix17 2013-06-17 18:48:27.243000000 -0400
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2013-06-17 18:48:27.330000000 -0400
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-16
|
||||
+Version=1.1.0-19
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001017
|
||||
+BuildID=0000001019
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
@@ -47,6 +47,6 @@ MinVersion=6.0.0
|
||||
; application requires. It should be specified if your application uses
|
||||
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
-MaxVersion=20.0.0
|
||||
+MaxVersion=22.0.0
|
||||
|
||||
[Shell]
|
@ -1,82 +0,0 @@
|
||||
diff -up ./esc/src/app/xpcom/Makefile.sdk.fix18 ./esc/src/app/xpcom/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/Makefile.sdk.fix18 2014-04-17 11:34:54.889316425 -0700
|
||||
+++ ./esc/src/app/xpcom/Makefile.sdk 2014-04-17 11:39:32.903840765 -0700
|
||||
@@ -113,7 +113,7 @@ ifeq ($(OS_ARCH),Linux)
|
||||
CPPFLAGS += -g -fno-rtti \
|
||||
-DXPCOM_GLUE_USE_NSPR -fno-exceptions \
|
||||
-fshort-wchar -fPIC -std=gnu++0x
|
||||
-GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L$(GECKO_SDK_PATH)/lib -lxpcomglue_s -lxpcom
|
||||
+GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L$(GECKO_SDK_PATH)/lib -lxpcomglue_s
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
@@ -127,7 +127,7 @@ endif
|
||||
# #include "mozilla-config.h" to each of your .cpp files.
|
||||
#GECKO_CONFIG_INCLUDE = -include mozilla-config.h
|
||||
|
||||
-GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_CLIENT
|
||||
+GECKO_DEFINES = -DMOZILLA_CLIENT
|
||||
|
||||
ifdef ESC_VERSION
|
||||
GECKO_DEFINES += -DESC_VERSION=$(ESC_VERSION)
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix18 ./esc/src/app/xpcom/rhCoolKey.h
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.h.fix18 2014-04-17 15:48:24.466170548 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.h 2014-04-17 15:49:25.319409778 -0700
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#ifndef RH_COOLKEY_H
|
||||
#define RH_COOLKEY_H
|
||||
-
|
||||
+#include <mozilla/Char16.h>
|
||||
#include "rhICoolKey.h"
|
||||
/*#include "nsIGenericFactory.h" */
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix18 ./esc/src/app/xpcom/tray/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix18 2014-04-17 11:24:58.080777558 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2014-04-17 11:34:28.394647654 -0700
|
||||
@@ -167,7 +167,7 @@ endif
|
||||
# #include "mozilla-config.h" to each of your .cpp files.
|
||||
#GECKO_CONFIG_INCLUDE = -include mozilla-config.h
|
||||
|
||||
-GECKO_DEFINES = -DMOZILLA_CLIENT -DXPCOM_GLUE
|
||||
+GECKO_DEFINES = -DMOZILLA_CLIENT
|
||||
|
||||
NSS_INCLUDE = /usr/include/nss3
|
||||
NSPR_INCLUDE = /usr/include/nspr4
|
||||
diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix18 ./esc/src/app/xpcom/tray/rhTray.h
|
||||
--- ./esc/src/app/xpcom/tray/rhTray.h.fix18 2014-04-17 11:04:33.578085948 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/rhTray.h 2014-04-17 11:05:10.798620628 -0700
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#ifndef RH_TRAY_H
|
||||
#define RH_TRAY_H
|
||||
-
|
||||
+#include <mozilla/Char16.h>
|
||||
#include "rhITray.h"
|
||||
//#include "nsIGenericFactory.h"
|
||||
//#include mozilla/ModuleUtils.h
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix18 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix18 2014-04-17 15:35:13.854054559 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2014-04-17 15:35:45.278661698 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-19
|
||||
+Version=1.1.0-23
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001019
|
||||
+BuildID=0000001023
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
@@ -47,6 +47,6 @@ MinVersion=6.0.0
|
||||
; application requires. It should be specified if your application uses
|
||||
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
-MaxVersion=22.0.0
|
||||
+MaxVersion=50.0.0
|
||||
|
||||
[Shell]
|
@ -1,79 +0,0 @@
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix19 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix19 2014-04-23 14:42:02.644058331 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2014-04-23 14:42:22.990803962 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-23
|
||||
+Version=1.1.0-24
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001023
|
||||
+BuildID=0000001024
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
diff -up ./esc/src/lib/NssHttpClient/Util.cpp.fix19 ./esc/src/lib/NssHttpClient/Util.cpp
|
||||
--- ./esc/src/lib/NssHttpClient/Util.cpp.fix19 2014-04-23 14:40:14.001416551 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/Util.cpp 2014-04-23 14:41:19.864593148 -0700
|
||||
@@ -49,3 +49,26 @@ NSAPI_PUBLIC int Util::ascii2numeric (ch
|
||||
}
|
||||
return num;
|
||||
}
|
||||
+
|
||||
+// Remove stray trailing CRLF chars, replace with provided char.
|
||||
+NSAPI_PUBLIC void Util::stripTrailingCRLF(char *buff, char replaceWith)
|
||||
+{
|
||||
+ if(buff == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ if(replaceWith == 0)
|
||||
+ return;
|
||||
+
|
||||
+ int buffLen = strlen(buff);
|
||||
+
|
||||
+ if(buffLen == 0)
|
||||
+ return;
|
||||
+
|
||||
+ int buffLenMinusOne = buffLen - 1;
|
||||
+
|
||||
+ for(int i = buffLenMinusOne; i >= 0; i--) {
|
||||
+ if(buff[i] == 0x0d || buff[i] == 0x0a) {
|
||||
+ buff[i] = replaceWith;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff -up ./esc/src/lib/NssHttpClient/Util.h.fix19 ./esc/src/lib/NssHttpClient/Util.h
|
||||
--- ./esc/src/lib/NssHttpClient/Util.h.fix19 2014-04-23 14:40:20.020341304 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/Util.h 2014-04-23 14:41:30.120464932 -0700
|
||||
@@ -34,6 +34,7 @@ class Util
|
||||
~Util();
|
||||
public:
|
||||
NSAPI_PUBLIC static int ascii2numeric(char ch);
|
||||
+ NSAPI_PUBLIC static void stripTrailingCRLF(char *buff, char replaceWith);
|
||||
/* static char *Buffer2String (Buffer &data);
|
||||
static Buffer *Str2Buf (const char *s);
|
||||
static char *URLEncode (Buffer &data);
|
||||
diff -up ./esc/src/lib/NssHttpClient/request.cpp.fix19 ./esc/src/lib/NssHttpClient/request.cpp
|
||||
--- ./esc/src/lib/NssHttpClient/request.cpp.fix19 2014-04-23 14:40:27.207251455 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/request.cpp 2014-04-23 14:41:38.935354731 -0700
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "engine.h"
|
||||
#include <prlog.h>
|
||||
#include <time.h>
|
||||
+#include "Util.h"
|
||||
PRLogModuleInfo *httpLog = PR_NewLogModule("coolKeyHttpReq");
|
||||
|
||||
/**
|
||||
@@ -283,6 +284,9 @@ PRBool PSHttpRequest::send( PRFileDesc *
|
||||
if (strlen(_proxy_uri))
|
||||
path = _proxy_uri;
|
||||
|
||||
+ //check for and replace stray line feed chars in path only.
|
||||
+ Util::stripTrailingCRLF(path,' ');
|
||||
+
|
||||
data = PR_smprintf( "%s %s %s\r\n", _method, path,
|
||||
HttpProtocolToString(_proto) );
|
||||
|
@ -1,51 +0,0 @@
|
||||
--- ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix2 2009-04-18 13:19:20.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp 2009-04-18 13:20:23.000000000 -0700
|
||||
@@ -104,12 +104,16 @@
|
||||
char tBuff[56];
|
||||
PK11SlotInfo *slot;
|
||||
|
||||
+ #ifdef LINUX
|
||||
+ sleep(3);
|
||||
+ #endif
|
||||
+
|
||||
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
("%s SmartCardMonitoringThread::Execute.\n",GetTStamp(tBuff,56)));
|
||||
//
|
||||
// populate token names for already inserted tokens.
|
||||
//
|
||||
- PK11SlotList *sl =
|
||||
+ /* PK11SlotList *sl =
|
||||
PK11_FindSlotsByNames(mModule->dllName, NULL, NULL, PR_TRUE);
|
||||
PK11SlotListElement *sle;
|
||||
|
||||
@@ -123,6 +127,8 @@
|
||||
PK11_FreeSlotList(sl);
|
||||
}
|
||||
|
||||
+ */
|
||||
+
|
||||
// loop starts..
|
||||
do {
|
||||
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/GenericAuth.xul.fix2 2009-04-18 13:21:34.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/GenericAuth.xul 2009-04-18 13:21:47.000000000 -0700
|
||||
@@ -24,7 +24,7 @@
|
||||
id="esc-window"
|
||||
title="&genericAuthTitle;"
|
||||
width="400"
|
||||
- height="225"
|
||||
+ height="240"
|
||||
onload="UiLoad();"
|
||||
onunload="UiUnload();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix2 2009-04-18 13:20:51.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2009-04-18 13:21:02.000000000 -0700
|
||||
@@ -25,7 +25,7 @@
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-1
|
||||
+Version=1.1.0-3
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
@ -1,396 +0,0 @@
|
||||
diff -up ./esc/src/app/xpcom/Makefile.sdk.fix20 ./esc/src/app/xpcom/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/Makefile.sdk.fix20 2015-04-07 17:29:25.406955513 -0700
|
||||
+++ ./esc/src/app/xpcom/Makefile.sdk 2015-04-07 18:32:07.330144841 -0700
|
||||
@@ -195,13 +195,13 @@ all:: export libs
|
||||
|
||||
libs::
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhIKeyNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/header.py --cachedir /tmp -o rhIKeyNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhIKeyNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir /tmp -o rhIKeyNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhICoolKey.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/header.py --cachedir /tmp -o rhICoolKey.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhICoolKey.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir /tmp -o rhICoolKey.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
$(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES)
|
||||
@@ -257,7 +257,7 @@ $(DEPLOY_OBJDIR):
|
||||
mkdir $(DEPLOY_OBJDIR)
|
||||
|
||||
cd $(CORE_DEPTH)/$(DEPLOY_OFFSET)/app/xul/esc; zip -r test.zip * -x *\CVS\* \*.fix*; unzip -d esc test.zip ; rm -f test.zip
|
||||
- $(XUL_FRAMEWORK_BIN_PATH)/$(XULRUNNER_EXEC) --install-app $(CORE_DEPTH)$(DEPLOY_OFFSET)/app/xul/esc/esc $(DEPLOY_OBJDIR)
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/install_app.py $(CORE_DEPTH)$(DEPLOY_OFFSET)/app/xul/esc/esc $(DEPLOY_OBJDIR)/esc --appName esc
|
||||
|
||||
ifeq ($(OS_ARCH), Darwin)
|
||||
mkdir $(DEPLOY_OBJDIR)/$(XULRUNNER_FRAME_BASE)
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix20 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix20 2015-04-07 17:31:15.166792191 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2015-04-07 18:24:16.454130223 -0700
|
||||
@@ -106,21 +106,23 @@ class CoolKeyShutdownObserver : public n
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
- ~CoolKeyShutdownObserver();
|
||||
+ private:
|
||||
+ ~CoolKeyShutdownObserver();
|
||||
};
|
||||
|
||||
- NS_IMPL_ISUPPORTS1(CoolKeyShutdownObserver, nsIObserver)
|
||||
+ NS_IMPL_ISUPPORTS(CoolKeyShutdownObserver, nsIObserver)
|
||||
|
||||
CoolKeyShutdownObserver::~CoolKeyShutdownObserver()
|
||||
{
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyShutdownObserver::~CoolKeyShutdownObserver \n",GetTStamp(tBuff,56)));
|
||||
}
|
||||
-
|
||||
+
|
||||
+
|
||||
NS_IMETHODIMP
|
||||
CoolKeyShutdownObserver::Observe(nsISupports *aSubject,
|
||||
const char *aTopic,
|
||||
- const PRUnichar *someData)
|
||||
+ const char16_t *someData)
|
||||
{
|
||||
char tBuff[56];
|
||||
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
|
||||
@@ -1793,5 +1795,5 @@ static const mozilla::Module kCoolKeyMod
|
||||
NSMODULE_DEFN(rhCoolKeyModule) = &kCoolKeyModule;
|
||||
//
|
||||
|
||||
-NS_IMPL_ISUPPORTS1(rhCoolKey,rhICoolKey)
|
||||
+NS_IMPL_ISUPPORTS(rhCoolKey,rhICoolKey)
|
||||
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix20 ./esc/src/app/xpcom/rhCoolKey.h
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.h.fix20 2015-04-07 18:03:46.544134629 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.h 2015-04-07 18:25:33.828309642 -0700
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
rhCoolKey();
|
||||
|
||||
void ShutDownInstance();
|
||||
+private:
|
||||
~rhCoolKey();
|
||||
private:
|
||||
static HRESULT Dispatch( rhICoolKey *listener,
|
||||
diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix20 ./esc/src/app/xpcom/tray/Makefile.sdk
|
||||
--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix20 2015-04-02 15:09:32.327346359 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2015-04-02 15:12:17.987617741 -0700
|
||||
@@ -230,13 +230,13 @@ all:: export libs
|
||||
libs::
|
||||
echo "PPC_BUILD $(PPC_BUILD)"
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITray.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/header.py --cachedir=/tmp -o rhITray.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITray.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir=/tmp -o rhITray.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITrayWindNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)//header.py --cachedir=/tmp -o rhITrayWindNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl
|
||||
|
||||
- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITrayWindNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl
|
||||
+ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir=/tmp -o rhITrayWindNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
$(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES)
|
||||
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix20 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix20 2015-04-07 16:15:16.840118695 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2015-04-07 16:15:39.047883270 -0700
|
||||
@@ -898,5 +898,5 @@ static const mozilla::Module kCoolKeyTra
|
||||
// shared library.
|
||||
NSMODULE_DEFN(rhCoolKeyTrayModule) = &kCoolKeyTrayModule;
|
||||
|
||||
-NS_IMPL_ISUPPORTS1(rhTray,rhITray)
|
||||
+NS_IMPL_ISUPPORTS(rhTray,rhITray)
|
||||
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix20 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix20 2015-04-09 17:58:37.203518142 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2015-04-09 18:00:19.302492123 -0700
|
||||
@@ -57,6 +57,7 @@ const ESC_SECURITY_URL="esc.security.ur
|
||||
const ESC_SECURE_URL="esc.secure.url";
|
||||
const ESC_GLOBAL_PHONE_HOME_URL= "esc.global.phone.home.url";
|
||||
const ESC_HIDE_FORMAT="esc.hide.format";
|
||||
+const ESC_ALLOW_NOTIFICATIONS="esc.allow.notifications";
|
||||
|
||||
const CLEAN_TOKEN = "cleanToken";
|
||||
const UNINITIALIZED = 1;
|
||||
@@ -76,6 +77,7 @@ const ENROLL_WINDOW = "esc.xul";
|
||||
const ADMIN_WINDOW = "settings.xul";
|
||||
const HIDDEN_WINDOW = "hiddenWindow.xul";
|
||||
const SECURITY_WINDOW = "security.xul";
|
||||
+const PHONE_WINDOW = "config.xul";
|
||||
|
||||
|
||||
//Log level constants
|
||||
@@ -230,10 +232,14 @@ var Status_Messages = new Array(
|
||||
function DoPhoneHome(keyType,keyID)
|
||||
{
|
||||
CoolKeyLogMsg(PR_LOG_ALWAYS,"Attempting to phone home for Key " + keyID);
|
||||
+ var allowNotify = null;
|
||||
var callback = function (aResult) {
|
||||
|
||||
recordMessage("In DoPhoneHome callback");
|
||||
|
||||
+ var allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS);
|
||||
+
|
||||
+
|
||||
var issuer = "";
|
||||
if(aResult == true)
|
||||
{
|
||||
@@ -241,7 +247,10 @@ function DoPhoneHome(keyType,keyID)
|
||||
if(!issuer)
|
||||
issuer = getBundleString("unknownIssuer");
|
||||
recordMessage("In DoPhoneHome callback success issuer " + issuer);
|
||||
- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+
|
||||
+ if(allowNotify == "yes") {
|
||||
+ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ }
|
||||
LogKeyInfo(keyType,keyID,"Key Inserted ...");
|
||||
UpdateRowWithPhoneHomeData(keyType,keyID);
|
||||
recordMessage("cached issuer " + issuer);
|
||||
@@ -262,7 +271,9 @@ function DoPhoneHome(keyType,keyID)
|
||||
if(!issuer)
|
||||
issuer = getBundleString("unknownIssuer");
|
||||
recordMessage("Phone home callback failed , issuer " + issuer);
|
||||
- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ if (allowNotify == "yes") {
|
||||
+ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ }
|
||||
LogKeyInfo(keyType,keyID,"Key Inserted ...");
|
||||
}
|
||||
}
|
||||
@@ -271,6 +282,7 @@ function DoPhoneHome(keyType,keyID)
|
||||
|
||||
var home = DoCoolKeyGetIssuerUrl(keyType,keyID);
|
||||
|
||||
+ //home = null;
|
||||
recordMessage("Returned IssuerURL " + home);
|
||||
|
||||
if(IsPhoneHomeCached(keyID) && home)
|
||||
@@ -279,7 +291,12 @@ function DoPhoneHome(keyType,keyID)
|
||||
|
||||
recordMessage("Phone home info cached...");
|
||||
issuer = GetCoolKeyIssuer(keyType,keyID);
|
||||
- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+
|
||||
+ allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS);
|
||||
+ if (allowNotify == "yes") {
|
||||
+ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ }
|
||||
+
|
||||
LogKeyInfo(keyType,keyID,"Key Inserted ...");
|
||||
|
||||
var launchBrowserURL = GetCachedEnrolledTokenBrowserURL(keyID);
|
||||
@@ -534,7 +551,11 @@ function GetAuthDataFromPopUp(aKeyType,a
|
||||
keyUITable[aKeyID] = aUiData;
|
||||
keyTypeTable[aKeyID] = aKeyType;
|
||||
|
||||
- var child = window.open("chrome://esc/content/GenericAuth.xul", aKeyID, "chrome,centerscreen,width=400,height=250");
|
||||
+ var child = window.open("chrome://esc/content/GenericAuth.xul", aKeyID, "chrome,centerscreen,width=400,height=250,dialog");
|
||||
+
|
||||
+ if (child) {
|
||||
+ child.setTimeout("focus()", 1000);
|
||||
+ }
|
||||
|
||||
curChildWindow = child;
|
||||
}
|
||||
@@ -1275,7 +1296,7 @@ function UpdateEnrollmentArea(keyType,ke
|
||||
|
||||
var numUnenrolledKeys = DoGetNumUnenrolledCoolKeys();
|
||||
|
||||
- //alert("inserted " + inserted + " showFulUI " + showFullUI + " showExternalUI " + showExternalUI + " already enrolled " + alreadyEnrolled + " numUnenrolledKeys " + numUnenrolledKeys);
|
||||
+ // alert("inserted " + inserted + " showFulUI " + showFullUI + " showExternalUI " + showExternalUI + " already enrolled " + alreadyEnrolled + " numUnenrolledKeys " + numUnenrolledKeys);
|
||||
|
||||
|
||||
var ui_id = document.getElementById("esc-ui");
|
||||
@@ -1290,7 +1311,7 @@ function UpdateEnrollmentArea(keyType,ke
|
||||
{
|
||||
if(!numUnenrolledKeys)
|
||||
{
|
||||
- ui_id.setAttribute("src",null);
|
||||
+ ui_id.setAttribute("src","");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1427,14 +1448,19 @@ function UpdateEnrollmentArea(keyType,ke
|
||||
HideItem(no_key_area);
|
||||
}
|
||||
|
||||
+
|
||||
if(!alreadyEnrolled && inserted && showExternalUI)
|
||||
{
|
||||
UpdateESCSize();
|
||||
+ gEnrollmentPage.setTimeout("focus();",3500);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!showExternalUI)
|
||||
UpdateESCSize();
|
||||
+
|
||||
+ gEnrollmentPage.setTimeout("focus();",3500);
|
||||
+
|
||||
}
|
||||
|
||||
//Evaulate Password Quality
|
||||
@@ -2006,7 +2032,7 @@ function SelectESCPage(keyType,keyID,pho
|
||||
break;
|
||||
}
|
||||
|
||||
- //alert("SelectESCPage initialized " + keyUninitialized + " gEnrollmentPage " + gEnrollmentPage + " gFactoryMode " + gFactoryMode + " gHiddenPage " + gHiddenPage);
|
||||
+ //alert("SelectESCPage uninitialized " + keyUninitialized + " gEnrollmentPage " + gEnrollmentPage + " gFactoryMode " + gFactoryMode + " gHiddenPage " + gHiddenPage + " phoneHomeFailed " + phoneHomeFailed + " no_launch_external_ui " + no_launch_external_ui);
|
||||
|
||||
//Get the primary page windows if present
|
||||
|
||||
@@ -2022,14 +2048,7 @@ function SelectESCPage(keyType,keyID,pho
|
||||
|
||||
if(keyUninitialized == UNINITIALIZED && !phoneHomeFailed && !no_launch_external_ui ) //formatted uninitialized card
|
||||
{
|
||||
- if(enrollWnd) //Enrollment window is already up
|
||||
- {
|
||||
- enrollWnd.focus();
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- launchESC();
|
||||
- }
|
||||
+ launchESC();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2975,8 +2994,9 @@ function OnCoolKeyInserted(keyType, keyI
|
||||
|
||||
var uninitialized = 0;
|
||||
|
||||
- recordMessage("Key inserted!" + "Window " + IdentifyWindow());
|
||||
+ var allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS);
|
||||
|
||||
+ recordMessage("Key inserted!" + "Window " + IdentifyWindow());
|
||||
if(gHiddenPage)
|
||||
{
|
||||
TrayShowNotificationIcon();
|
||||
@@ -2993,6 +3013,7 @@ function OnCoolKeyInserted(keyType, keyI
|
||||
|
||||
gCurrentSelectedRow = row;
|
||||
UpdateEnrollmentArea(keyType,keyID,1);
|
||||
+
|
||||
}
|
||||
|
||||
if(gAdminPage)
|
||||
@@ -3017,7 +3038,9 @@ function OnCoolKeyInserted(keyType, keyI
|
||||
if(!issuer )
|
||||
issuer = getBundleString("unknownIssuer");
|
||||
|
||||
- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ if( allowNotify) {
|
||||
+ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
@@ -3037,6 +3060,8 @@ function OnCoolKeyRemoved(keyType, keyID
|
||||
|
||||
var row = GetRowForKey(keyType, keyID);
|
||||
|
||||
+ var allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS);
|
||||
+
|
||||
if(gHiddenPage)
|
||||
{
|
||||
if(curChildWindow)
|
||||
@@ -3047,7 +3072,9 @@ function OnCoolKeyRemoved(keyType, keyID
|
||||
var issuer = GetCoolKeyIssuer(keyType,keyID);
|
||||
if(!issuer)
|
||||
issuer = getBundleString("unknownIssuer");
|
||||
- TraySendNotificationMessage(getBundleString("keyRemoved"),"\"" + issuer + "\"" + " " + getBundleString("keyRemovedComputer"),1,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ if (allowNotify == "yes") {
|
||||
+ TraySendNotificationMessage(getBundleString("keyRemoved"),"\"" + issuer + "\"" + " " + getBundleString("keyRemovedComputer"),1,4000,GetESCNotifyIconPath(keyType,keyID));
|
||||
+ }
|
||||
LogKeyInfo(keyType,keyID, "Key Removed ...");
|
||||
|
||||
}
|
||||
@@ -3345,6 +3372,7 @@ uiListener =
|
||||
|
||||
if(url != esc_enroll_uri)
|
||||
{
|
||||
+
|
||||
MyAlert(getBundleString("errorEnrollmentUI"));
|
||||
|
||||
if(uiListener)
|
||||
@@ -3978,17 +4006,24 @@ function launchCONFIG(keyType,keyID)
|
||||
platform = "mac";
|
||||
}
|
||||
|
||||
- var wind = null;
|
||||
+ var wind = IsPageWindowPresent(PHONE_WINDOW);
|
||||
|
||||
- if(platform == "mac")
|
||||
- {
|
||||
- wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable,modal=no");
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable,modal=yes");
|
||||
+ if (!wind) {
|
||||
+ if(platform == "mac")
|
||||
+ {
|
||||
+ wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable,modal=no");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable");
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ if(wind) {
|
||||
+ wind.setTimeout("focus();",1500);
|
||||
}
|
||||
+
|
||||
}
|
||||
|
||||
//Launch cert viewer if key has certs
|
||||
@@ -4021,7 +4056,7 @@ function launchCertViewerIfCerts()
|
||||
//Launch page to view card's certificates
|
||||
function launchCertViewer()
|
||||
{
|
||||
- var wind = window.openDialog("chrome://esc/content/certManager.xul", "","chrome,centerscreen,modal=yes");
|
||||
+ var wind = window.openDialog("chrome://pippki/content/certManager.xul", "","chrome,centerscreen,modal=yes");
|
||||
}
|
||||
|
||||
//Launch ESC admin page window
|
||||
@@ -4046,12 +4081,12 @@ function launchESC()
|
||||
|
||||
if(!enrollWnd)
|
||||
{
|
||||
- var wind = window.open("chrome://esc/content/esc.xul","","chrome,resizable,centerscreen,dialog");
|
||||
+ enrollWnd = window.open("chrome://esc/content/esc.xul","","chrome,resizable,centerscreen,dialog");
|
||||
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- enrollWnd.focus();
|
||||
+
|
||||
+ if(enrollWnd) {
|
||||
+ enrollWnd.setTimeout("focus();",1500);
|
||||
}
|
||||
|
||||
}
|
||||
diff -up ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js.fix20 ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js
|
||||
--- ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js.fix20 2015-04-09 18:01:00.074082399 -0700
|
||||
+++ ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js 2015-04-09 18:03:45.160423403 -0700
|
||||
@@ -29,6 +29,10 @@ pref("esc.tps.message.timeout","90");
|
||||
|
||||
pref("esc.windows.do.capi","yes");
|
||||
|
||||
+#Do we allow card notifications? Default no.
|
||||
+
|
||||
+pref("esc.allow.notifications", "yes");
|
||||
+
|
||||
|
||||
#Sample Security Officer Enrollment UI
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix21 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix21 2016-02-08 14:21:39.963531067 -0800
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2016-02-08 14:22:04.811322599 -0800
|
||||
@@ -1237,7 +1237,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertN
|
||||
char **array = NULL;
|
||||
int num = nicknames.size();
|
||||
|
||||
- array = (char **) nsMemory::Alloc((sizeof(char *) *num));
|
||||
+ array = (char **) NS_Alloc((sizeof(char *) *num));
|
||||
|
||||
if(!array)
|
||||
{
|
||||
@@ -1291,7 +1291,7 @@ NS_IMETHODIMP rhCoolKey::GetAvailableCoo
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
- array = (char **) nsMemory::Alloc((sizeof(char *) * numKeys));
|
||||
+ array = (char **) NS_Alloc((sizeof(char *) * numKeys));
|
||||
|
||||
if(!array)
|
||||
{
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
--- ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties.fix3 2009-04-22 17:44:14.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties 2009-04-22 17:46:41.000000000 -0700
|
||||
@@ -104,7 +104,7 @@
|
||||
errorInvalidTokenTypeParams=The Smart Card Server cannot process the requested type of enrollment due to a misconfiguration.
|
||||
errorCannotPublish=The Smart Card Server cannot publish your card's certificates to the certificate directory.
|
||||
errorCommTokenDB=The Smart Card Server cannot connect to its internal database.
|
||||
-errorTokenSuspended=Your smart card has been suspended.
|
||||
+errorTokenSuspended=You are not allowed to perform this operation with this smart card.
|
||||
errorPinResetable=You are not allowed to reset the password of this smart card.
|
||||
errorConnLost=The Smart Card Manager has lost the connection to the Smart Card Server.
|
||||
errorEntryTokenDB=The Smart Card Server cannot add your smart card to its internal database.
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix3 2009-04-22 17:38:49.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2009-04-22 17:39:14.000000000 -0700
|
||||
@@ -25,7 +25,7 @@
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-3
|
||||
+Version=1.1.0-5
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
@ -1,22 +0,0 @@
|
||||
--- ./esc/src/lib/coolkey/manifest.mn.fix4 2009-04-23 14:13:21.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/manifest.mn 2009-04-23 14:15:00.000000000 -0700
|
||||
@@ -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 -I$(GECKO_SDK_PATH)/include/nspr -I$(GECKO_SDK_PATH)/include/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 -I$(GECKO_SDK_PATH)/include/nspr -I$(GECKO_SDK_PATH)/include/nss -fno-strict-aliasing
|
||||
MAPFILE = $(OBJDIR)/ckymanager.def
|
||||
|
||||
#EXTRA_LIBS += -L$(DIST)/lib -lckyapplet
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix4 2009-04-23 14:12:52.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2009-04-23 14:13:01.000000000 -0700
|
||||
@@ -25,7 +25,7 @@
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-5
|
||||
+Version=1.1.0-6
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
@ -1,218 +0,0 @@
|
||||
--- ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix5 2009-06-08 14:14:44.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp 2009-06-08 14:15:03.000000000 -0700
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
/* if we think we have a token, but it's not the right one, or it's
|
||||
* not there, then send a removal event */
|
||||
- if (info && (!isPresent || (info->mSeries != PK11_GetSlotSeries(slot))) ) {
|
||||
+ if (info && !isPresent) {
|
||||
|
||||
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
|
||||
("%s SmartCardMonitoringThread::Execute Token Removed : \n",GetTStamp(tBuff,56)));
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/certManager.xul.fix5 2009-06-08 13:46:19.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/certManager.xul 2009-06-08 13:46:33.000000000 -0700
|
||||
@@ -59,7 +59,6 @@
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://pippki/content/pippki.js"/>
|
||||
<script type="application/x-javascript" src="chrome://pippki/content/certManager.js"/>
|
||||
- <script type="application/x-javascript" src="escCertManager.js"/>
|
||||
|
||||
<vbox flex="1">
|
||||
<tabbox id="certmanagertabs" flex="1" style="margin:5px">
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/password.xul.fix5 2009-06-08 14:04:16.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/password.xul 2009-06-08 14:04:29.000000000 -0700
|
||||
@@ -23,7 +23,6 @@
|
||||
id="esc-window"
|
||||
title="&getESCPassword;"
|
||||
onload="PasswordLoad();"
|
||||
- onunload="cleanup();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix5 2009-06-08 14:02:26.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2009-06-08 14:03:46.000000000 -0700
|
||||
@@ -522,7 +522,10 @@
|
||||
if(!string_id || !gStringBundle)
|
||||
return null;
|
||||
|
||||
- str = gStringBundle.getString(string_id);
|
||||
+ try {
|
||||
+ str = gStringBundle.getString(string_id);
|
||||
+ } catch(e) {
|
||||
+ }
|
||||
|
||||
return str;
|
||||
}
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix5 2009-06-08 13:44:59.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2009-06-08 13:45:15.000000000 -0700
|
||||
@@ -25,7 +25,7 @@
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-6
|
||||
+Version=1.1.0-7
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
--- ./esc/win32/setup.iss.fix5 2009-06-08 14:16:04.000000000 -0700
|
||||
+++ ./esc/win32/setup.iss 2009-06-08 14:16:26.000000000 -0700
|
||||
@@ -4,43 +4,31 @@
|
||||
[Setup]
|
||||
AppName=Smart Card Manager
|
||||
AppMutex=ESCMutex
|
||||
-AppVerName=Smart Card Manager 1.1.0-3
|
||||
-AppPublisher=Red Hat, Inc.
|
||||
+AppVerName=Smart Card Manager 1.1.0-6
|
||||
+AppPublisher=Fedora
|
||||
CreateAppDir=true
|
||||
Compression=lzma
|
||||
SolidCompression=true
|
||||
MinVersion=0,5.0.2195
|
||||
ShowLanguageDialog=yes
|
||||
-OutputBaseFilename=SmartCardManagerSetup-1.1.0-3.win32.i386
|
||||
-DefaultDirName={pf}\Red Hat\ESC
|
||||
+OutputBaseFilename=SmartCardManagerSetup-1.1.0-6.win32.i386
|
||||
+DefaultDirName={pf}\Fedora\ESC
|
||||
DisableProgramGroupPage=false
|
||||
-DefaultGroupName=Red Hat
|
||||
+DefaultGroupName=Fedora
|
||||
SetupIconFile=BUILD\ESC\components\esc.ico
|
||||
UninstallDisplayIcon={app}\components\esc.ico
|
||||
-WizardImageFile=BUILD\ESC\chrome\content\esc\esc-image-large.bmp
|
||||
+;WizardImageFile=BUILD\ESC\chrome\content\esc\esc-image-large.bmp
|
||||
+WizardImageFile=esc-image-large.bmp
|
||||
WizardSmallImageFile=BUILD\ESC\components\esc.bmp
|
||||
AllowNoIcons=yes
|
||||
LicenseFile=esc-license.txt
|
||||
InfoBeforeFile=info-before.txt
|
||||
InfoAfterFile=info-after.txt
|
||||
PrivilegesRequired=admin
|
||||
-VersionInfoVersion=1.1.0.3
|
||||
+VersionInfoVersion=1.1.0.6
|
||||
|
||||
|
||||
[Files]
|
||||
-Source: BUILD\egate\slbmgpg.dll; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egate.cat; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egate.inf; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egate.sys; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egate_License.txt; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egatebus.cat; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egatebus.inf; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egatebus.sys; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egaterdr.cat; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egaterdr.inf; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egaterdr.sys; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\egdrvins1.dll; DestDir: {win}\egate2.4; Flags: uninsneveruninstall
|
||||
-Source: BUILD\egate\eginstall.exe; DestDir: {win}\egate2.4; Flags: ignoreversion
|
||||
Source: BUILD\clkcsp.dll; DestDir: {sys}; Flags: regserver restartreplace
|
||||
Source: BUILD\cspres.dll; DestDir: {sys}; Flags: restartreplace
|
||||
Source: BUILD\pk11install.exe; DestDir: {app}\PKCS11
|
||||
@@ -73,7 +61,6 @@
|
||||
Source: BUILD\ESC\application.ini; DestDir: {app}
|
||||
Source: BUILD\ESC\chrome\chrome.manifest; DestDir: {app}\chrome
|
||||
Source: BUILD\ESC\chrome\content\esc\TRAY.js; DestDir: {app}\chrome\content\esc
|
||||
-Source: BUILD\ESC\chrome\content\esc\CertInfo.js; DestDir: {app}\chrome\content\esc
|
||||
;Source: BUILD\ESC\chrome\content\esc\certinfo.xul; DestDir: {app}\chrome\content\esc
|
||||
Source: BUILD\ESC\chrome\content\esc\config.xul; DestDir: {app}\chrome\content\esc
|
||||
Source: BUILD\ESC\chrome\content\esc\contents.rdf; DestDir: {app}\chrome\content\esc
|
||||
@@ -110,19 +97,18 @@
|
||||
Source: BUILD\ESC\xulrunner\mozctl.dll; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\mozctlx.dll; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\nspr4.dll; DestDir: {app}\xulrunner
|
||||
-Source: BUILD\ESC\xulrunner\nspr4.dll; DestDir: {app}\PKCS11
|
||||
+Source: BUILD\libnspr4.dll; DestDir: {app}\PKCS11
|
||||
Source: BUILD\ESC\xulrunner\nss3.dll; DestDir: {app}\xulrunner
|
||||
-Source: BUILD\ESC\xulrunner\nss3.dll; DestDir: {app}\PKCS11
|
||||
Source: BUILD\ESC\xulrunner\nssckbi.dll; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\plc4.dll; DestDir: {app}\xulrunner
|
||||
-Source: BUILD\ESC\xulrunner\plc4.dll; DestDir: {app}\PKCS11
|
||||
+Source: BUILD\libplc4.dll; DestDir: {app}\PKCS11
|
||||
Source: BUILD\ESC\xulrunner\plds4.dll; DestDir: {app}\xulrunner
|
||||
-Source: BUILD\ESC\xulrunner\plds4.dll; DestDir: {app}\PKCS11
|
||||
+Source: BUILD\libplds4.dll; DestDir: {app}\PKCS11
|
||||
Source: BUILD\ESC\xulrunner\README.txt; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\smime3.dll; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\softokn3.chk; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\softokn3.dll; DestDir: {app}\xulrunner
|
||||
-Source: BUILD\ESC\xulrunner\softokn3.dll; DestDir: {app}\PKCS11
|
||||
+Source: BUILD\softokn3.dll; DestDir: {app}\PKCS11
|
||||
Source: BUILD\ESC\xulrunner\ssl3.dll; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\updater.exe; DestDir: {app}\xulrunner
|
||||
Source: BUILD\ESC\xulrunner\xpcom.dll; DestDir: {app}\xulrunner
|
||||
@@ -413,9 +399,6 @@
|
||||
Source: BUILD\ESC\xulrunner\res\fonts\mathfontSTIXSize1.properties; DestDir: {app}\xulrunner\res\fonts
|
||||
Source: BUILD\ESC\xulrunner\res\html\folder.png; DestDir: {app}\xulrunner\res\html
|
||||
Source: BUILD\ESC\xulrunner\defaults\profile\localstore.rdf; DestDir: {app}\xulrunner\defaults\profile
|
||||
-Source: BUILD\ESC\xulrunner\sqlite3.dll; DestDir: {app}\PKCS11
|
||||
-Source: BUILD\ESC\xulrunner\mozcrt19.dll; DestDir: {app}\PKCS11
|
||||
-Source: BUILD\ESC\xulrunner\nssutil3.dll; DestDir: {app}\PKCS11
|
||||
Source: BUILD\ESC\xulrunner\dictionaries\en-US.aff; DestDir: {app}\dictionaries
|
||||
Source: BUILD\ESC\xulrunner\dictionaries\en-US.dic; DestDir: {app}\dictionaries
|
||||
Source: BUILD\ESC\xulrunner\modules\XPCOMUtils.jsm; DestDir: {app}\modules
|
||||
@@ -429,7 +412,6 @@
|
||||
|
||||
[Run]
|
||||
|
||||
-Filename: {win}\egate2.4\eginstall.exe; Parameters: -f -l eginstall.txt; WorkingDir: {win}\egate2.4; Flags: waituntilterminated; StatusMsg: Installing smart card drivers....
|
||||
Filename: {app}\PKCS11\pk11install.exe; Parameters: "-v ""name='CoolKey Module' library=coolkeypk11.dll NSS=""slotParams={{0x1=[slotFlags=PublicCerts]}"""""; WorkingDir: {sys}; StatusMsg: Configuring System for smart cards...
|
||||
Filename: {app}\xulrunner\xulrunner.exe; Parameters: """--register-global"""
|
||||
Filename: {app}\esc.exe; WorkingDir: {app}; StatusMsg: {code:GetEscStatusMsg}; Flags: nowait
|
||||
@@ -450,12 +432,18 @@
|
||||
Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Axalto Developer; ValueType: binary; ValueName: ATR; ValueData: 3b 75 94 00 00 62 02 02 00 00
|
||||
|
||||
; Now register the Gemalto 64K V2
|
||||
-Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Gemalto 64K V2; ValueType: binary; ValueName: ATRMask: ValueData: ff ff ff ff ff ff ff ff ff ff; Flags: uninsdeletekey
|
||||
+Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Gemalto 64K V2; ValueType: binary; ValueName: ATRMask; ValueData: ff ff 00 ff 00 ff ff ff 00 00; Flags: uninsdeletekey
|
||||
|
||||
-Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Gemalto 64 V2: ValueType: string; ValueName: Crypto Provider; ValueData: CoolKey PKCS #11 CSP
|
||||
+Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Gemalto 64K V2; ValueType: string; ValueName: Crypto Provider; ValueData: CoolKey PKCS #11 CSP
|
||||
|
||||
-Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Gemalto 64 V2: ValueType: binary; ValueName: ATR; ValueData: 3b 95 95 40 ff ae 01 03 00 00
|
||||
+Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Gemalto 64K V2; ValueType: binary; ValueName: ATR; ValueData: 3b 95 00 40 00 ae 01 03 00 00
|
||||
|
||||
+; Now register the Safenet 330J
|
||||
+Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Safenet 330J; ValueType: binary; ValueName: ATRMask; ValueData: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 00; Flags: uninsdeletekey
|
||||
+
|
||||
+Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Safenet 330J; ValueType: string; ValueName: Crypto Provider; ValueData: CoolKey PKCS #11 CSP
|
||||
+
|
||||
+Root: HKLM; Subkey: Software\Microsoft\Cryptography\Calais\SmartCards\Safenet 330J; ValueType: binary; ValueName: ATR; ValueData: 3b ec 00 ff 81 31 fe 45 a0 00 00 00 56 33 33 30 4a 33 06 00 00
|
||||
|
||||
Root: HKLM; Subkey: Software\
|
||||
; Turn off the "pick a cert" dialog box
|
||||
--- ./esc/win32/build.sh.fix5 2009-06-08 14:15:58.000000000 -0700
|
||||
+++ ./esc/win32/build.sh 2009-06-08 14:16:33.000000000 -0700
|
||||
@@ -37,6 +37,8 @@
|
||||
NSS_ARCHIVE=$NSS_NAME-with-nspr-4.6.4
|
||||
NSS_SOURCE_URL=https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_4_RTM/src/$NSS_ARCHIVE.tar.gz
|
||||
|
||||
+NSS_LIB_PATH=$NSS_NAME/mozilla/dist/WIN*/lib
|
||||
+
|
||||
#Inno installer values
|
||||
|
||||
#INNO_PATH="C:/Program Files/Inno Setup 5/ISCC.exe"
|
||||
@@ -76,7 +78,7 @@
|
||||
#ESC values
|
||||
|
||||
ESC_NAME=esc
|
||||
-ESC_VERSION_NO=1.1.0-3
|
||||
+ESC_VERSION_NO=1.1.0-6
|
||||
|
||||
|
||||
#Cygwin values
|
||||
@@ -462,6 +464,15 @@
|
||||
|
||||
cp esc-image-large.bmp BUILD/ESC/chrome/content/esc
|
||||
|
||||
+
|
||||
+ #Transport the nss files needed for pk11install.exe
|
||||
+
|
||||
+ cp $NSS_LIB_PATH/softokn3.dll BUILD
|
||||
+ cp $NSS_LIB_PATH/libplc4.dll BUILD
|
||||
+ cp $NSS_LIB_PATH/libnspr4.dll BUILD
|
||||
+ cp $NSS_LIB_PATH/libplds4.dll BUILD
|
||||
+
|
||||
+
|
||||
# Build the INNO executable installer
|
||||
|
||||
"$INNO_PATH" setup.iss
|
@ -1,884 +0,0 @@
|
||||
--- ./esc/src/lib/NssHttpClient/engine.h.fix6 2009-06-19 16:07:39.000000000 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/engine.h 2009-06-19 16:07:44.000000000 -0700
|
||||
@@ -22,9 +22,17 @@
|
||||
#include "response.h"
|
||||
#include "request.h"
|
||||
|
||||
+struct BadCertData {
|
||||
+ PRErrorCode error;
|
||||
+ PRInt32 port;
|
||||
+};
|
||||
+
|
||||
+typedef struct BadCertData BadCertData;
|
||||
+
|
||||
+
|
||||
class __EXPORT Engine {
|
||||
public:
|
||||
- Engine() {};
|
||||
+ Engine() { _certData = NULL; _sock=NULL;};
|
||||
~Engine() {};
|
||||
|
||||
PRFileDesc *_doConnect(PRNetAddr *addr, PRBool SSLOn = PR_FALSE,
|
||||
@@ -37,7 +45,8 @@
|
||||
static PRIntervalTime globaltimeout;
|
||||
|
||||
PRFileDesc *_sock;
|
||||
-
|
||||
+ BadCertData *_certData;
|
||||
+ BadCertData *getBadCertData() { return _certData;}
|
||||
PRFileDesc *getSocket() { return _sock;}
|
||||
|
||||
bool connectionClosed ;
|
||||
--- ./esc/src/lib/NssHttpClient/engine.cpp.fix6 2009-06-19 16:07:12.000000000 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/engine.cpp 2009-06-19 16:07:29.000000000 -0700
|
||||
@@ -16,6 +16,8 @@
|
||||
* All rights reserved.
|
||||
* END COPYRIGHT BLOCK **/
|
||||
|
||||
+#define FORCE_PR_LOG 1
|
||||
+
|
||||
#include <nspr.h>
|
||||
#include "sslproto.h"
|
||||
#include <prerror.h>
|
||||
@@ -27,7 +29,7 @@
|
||||
#include "certt.h"
|
||||
#include "sslerr.h"
|
||||
#include "secerr.h"
|
||||
-
|
||||
+#include "CoolKey.h"
|
||||
#include "engine.h"
|
||||
#include "http.h"
|
||||
|
||||
@@ -39,6 +41,9 @@
|
||||
int cipherCount = 0;
|
||||
int _doVerifyServerCert = 1;
|
||||
|
||||
+PRLogModuleInfo *httpEngineLog = PR_NewLogModule("coolKeyHttpEngine");
|
||||
+
|
||||
+
|
||||
PRIntervalTime Engine::globaltimeout = PR_TicksPerSecond()*30;
|
||||
|
||||
/**
|
||||
@@ -56,13 +61,26 @@
|
||||
SECStatus secStatus = SECFailure;
|
||||
PRErrorCode err;
|
||||
|
||||
+ char tBuff[56];
|
||||
+
|
||||
+ PR_LOG(httpEngineLog, PR_LOG_DEBUG,
|
||||
+ ("%s myBadCertHandler enter. \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
/* log invalid cert here */
|
||||
|
||||
if ( !arg ) {
|
||||
return secStatus;
|
||||
}
|
||||
|
||||
- *(PRErrorCode *)arg = err = PORT_GetError();
|
||||
+ err = PORT_GetError();
|
||||
+
|
||||
+ BadCertData *data = (BadCertData *) arg;
|
||||
+ if(data) {
|
||||
+ data->error = err;
|
||||
+ }
|
||||
+
|
||||
+ PR_LOG(httpEngineLog, PR_LOG_DEBUG,
|
||||
+ ("%s myBadCertHandler err: %d . \n",GetTStamp(tBuff,56),err));
|
||||
|
||||
/* If any of the cases in the switch are met, then we will proceed */
|
||||
/* with the processing of the request anyway. Otherwise, the default */
|
||||
@@ -91,6 +109,10 @@
|
||||
break;
|
||||
}
|
||||
|
||||
+ PR_LOG(httpEngineLog, PR_LOG_DEBUG,
|
||||
+ ("%s myBadCertHandler status: %d . \n",GetTStamp(tBuff,56),secStatus));
|
||||
+
|
||||
+
|
||||
return secStatus;
|
||||
}
|
||||
|
||||
@@ -416,7 +438,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
-
|
||||
void Engine::CloseConnection()
|
||||
{
|
||||
connectionClosed = true;
|
||||
@@ -426,7 +447,14 @@
|
||||
PR_Close(_sock);
|
||||
_sock = NULL;
|
||||
}
|
||||
+
|
||||
+ if(_certData)
|
||||
+ {
|
||||
+ delete _certData;
|
||||
+ _certData = NULL;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
/**
|
||||
* Returns a file descriptor for I/O if the HTTP connection is successful
|
||||
* @param addr PRnetAddr structure which points to the server to connect to
|
||||
@@ -442,21 +470,19 @@
|
||||
PRFileDesc *tcpsock = NULL;
|
||||
PRFileDesc *sock = NULL;
|
||||
connectionClosed = false;
|
||||
+ _certData = new BadCertData();
|
||||
|
||||
tcpsock = PR_OpenTCPSocket(addr->raw.family);
|
||||
-
|
||||
|
||||
if (!tcpsock) {
|
||||
-
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nodelay(tcpsock);
|
||||
|
||||
if (PR_TRUE == SSLOn) {
|
||||
- sock=SSL_ImportFD(NULL, tcpsock);
|
||||
-
|
||||
|
||||
+ sock=SSL_ImportFD(NULL, tcpsock);
|
||||
if (!sock) {
|
||||
//xxx log
|
||||
if( tcpsock != NULL ) {
|
||||
@@ -516,9 +542,23 @@
|
||||
|
||||
PRErrorCode errCode = 0;
|
||||
|
||||
- rv = SSL_BadCertHook( sock,
|
||||
+ if(_certData) {
|
||||
+ _certData->error = errCode;
|
||||
+ _certData->port = PR_ntohs(PR_NetAddrInetPort(addr));
|
||||
+ }
|
||||
+
|
||||
+ CoolKeyBadCertHandler overriddenHandler = CoolKeyGetBadCertHandler();
|
||||
+
|
||||
+ if(overriddenHandler) {
|
||||
+ rv = SSL_BadCertHook( sock,
|
||||
+ (SSLBadCertHandler)overriddenHandler,
|
||||
+ (void *)_certData);
|
||||
+ } else {
|
||||
+ rv = SSL_BadCertHook( sock,
|
||||
(SSLBadCertHandler)myBadCertHandler,
|
||||
- &errCode );
|
||||
+ (void *)_certData);
|
||||
+ }
|
||||
+
|
||||
rv = SSL_SetURL( sock, serverName );
|
||||
|
||||
if (rv != SECSuccess ) {
|
||||
@@ -536,8 +576,6 @@
|
||||
sock = tcpsock;
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
if ( PR_Connect(sock, addr, timeout) == PR_FAILURE ) {
|
||||
|
||||
if( sock != NULL ) {
|
||||
@@ -563,11 +601,17 @@
|
||||
const PSHttpServer& server,
|
||||
int timeout, PRBool expectChunked ,PRBool processStreamed) {
|
||||
PRNetAddr addr;
|
||||
- PRFileDesc *sock = NULL;
|
||||
PSHttpResponse *resp = NULL;
|
||||
|
||||
PRBool response_code = 0;
|
||||
|
||||
+ char tBuff[56];
|
||||
+
|
||||
+ PR_LOG(httpEngineLog, PR_LOG_DEBUG,
|
||||
+ ("%s HttpEngine::makeRequest enter. \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
+
|
||||
+
|
||||
server.getAddr(&addr);
|
||||
|
||||
char *nickName = request.getCertNickName();
|
||||
@@ -575,8 +619,17 @@
|
||||
char *serverName = (char *)server.getAddr();
|
||||
_sock = _doConnect( &addr, request.isSSL(), 0, 0,nickName, 0, serverName );
|
||||
|
||||
+ PR_LOG(httpEngineLog, PR_LOG_DEBUG,
|
||||
+ ("%s HttpEngine::makeRequest past doConnect sock: %p. \n",
|
||||
+ GetTStamp(tBuff,56),_sock));
|
||||
+
|
||||
if ( _sock != NULL) {
|
||||
PRBool status = request.send( _sock );
|
||||
+
|
||||
+ PR_LOG(httpEngineLog, PR_LOG_DEBUG,
|
||||
+ ("%s HttpEngine::makeRequest past request.send status: %d. \n",
|
||||
+ GetTStamp(tBuff,56),status));
|
||||
+
|
||||
if ( status ) {
|
||||
resp = new PSHttpResponse( _sock, &request, timeout, expectChunked ,this);
|
||||
response_code = resp->processResponse(processStreamed);
|
||||
--- ./esc/src/lib/NssHttpClient/manifest.mn.fix6 2009-06-19 16:08:05.000000000 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/manifest.mn 2009-06-19 16:08:13.000000000 -0700
|
||||
@@ -24,7 +24,7 @@
|
||||
MODULE = httpchunked
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
SHARED_NAME = $(MODULE)
|
||||
-REQUIRES = nss nspr
|
||||
+REQUIRES = nss nspr ckymanager
|
||||
ifndef MOZ_OFFSET
|
||||
MOZ_OFFSET = mozilla-1.7.13
|
||||
endif
|
||||
--- ./esc/src/lib/coolkey/NSSManager.h.fix6 2009-06-19 16:06:41.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/NSSManager.h 2009-06-19 16:06:47.000000000 -0700
|
||||
@@ -70,6 +70,8 @@
|
||||
|
||||
static HRESULT GetKeyCertNicknames( const CoolKey *aKey, vector<string> & aStrings );
|
||||
|
||||
+ static HRESULT GetKeyUID(const CoolKey *aKey, char *aBuf, int aBufLength);
|
||||
+
|
||||
static HRESULT GetKeyIssuedTo(const CoolKey *aKey, char *aBuf, int aBufLength);
|
||||
|
||||
static HRESULT GetKeyIssuer(const CoolKey *aKey, char *aBuf, int aBufLength);
|
||||
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix6 2009-06-19 16:02:43.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2009-06-19 16:03:03.000000000 -0700
|
||||
@@ -259,12 +259,14 @@
|
||||
static CoolKeyRelease g_Release = NULL;
|
||||
static CoolKeyGetConfigValue g_GetConfigValue = NULL;
|
||||
static CoolKeySetConfigValue g_SetConfigValue = NULL;
|
||||
+static CoolKeyBadCertHandler g_BadCertHandler = NULL;
|
||||
|
||||
char* CoolKeyVerifyPassword(PK11SlotInfo *,PRBool,void *);
|
||||
|
||||
COOLKEY_API HRESULT CoolKeySetCallbacks(CoolKeyDispatch dispatch,
|
||||
CoolKeyReference reference, CoolKeyRelease release,
|
||||
- CoolKeyGetConfigValue getconfigvalue,CoolKeySetConfigValue setconfigvalue)
|
||||
+ CoolKeyGetConfigValue getconfigvalue,CoolKeySetConfigValue setconfigvalue,
|
||||
+ CoolKeyBadCertHandler badcerthandler)
|
||||
{
|
||||
char tBuff[56];
|
||||
g_Dispatch = dispatch;
|
||||
@@ -272,6 +274,7 @@
|
||||
g_Release = release;
|
||||
g_GetConfigValue = getconfigvalue;
|
||||
g_SetConfigValue = setconfigvalue;
|
||||
+ g_BadCertHandler = badcerthandler;
|
||||
|
||||
char * suppressPINPrompt =(char*) CoolKeyGetConfig("esc.security.url");
|
||||
|
||||
@@ -997,6 +1000,16 @@
|
||||
|
||||
return NSSManager::GetKeyPolicy(aKey, aBuf, aBufLen);
|
||||
}
|
||||
+
|
||||
+HRESULT
|
||||
+CoolKeyGetUID(const CoolKey *aKey, char *aBuf, int aBufLength)
|
||||
+{
|
||||
+ if (!aKey || !aKey->mKeyID || !aBuf || aBufLength < 1)
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ return NSSManager::GetKeyUID(aKey,aBuf,aBufLength);
|
||||
+}
|
||||
+
|
||||
HRESULT
|
||||
CoolKeyGetIssuedTo(const CoolKey *aKey, char *aBuf, int aBufLength)
|
||||
{
|
||||
@@ -1290,6 +1303,13 @@
|
||||
return aCUID;
|
||||
}
|
||||
|
||||
+CoolKeyBadCertHandler CoolKeyGetBadCertHandler()
|
||||
+{
|
||||
+ if(g_BadCertHandler)
|
||||
+ return g_BadCertHandler;
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
const char *CoolKeyGetConfig(const char *aValue)
|
||||
{
|
||||
if(!g_GetConfigValue || ! aValue)
|
||||
--- ./esc/src/lib/coolkey/manifest.mn.fix6 2009-06-19 16:05:45.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/manifest.mn 2009-06-19 16:05:54.000000000 -0700
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
XULRUNNER_BASE=$(CORE_DEPTH)/dist/$(OBJDIR)//xulrunner_build
|
||||
|
||||
-
|
||||
SYS_INC = /usr/include
|
||||
MODULE = ckymanager
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
@@ -41,7 +40,7 @@
|
||||
SmartCardMonitoringThread.cpp \
|
||||
$(NULL)
|
||||
|
||||
-EXPORTS = \
|
||||
+EXPORTS = \
|
||||
CoolKey.h \
|
||||
$(NULL)
|
||||
|
||||
--- ./esc/src/lib/coolkey/NSSManager.cpp.fix6 2009-06-19 16:06:19.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/NSSManager.cpp 2009-06-19 16:06:28.000000000 -0700
|
||||
@@ -369,7 +369,7 @@
|
||||
|
||||
aBuf[0]=0;
|
||||
|
||||
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuedTo \n",GetTStamp(tBuff,56)));
|
||||
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuer \n",GetTStamp(tBuff,56)));
|
||||
|
||||
if(!aKey )
|
||||
return E_FAIL;
|
||||
@@ -409,7 +409,7 @@
|
||||
continue;
|
||||
}
|
||||
orgID = CERT_GetOrgName(&cert->subject);
|
||||
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuedTo ourSlot %p curSlot %p org %s \n",GetTStamp(tBuff,56),slot,cert->slot,orgID));
|
||||
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuer ourSlot %p curSlot %p org %s \n",GetTStamp(tBuff,56),slot,cert->slot,orgID));
|
||||
|
||||
}
|
||||
|
||||
@@ -437,6 +437,85 @@
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+HRESULT NSSManager::GetKeyUID(const CoolKey *aKey, char *aBuf, int aBufLength)
|
||||
+{
|
||||
+ char tBuff[56];
|
||||
+ if(!aBuf)
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ aBuf[0]=0;
|
||||
+
|
||||
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyUID \n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
+ if(!aKey )
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
|
||||
+
|
||||
+ if (!slot)
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ CERTCertList *certs = PK11_ListCerts(PK11CertListAll,NULL);
|
||||
+
|
||||
+ if (!certs)
|
||||
+ {
|
||||
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%sNSSManager::GetKeyUID no certs found! \n",GetTStamp(tBuff,56)));
|
||||
+ PK11_FreeSlot(slot);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ CERTCertListNode *node= NULL;
|
||||
+
|
||||
+ char *certID = NULL;
|
||||
+
|
||||
+ for( node = CERT_LIST_HEAD(certs);
|
||||
+ ! CERT_LIST_END(node, certs);
|
||||
+ node = CERT_LIST_NEXT(node))
|
||||
+ {
|
||||
+ if(node->cert)
|
||||
+ {
|
||||
+ CERTCertificate *cert = node->cert;
|
||||
+
|
||||
+ if(cert)
|
||||
+ {
|
||||
+ if(cert->slot == slot)
|
||||
+ {
|
||||
+ if(IsCACert(cert))
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ certID = CERT_GetCertUid(&cert->subject);
|
||||
+
|
||||
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyUID ourSlot %p curSlot %p certID %s \n",GetTStamp(tBuff,56),slot,cert->slot,certID));
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ if(certID)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ if(certID && ((int)strlen(certID) < aBufLength))
|
||||
+ {
|
||||
+ strcpy(aBuf,certID);
|
||||
+ }
|
||||
+
|
||||
+ if(certs)
|
||||
+ CERT_DestroyCertList(certs);
|
||||
+
|
||||
+ if(slot)
|
||||
+ PK11_FreeSlot(slot);
|
||||
+
|
||||
+ if(certID)
|
||||
+ PORT_Free(certID);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
HRESULT NSSManager::GetKeyIssuedTo(const CoolKey *aKey, char *aBuf, int aBufLength)
|
||||
{
|
||||
char tBuff[56];
|
||||
@@ -487,6 +566,10 @@
|
||||
|
||||
certID = CERT_GetCommonName(&cert->subject);
|
||||
|
||||
+ if(!certID) {
|
||||
+ certID = CERT_GetCertUid(&cert->subject);
|
||||
+ }
|
||||
+
|
||||
PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuedTo ourSlot %p curSlot %p certID %s \n",GetTStamp(tBuff,56),slot,cert->slot,certID));
|
||||
|
||||
}
|
||||
--- ./esc/src/lib/coolkey/CoolKey.h.fix6 2009-06-19 16:04:59.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.h 2009-06-19 16:05:05.000000000 -0700
|
||||
@@ -26,6 +26,7 @@
|
||||
// platforms (coreconf will do the appropriate processing.
|
||||
#define COOLKEY_API
|
||||
|
||||
+#include "ssl.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
@@ -100,7 +101,7 @@
|
||||
|
||||
typedef HRESULT (*CoolKeySetConfigValue)(const char *name,const char *value);
|
||||
typedef const char * (*CoolKeyGetConfigValue)(const char *name);
|
||||
-
|
||||
+typedef SECStatus (*CoolKeyBadCertHandler)(void *arg, PRFileDesc *fd);
|
||||
|
||||
|
||||
extern "C" {
|
||||
@@ -112,7 +113,8 @@
|
||||
COOLKEY_API HRESULT CoolKeyUnregisterListener(CoolKeyListener* aListener);
|
||||
COOLKEY_API HRESULT CoolKeySetCallbacks(CoolKeyDispatch dispatch,
|
||||
CoolKeyReference reference, CoolKeyRelease release,
|
||||
- CoolKeyGetConfigValue getconfigvalue,CoolKeySetConfigValue setconfigvalue);
|
||||
+ CoolKeyGetConfigValue getconfigvalue,CoolKeySetConfigValue setconfigvalue,
|
||||
+ CoolKeyBadCertHandler badcerthandler=NULL);
|
||||
|
||||
COOLKEY_API bool CoolKeyRequiresAuthentication(const CoolKey *aKey);
|
||||
COOLKEY_API bool CoolKeyHasApplet(const CoolKey *aKey);
|
||||
@@ -133,6 +135,8 @@
|
||||
|
||||
COOLKEY_API HRESULT CoolKeyGetCertInfo(const CoolKey *aKey, char *aCertNickname, std::string & aCertInfo);
|
||||
|
||||
+COOLKEY_API HRESULT CoolKeyGetUID(const CoolKey *aKey, char *aBuf, int aBufLength);
|
||||
+
|
||||
COOLKEY_API HRESULT CoolKeyGetIssuedTo(const CoolKey *aKey, char *aBuf, int aBufLength);
|
||||
COOLKEY_API HRESULT CoolKeyGetIssuer(const CoolKey *aKey, char *aBuf, int aBufLength);
|
||||
|
||||
@@ -257,6 +261,9 @@
|
||||
|
||||
const char *CoolKeyGetConfig(const char *aName);
|
||||
HRESULT CoolKeySetConfig(const char *aName,const char *aValue);
|
||||
+CoolKeyBadCertHandler CoolKeyGetBadCertHandler();
|
||||
+
|
||||
+
|
||||
|
||||
}
|
||||
|
||||
--- ./esc/src/lib/coolkey/Makefile.fix6 2009-06-19 16:05:24.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/Makefile 2009-06-19 16:05:32.000000000 -0700
|
||||
@@ -35,6 +35,9 @@
|
||||
echo "Build Linux or Windows."
|
||||
make -f common.mk
|
||||
|
||||
+export::
|
||||
+ make -f common.mk export
|
||||
+
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/certManager.xul.fix6 2009-06-19 16:01:21.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/certManager.xul 2009-06-19 16:01:43.000000000 -0700
|
||||
@@ -65,7 +65,7 @@
|
||||
<tabs id="certMgrTabbox" onselect="CertsTabsSelected();">
|
||||
<tab id="mine_tab" label="&certmgr.tab.mine;" selected="true"/>
|
||||
<tab id="others_tab" hidden="true" label="&certmgr.tab.others2;"/>
|
||||
- <tab id="websites_tab" hidden="true" label="&certmgr.tab.websites3;"/>
|
||||
+ <tab id="websites_tab" hidden="false" label="&certmgr.tab.websites3;"/>
|
||||
<tab id="ca_tab" hidden="false" label="&certmgr.tab.ca;"/>
|
||||
<tab id="orphan_tab" hidden="true" label="&certmgr.tab.orphan2;"/>
|
||||
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix6 2009-06-19 15:56:20.000000000 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2009-06-19 15:57:48.000000000 -0700
|
||||
@@ -30,7 +30,7 @@
|
||||
#else
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#endif
|
||||
-
|
||||
+#include "pipnss/nsICertOverrideService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@@ -69,6 +69,7 @@
|
||||
#endif
|
||||
|
||||
#define PSM_COMPONENT_CONTRACTID "@mozilla.org/psm;1"
|
||||
+#define NS_CERTOVERRIDE_CONTRACTID "@mozilla.org/security/certoverride;1"
|
||||
|
||||
static const nsIID kIModuleIID = NS_IMODULE_IID;
|
||||
static const nsIID kIFactoryIID = NS_IFACTORY_IID;
|
||||
@@ -89,6 +90,7 @@
|
||||
|
||||
std::list< nsCOMPtr <rhIKeyNotify> > rhCoolKey::gNotifyListeners;
|
||||
|
||||
+PRLock* rhCoolKey::certCBLock=NULL;
|
||||
|
||||
PRBool rhCoolKey::gAutoEnrollBlankTokens = PR_FALSE;
|
||||
|
||||
@@ -190,6 +192,13 @@
|
||||
mCSPListener = nsnull;
|
||||
#endif
|
||||
|
||||
+ certCBLock = PR_NewLock();
|
||||
+
|
||||
+ if(!certCBLock) {
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Failed to create lock exiting! \n",GetTStamp(tBuff,56)));
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
PRBool res = InitInstance();
|
||||
|
||||
if(res == PR_FALSE)
|
||||
@@ -207,6 +216,10 @@
|
||||
|
||||
char tBuff[56];
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::~rhCoolKey: %p \n",GetTStamp(tBuff,56),this));
|
||||
+
|
||||
+ if(certCBLock) {
|
||||
+ PR_DestroyLock(certCBLock);
|
||||
+ }
|
||||
}
|
||||
|
||||
void rhCoolKey::ShutDownInstance()
|
||||
@@ -255,6 +268,212 @@
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+struct BadCertData {
|
||||
+ PRErrorCode error;
|
||||
+ PRInt32 port;
|
||||
+};
|
||||
+
|
||||
+typedef struct BadCertData BadCertData;
|
||||
+
|
||||
+SECStatus rhCoolKey::badCertHandler(void *arg, PRFileDesc *fd)
|
||||
+{
|
||||
+ SECStatus secStatus = SECFailure;
|
||||
+ PRErrorCode err;
|
||||
+ char *host = NULL;
|
||||
+ PRInt32 port = 0;
|
||||
+ CERTCertificate *serverCert = NULL;
|
||||
+ PRUint32 errorBits = 0;
|
||||
+ char tBuff[56];
|
||||
+
|
||||
+ PR_Lock(certCBLock);
|
||||
+
|
||||
+ if (!arg || !fd) {
|
||||
+ PR_Unlock(certCBLock);
|
||||
+ return secStatus;
|
||||
+ }
|
||||
+
|
||||
+ // Retrieve callback data from NssHttpClient
|
||||
+ // Caller cleans up this data
|
||||
+ BadCertData *data = (BadCertData *) arg;
|
||||
+ data->error = err = PORT_GetError();
|
||||
+
|
||||
+
|
||||
+ /* If any of the cases in the switch are met, then we will proceed */
|
||||
+
|
||||
+ switch (err) {
|
||||
+ case SEC_ERROR_INVALID_AVA:
|
||||
+ case SEC_ERROR_INVALID_TIME:
|
||||
+ case SEC_ERROR_BAD_SIGNATURE:
|
||||
+ case SEC_ERROR_EXPIRED_CERTIFICATE:
|
||||
+ case SEC_ERROR_UNKNOWN_ISSUER:
|
||||
+ case SEC_ERROR_UNTRUSTED_CERT:
|
||||
+ case SEC_ERROR_CERT_VALID:
|
||||
+ case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE:
|
||||
+ case SEC_ERROR_CRL_EXPIRED:
|
||||
+ case SEC_ERROR_CRL_BAD_SIGNATURE:
|
||||
+ case SEC_ERROR_EXTENSION_VALUE_INVALID:
|
||||
+ case SEC_ERROR_CA_CERT_INVALID:
|
||||
+ case SEC_ERROR_CERT_USAGES_INVALID:
|
||||
+ case SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION:
|
||||
+ case SEC_ERROR_EXTENSION_NOT_FOUND: // Added by Rob 5/21/2002
|
||||
+ secStatus = SECSuccess;
|
||||
+ break;
|
||||
+ default:
|
||||
+ secStatus = SECFailure;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if(secStatus == SECSuccess) {
|
||||
+ PR_Unlock(certCBLock);
|
||||
+ return secStatus;
|
||||
+ }
|
||||
+
|
||||
+ // Collect errors to compare with override service output
|
||||
+ switch(err) {
|
||||
+ case SEC_ERROR_UNTRUSTED_ISSUER:
|
||||
+ errorBits |= nsICertOverrideService::ERROR_UNTRUSTED;
|
||||
+ break;
|
||||
+ case SSL_ERROR_BAD_CERT_DOMAIN:
|
||||
+ errorBits |= nsICertOverrideService::ERROR_MISMATCH;
|
||||
+ break;
|
||||
+ case SEC_ERROR_EXPIRED_CERTIFICATE:
|
||||
+ errorBits |= nsICertOverrideService::ERROR_TIME;
|
||||
+ default:
|
||||
+ break;
|
||||
+ };
|
||||
+
|
||||
+ // Now proceed to see if we have an exception.
|
||||
+ // Get the server certificate that was rejected.
|
||||
+ serverCert = SSL_PeerCertificate(fd);
|
||||
+
|
||||
+ if(!serverCert) {
|
||||
+ PR_Unlock(certCBLock);
|
||||
+ return secStatus;
|
||||
+ }
|
||||
+
|
||||
+ port = data->port;
|
||||
+ host = SSL_RevealURL(fd);
|
||||
+
|
||||
+ if(!host || port <= 0) {
|
||||
+ PR_Unlock(certCBLock);
|
||||
+ return secStatus;
|
||||
+ }
|
||||
+
|
||||
+ PR_LOG(coolKeyLog, PR_LOG_DEBUG,
|
||||
+ ("%s rhCoolKey::badCertHandler enter: error: %d url: %s port: %d \n",
|
||||
+ GetTStamp(tBuff,56),err,host,port)
|
||||
+ );
|
||||
+
|
||||
+ PRBool isTemporaryOverride = PR_FALSE;
|
||||
+ PRUint32 overrideBits = 0;
|
||||
+ PRBool overrideResult = PR_FALSE;
|
||||
+
|
||||
+ // Use the nsICertOverrideService to see if we have
|
||||
+ // previously trusted this certificate.
|
||||
+ nsCOMPtr<nsICertOverrideService> overrideService =
|
||||
+ do_GetService(NS_CERTOVERRIDE_CONTRACTID);
|
||||
+
|
||||
+ const nsEmbedCString nsHost(host);
|
||||
+ nsEmbedCString hashAlg,fingerPrint;
|
||||
+
|
||||
+ nsresult nsrv;
|
||||
+ unsigned char* fingerprint=NULL;
|
||||
+ if(overrideService) {
|
||||
+ nsrv = overrideService->GetValidityOverride((const nsACString &)nsHost,
|
||||
+ port,(nsACString &)hashAlg,
|
||||
+ (nsACString&)fingerPrint,&overrideBits,
|
||||
+ &isTemporaryOverride,&overrideResult
|
||||
+ );
|
||||
+ if(nsrv == NS_OK) {
|
||||
+ PR_LOG(coolKeyLog, PR_LOG_DEBUG,
|
||||
+ ("%s rhCoolKey::badCertHandler res %d print %s len %d bits %u temp %d alg: %s \n",
|
||||
+ GetTStamp(tBuff,56),overrideResult,fingerPrint.get(),
|
||||
+ fingerPrint.Length(),overrideBits, isTemporaryOverride,hashAlg.get())
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ PRBool certMatches = PR_FALSE;
|
||||
+
|
||||
+ if( (nsrv == NS_OK) && overrideResult) {
|
||||
+ SECItem oid;
|
||||
+ oid.data = nsnull;
|
||||
+ oid.len = 0;
|
||||
+ SECStatus srv = SEC_StringToOID(nsnull, &oid,
|
||||
+ hashAlg.get(), hashAlg.Length());
|
||||
+
|
||||
+ if (srv != SECSuccess) {
|
||||
+ PR_Free(host);
|
||||
+ host=NULL;
|
||||
+ CERT_DestroyCertificate(serverCert);
|
||||
+ serverCert=NULL;
|
||||
+ PR_Unlock(certCBLock);
|
||||
+ return secStatus;
|
||||
+ }
|
||||
+
|
||||
+ SECOidTag oid_tag = SECOID_FindOIDTag(&oid);
|
||||
+
|
||||
+ unsigned int hash_len = HASH_ResultLenByOidTag(oid_tag);
|
||||
+ fingerprint = new unsigned char[hash_len];
|
||||
+
|
||||
+ if(!fingerprint) {
|
||||
+ CERT_DestroyCertificate(serverCert);
|
||||
+ serverCert=NULL;
|
||||
+ PR_Unlock(certCBLock);
|
||||
+ return secStatus;
|
||||
+ }
|
||||
+
|
||||
+ SECItem computedPrint;
|
||||
+ memset(fingerprint, 0, sizeof fingerprint);
|
||||
+ PK11_HashBuf(oid_tag, fingerprint,
|
||||
+ serverCert->derCert.data, serverCert->derCert.len);
|
||||
+ CERT_DestroyCertificate(serverCert);
|
||||
+ serverCert=NULL;
|
||||
+
|
||||
+ computedPrint.data=fingerprint;
|
||||
+ computedPrint.len=hash_len;
|
||||
+
|
||||
+ char *formattedPrint = CERT_Hexify(&computedPrint,1);
|
||||
+ char *inputPrint = (char *)fingerPrint.get();
|
||||
+
|
||||
+ //Compare fingerprints.
|
||||
+
|
||||
+ if(formattedPrint && inputPrint) {
|
||||
+ if(!PL_strcmp(formattedPrint, inputPrint))
|
||||
+ certMatches = PR_TRUE;
|
||||
+ }
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s certMatches: %d \n",
|
||||
+ GetTStamp(tBuff,56),certMatches)
|
||||
+ );
|
||||
+
|
||||
+ if(formattedPrint) {
|
||||
+ PORT_Free(formattedPrint);
|
||||
+ formattedPrint = NULL;
|
||||
+ }
|
||||
+ } else {
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s override test failed. \n",
|
||||
+ GetTStamp(tBuff,56))
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ if( certMatches ) {
|
||||
+ if(overrideBits | errorBits)
|
||||
+ secStatus = SECSuccess;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ PR_Free(host);
|
||||
+ host = NULL;
|
||||
+ if(fingerprint) {
|
||||
+ delete [] fingerprint;
|
||||
+ fingerprint = NULL;
|
||||
+ }
|
||||
+
|
||||
+ PR_Unlock(certCBLock);
|
||||
+
|
||||
+ return secStatus;
|
||||
+}
|
||||
+
|
||||
+
|
||||
HRESULT rhCoolKey::doSetCoolKeyConfigValue(const char *aName, const char *aValue)
|
||||
{
|
||||
|
||||
@@ -340,7 +559,7 @@
|
||||
nssComponent
|
||||
= do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
|
||||
- CoolKeySetCallbacks(Dispatch,Reference, Release,doGetCoolKeyConfigValue ,doSetCoolKeyConfigValue);
|
||||
+ CoolKeySetCallbacks(Dispatch,Reference, Release,doGetCoolKeyConfigValue ,doSetCoolKeyConfigValue,badCertHandler);
|
||||
|
||||
mProxy = CreateProxyObject();
|
||||
|
||||
@@ -1262,6 +1481,38 @@
|
||||
}
|
||||
|
||||
/* string GetCoolKeyIssuedTo (in unsigned long aKeyType, in string aKeyID); */
|
||||
+NS_IMETHODIMP rhCoolKey::GetCoolKeyUID(PRUint32 aKeyType, const char *aKeyID, char **uid)
|
||||
+{
|
||||
+ char tBuff[56];
|
||||
+ if (!aKeyID) {
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ AutoCoolKey key(aKeyType, ( char *)aKeyID);
|
||||
+
|
||||
+ char buff[512];
|
||||
+ int bufLength = 512;
|
||||
+ buff[0] = 0;
|
||||
+
|
||||
+ CoolKeyGetUID(&key, (char *) buff, bufLength);
|
||||
+
|
||||
+ if(!buff[0])
|
||||
+ {
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
+ PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetUID %s \n",GetTStamp(tBuff,56),(char *) buff));
|
||||
+
|
||||
+ char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1);
|
||||
+
|
||||
+ *uid = temp;
|
||||
+
|
||||
+ return NS_OK;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* string GetCoolKeyIssuedTo (in unsigned long aKeyType, in string aKeyID); */
|
||||
NS_IMETHODIMP rhCoolKey::GetCoolKeyIssuedTo(PRUint32 aKeyType, const char *aKeyID, char **issuedTo)
|
||||
{
|
||||
char tBuff[56];
|
||||
--- ./esc/src/app/xpcom/rhICoolKey.idl.fix6 2009-06-19 16:00:20.000000000 -0700
|
||||
+++ ./esc/src/app/xpcom/rhICoolKey.idl 2009-06-19 16:00:32.000000000 -0700
|
||||
@@ -66,6 +66,8 @@
|
||||
|
||||
string GetCoolKeyCertInfo(in unsigned long aKeyType, in string aKeyID, in string aCertNickname);
|
||||
|
||||
+ string GetCoolKeyUID(in unsigned long aKeyType, in string aKeyID);
|
||||
+
|
||||
string GetCoolKeyIssuedTo(in unsigned long aKeyType, in string aKeyID);
|
||||
|
||||
string GetCoolKeyIssuer(in unsigned long aKeyType, in string aKeyID);
|
||||
--- ./esc/src/app/xpcom/Makefile.sdk.fix6 2009-06-19 15:54:52.000000000 -0700
|
||||
+++ ./esc/src/app/xpcom/Makefile.sdk 2009-06-19 15:55:43.000000000 -0700
|
||||
@@ -109,7 +109,7 @@
|
||||
CPPFLAGS += -fno-rtti \
|
||||
-fno-exceptions \
|
||||
-fshort-wchar -fPIC
|
||||
-GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue.a -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
|
||||
+GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue.a -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
@@ -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) 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
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.h.fix6 2009-06-19 15:58:21.000000000 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.h 2009-06-19 15:58:28.000000000 -0700
|
||||
@@ -22,6 +22,15 @@
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsEmbedString.h"
|
||||
#include <list>
|
||||
+#include "nspr.h"
|
||||
+#include "prio.h"
|
||||
+#include "ssl.h"
|
||||
+#include "pk11func.h"
|
||||
+#include "cert.h"
|
||||
+#include "sslerr.h"
|
||||
+#include "secerr.h"
|
||||
+#include "sechash.h"
|
||||
+
|
||||
#include "CoolKey.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIObserver.h"
|
||||
@@ -92,6 +101,7 @@
|
||||
|
||||
static HRESULT doSetCoolKeyConfigValue(const char *aName, const char *aValue);
|
||||
static const char *doGetCoolKeyConfigValue(const char *aName );
|
||||
+ static SECStatus badCertHandler(void *arg, PRFileDesc *fd);
|
||||
|
||||
protected:
|
||||
/* additional members */
|
||||
@@ -107,6 +117,8 @@
|
||||
|
||||
static std::list< nsCOMPtr <rhIKeyNotify> > gNotifyListeners;
|
||||
|
||||
+ static PRLock* certCBLock;
|
||||
+
|
||||
rhICoolKey* mProxy;
|
||||
|
||||
static PRBool gAutoEnrollBlankTokens;
|
@ -1,69 +0,0 @@
|
||||
--- ./esc/src/lib/NssHttpClient/httpClientNss.cpp.fix7 2009-06-22 13:00:20.000000000 -0700
|
||||
+++ ./esc/src/lib/NssHttpClient/httpClientNss.cpp 2009-06-22 13:05:07.000000000 -0700
|
||||
@@ -64,8 +64,53 @@
|
||||
|
||||
PSHttpResponse *HttpClientNss::httpSendChunked(char *host_port, char *uri, char *method, char *body,PSChunkedResponseCallback cb,void *uw,PRBool doSSL,int messageTimeout )
|
||||
{
|
||||
-
|
||||
- PSHttpServer server(host_port, PR_AF_INET);
|
||||
+ char *pPort = NULL;
|
||||
+ char *pPortActual = NULL;
|
||||
+
|
||||
+ char hostName[512];
|
||||
+
|
||||
+ /*
|
||||
+ * Isolate the host name, account for IPV6 numeric addresses.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+ if(host_port)
|
||||
+ strncpy(hostName,host_port,512);
|
||||
+
|
||||
+ pPort = hostName;
|
||||
+ while(1) {
|
||||
+ pPort = strchr(pPort, ':');
|
||||
+ if (pPort) {
|
||||
+ pPortActual = pPort;
|
||||
+ pPort++;
|
||||
+ } else
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if(pPortActual)
|
||||
+ *pPortActual = '\0';
|
||||
+
|
||||
+ /*
|
||||
+ * Rifle through the values for the host
|
||||
+ */
|
||||
+
|
||||
+ PRAddrInfo *ai;
|
||||
+ void *iter;
|
||||
+ PRNetAddr addr;
|
||||
+ int family = PR_AF_INET;
|
||||
+
|
||||
+ ai = PR_GetAddrInfoByName(hostName, PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
|
||||
+ if (ai) {
|
||||
+ printf("%s\n", PR_GetCanonNameFromAddrInfo(ai));
|
||||
+ iter = NULL;
|
||||
+ while ((iter = PR_EnumerateAddrInfo(iter, ai, 0, &addr)) != NULL) {
|
||||
+ family = PR_NetAddrFamily(&addr);
|
||||
+ break;
|
||||
+ }
|
||||
+ PR_FreeAddrInfo(ai);
|
||||
+ }
|
||||
+
|
||||
+ PSHttpServer server(host_port, family);
|
||||
|
||||
PSHttpRequest request( &server, uri, HTTP11, 0 );
|
||||
_request = &request;
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix7 2009-06-22 15:34:32.000000000 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2009-06-22 15:35:11.000000000 -0700
|
||||
@@ -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.
|
@ -1,76 +0,0 @@
|
||||
diff -up ./esc/src/app/daemon/manifest.mn.fix8 ./esc/src/app/daemon/manifest.mn
|
||||
--- ./esc/src/app/daemon/manifest.mn.fix8 2010-04-15 16:27:07.232078448 -0700
|
||||
+++ ./esc/src/app/daemon/manifest.mn 2010-04-15 14:24:46.297068110 -0700
|
||||
@@ -37,7 +37,7 @@ DEFINES += $(shell pkg-config --cflags x
|
||||
CPPFLAGS += $(DEFINES) -g
|
||||
|
||||
LDFLAGS += -lstdc++ -L$(CORE_DIST)/$(OBJDIR)/lib -L$(XULRUNNER_LIBS_LDFLAGS) -lnss3 -lnspr4 -lssl3 -lckyapplet $(shell pkg-config --libs xft)
|
||||
-LDFLAGS += -lckymanager -lhttpchunked
|
||||
+LDFLAGS += -lckymanager -lhttpchunked -lm -lnss3 -lplc4 -lplds4
|
||||
# MODULE public and private header directories are implicitly REQUIRED.
|
||||
|
||||
CPPSRCS = \
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix8 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix8 2010-04-15 14:45:37.907068106 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2010-04-15 14:46:23.392066709 -0700
|
||||
@@ -30,7 +30,7 @@
|
||||
#else
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#endif
|
||||
-#include "pipnss/nsICertOverrideService.h"
|
||||
+#include "nsICertOverrideService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "prlink.h"
|
||||
#include "prthread.h"
|
||||
#include "nscore.h"
|
||||
-#include "content/nsCopySupport.h"
|
||||
+#include "nsCopySupport.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <time.h>
|
||||
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix8 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix8 2010-04-15 14:43:35.271068664 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2010-04-15 14:43:48.685066431 -0700
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "nsIGenericFactory.h"
|
||||
#include <prlog.h>
|
||||
#include "notifytray.h"
|
||||
-#include "intl/nsIStringBundle.h"
|
||||
+#include "nsIStringBundle.h"
|
||||
#include <gdk/gdkx.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix8 ./esc/src/app/xpcom/tray/rhTray.h
|
||||
--- ./esc/src/app/xpcom/tray/rhTray.h.fix8 2010-04-15 14:44:38.565066710 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/rhTray.h 2010-04-15 14:45:02.118067548 -0700
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "nsEmbedString.h"
|
||||
#include <list>
|
||||
#include "nsCOMPtr.h"
|
||||
-#include "widget/nsIBaseWindow.h"
|
||||
-#include "widget/nsIWidget.h"
|
||||
+#include "nsIBaseWindow.h"
|
||||
+#include "nsIWidget.h"
|
||||
#include <time.h>
|
||||
|
||||
extern "C" {
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix8 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix8 2010-04-15 14:47:59.377066710 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2010-04-15 14:51:07.476068385 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-9
|
||||
+Version=1.1.0-12
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001011
|
||||
+BuildID=0000001012
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
@ -1,772 +0,0 @@
|
||||
diff -up ./esc/src/app/daemon/manifest.mn.fix9 ./esc/src/app/daemon/manifest.mn
|
||||
--- ./esc/src/app/daemon/manifest.mn.fix9 2011-03-24 12:35:31.481712082 -0700
|
||||
+++ ./esc/src/app/daemon/manifest.mn 2011-03-24 12:35:39.758712086 -0700
|
||||
@@ -37,7 +37,7 @@ DEFINES += $(shell pkg-config --cflags x
|
||||
CPPFLAGS += $(DEFINES) -g
|
||||
|
||||
LDFLAGS += -lstdc++ -L$(CORE_DIST)/$(OBJDIR)/lib -L$(XULRUNNER_LIBS_LDFLAGS) -lnss3 -lnspr4 -lssl3 -lckyapplet $(shell pkg-config --libs xft)
|
||||
-LDFLAGS += -lckymanager -lhttpchunked -lm -lnss3 -lplc4 -lplds4
|
||||
+LDFLAGS += -lckymanager -lhttpchunked -lm -lnss3 -lplc4 -lplds4 -lX11
|
||||
# MODULE public and private header directories are implicitly REQUIRED.
|
||||
|
||||
CPPSRCS = \
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix9 ./esc/src/app/xpcom/rhCoolKey.cpp
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix9 2011-03-24 12:37:10.273712093 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-03-24 12:37:18.813712092 -0700
|
||||
@@ -70,6 +70,7 @@
|
||||
|
||||
#define PSM_COMPONENT_CONTRACTID "@mozilla.org/psm;1"
|
||||
#define NS_CERTOVERRIDE_CONTRACTID "@mozilla.org/security/certoverride;1"
|
||||
+#define RH_COOLKEY_CONTRACTID "@redhat.com/rhCoolKey;1"
|
||||
|
||||
static const nsIID kIModuleIID = NS_IMODULE_IID;
|
||||
static const nsIID kIFactoryIID = NS_IFACTORY_IID;
|
||||
@@ -1711,297 +1712,36 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyVersi
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(rhCoolKey)
|
||||
|
||||
-NS_IMPL_ISUPPORTS1(rhCoolKey,rhICoolKey)
|
||||
-
|
||||
-// Implement full module and factory dance so we can see what is going on
|
||||
-
|
||||
-class rhCoolKeyFactory: public nsIFactory{
|
||||
-private:
|
||||
-nsrefcnt mRefCnt;
|
||||
-public:
|
||||
-rhCoolKeyFactory();
|
||||
-virtual ~rhCoolKeyFactory();
|
||||
-
|
||||
-NS_IMETHOD QueryInterface(const nsIID &aIID, void **aResult);
|
||||
-NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
-NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
-
|
||||
-NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result);
|
||||
-NS_IMETHOD LockFactory(PRBool lock);
|
||||
-
|
||||
+// Build a table of ClassIDs (CIDs) which are implemented by this module. CIDs
|
||||
+// // should be completely unique UUIDs.
|
||||
+// // each entry has the form { CID, service, factoryproc, constructorproc }
|
||||
+// // where factoryproc is usually NULL.
|
||||
+static const mozilla::Module::CIDEntry kCoolKeyCIDs[] = {
|
||||
+ { &kCoolKeyCID, false, NULL, rhCoolKeyConstructor },
|
||||
+ { NULL }
|
||||
+ };
|
||||
+
|
||||
+// Build a table which maps contract IDs to CIDs.
|
||||
+// // A contract is a string which identifies a particular set of functionality. In some
|
||||
+// // cases an extension component may override the contract ID of a builtin gecko component
|
||||
+// // to modify or extend functionality.
|
||||
+//
|
||||
+static const mozilla::Module::ContractIDEntry kCoolKeyContracts[] = {
|
||||
+ { RH_COOLKEY_CONTRACTID, &kCoolKeyCID },
|
||||
+ { NULL }
|
||||
};
|
||||
|
||||
-rhCoolKeyFactory::rhCoolKeyFactory()
|
||||
-{
|
||||
-mRefCnt = 0;
|
||||
-}
|
||||
-rhCoolKeyFactory::~rhCoolKeyFactory()
|
||||
-{
|
||||
-}
|
||||
-
|
||||
-NS_IMETHODIMP rhCoolKeyFactory::QueryInterface(const nsIID &aIID,
|
||||
-void **aResult)
|
||||
-{
|
||||
-if (aResult == NULL) {
|
||||
-return NS_ERROR_NULL_POINTER;
|
||||
-}
|
||||
-*aResult = NULL;
|
||||
-if (aIID.Equals(kISupportsIID)) {
|
||||
-*aResult = (void *) this;
|
||||
-}
|
||||
-else
|
||||
-if (aIID.Equals(kIFactoryIID)) {
|
||||
-*aResult = (void *) this;
|
||||
-}
|
||||
-
|
||||
-if (*aResult == NULL) {
|
||||
-return NS_ERROR_NO_INTERFACE;
|
||||
-}
|
||||
-
|
||||
-AddRef();
|
||||
-return NS_OK;
|
||||
-}
|
||||
-
|
||||
-NS_IMETHODIMP_(nsrefcnt) rhCoolKeyFactory::AddRef()
|
||||
-{
|
||||
-return ++mRefCnt;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-NS_IMETHODIMP_(nsrefcnt) rhCoolKeyFactory::Release()
|
||||
-{
|
||||
-if (--mRefCnt == 0) {
|
||||
-delete this;
|
||||
-return 0;
|
||||
-}
|
||||
-return mRefCnt;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result)
|
||||
-{
|
||||
-if (!result)
|
||||
-return NS_ERROR_INVALID_ARG;
|
||||
-
|
||||
-rhCoolKey* sample = new rhCoolKey();
|
||||
-if (!sample)
|
||||
-return NS_ERROR_OUT_OF_MEMORY;
|
||||
-
|
||||
-nsresult rv = sample->QueryInterface(iid, result);
|
||||
-
|
||||
-if (NS_FAILED(rv)) {
|
||||
-*result = nsnull;
|
||||
-delete sample;
|
||||
-}
|
||||
-
|
||||
-return rv;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyFactory::LockFactory(PRBool lock)
|
||||
-{
|
||||
-return NS_ERROR_NOT_IMPLEMENTED;
|
||||
-}
|
||||
-
|
||||
-// Module implementation
|
||||
-class rhCoolKeyModule : public nsIModule
|
||||
-{
|
||||
-public:
|
||||
-rhCoolKeyModule();
|
||||
-virtual ~rhCoolKeyModule();
|
||||
-
|
||||
-// nsISupports methods:
|
||||
-NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result);
|
||||
-NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
-NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
-
|
||||
-// nsIModule methods:
|
||||
-NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult);
|
||||
-NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType);
|
||||
-NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr);
|
||||
-NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval);
|
||||
-
|
||||
-private:
|
||||
-nsrefcnt mRefCnt;
|
||||
+static const mozilla::Module kCoolKeyModule = {
|
||||
+ mozilla::Module::kVersion,
|
||||
+ kCoolKeyCIDs,
|
||||
+ kCoolKeyContracts,
|
||||
+ NULL
|
||||
};
|
||||
|
||||
+// The following line implements the one-and-only "NSModule" symbol exported from this
|
||||
+// // shared library.
|
||||
+ NSMODULE_DEFN(rhCoolKeyModule) = &kCoolKeyModule;
|
||||
+//
|
||||
|
||||
-//----------------------------------------------------------------------
|
||||
-
|
||||
-rhCoolKeyModule::rhCoolKeyModule()
|
||||
-{
|
||||
-mRefCnt = 0;
|
||||
-}
|
||||
-
|
||||
-rhCoolKeyModule::~rhCoolKeyModule()
|
||||
-{
|
||||
-}
|
||||
-
|
||||
-// nsISupports implemention
|
||||
-NS_IMETHODIMP_(nsrefcnt)
|
||||
-rhCoolKeyModule::AddRef(void)
|
||||
-{
|
||||
-char tBuff[56];
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::AddRef \n",GetTStamp(tBuff,56)));
|
||||
-++mRefCnt;
|
||||
-return mRefCnt;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-NS_IMETHODIMP_(nsrefcnt)
|
||||
-rhCoolKeyModule::Release(void)
|
||||
-{
|
||||
-char tBuff[56];
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::Release : mRefCnt %d \n",GetTStamp(tBuff,56),mRefCnt - 1));
|
||||
---mRefCnt;
|
||||
-if (mRefCnt == 0) {
|
||||
-mRefCnt = 1; /* stabilize */
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::Release deleting Module \n",GetTStamp(tBuff,56)));
|
||||
-delete this;
|
||||
-return 0;
|
||||
-}
|
||||
-return mRefCnt;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyModule::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
-{
|
||||
-char tBuff[56];
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::QueryInterface \n",GetTStamp(tBuff,56)));
|
||||
-if ( !aInstancePtr )
|
||||
-return NS_ERROR_NULL_POINTER;
|
||||
-
|
||||
-nsISupports* foundInterface;
|
||||
-
|
||||
-if ( aIID.Equals(kIModuleIID) )
|
||||
-foundInterface = (nsIModule*) this;
|
||||
-
|
||||
-else if ( aIID.Equals(kISupportsIID) )
|
||||
-foundInterface = (nsISupports*) this;
|
||||
-
|
||||
-else
|
||||
-foundInterface = 0;
|
||||
-
|
||||
-if (foundInterface) {
|
||||
-foundInterface->AddRef();
|
||||
-*aInstancePtr = foundInterface;
|
||||
-return NS_OK;
|
||||
-}
|
||||
-
|
||||
-*aInstancePtr = foundInterface;
|
||||
-return NS_NOINTERFACE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-// Create a factory object for creating instances of aClass.
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyModule::GetClassObject(nsIComponentManager *aCompMgr,
|
||||
-const nsCID& aClass,
|
||||
-const nsIID& aIID,
|
||||
-void** result)
|
||||
-{
|
||||
-char tBuff[56];
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::GetClassObject \n",GetTStamp(tBuff,56)));
|
||||
-if (!kCoolKeyCID.Equals(aClass))
|
||||
-return NS_ERROR_FACTORY_NOT_REGISTERED;
|
||||
-
|
||||
-if (!result)
|
||||
-return NS_ERROR_INVALID_ARG;
|
||||
-
|
||||
-rhCoolKeyFactory* factory = new rhCoolKeyFactory();
|
||||
-if (!factory)
|
||||
-return NS_ERROR_OUT_OF_MEMORY;
|
||||
-
|
||||
-nsresult rv = factory->QueryInterface(aIID, result);
|
||||
-
|
||||
-if (NS_FAILED(rv)) {
|
||||
-*result = nsnull;
|
||||
-delete factory;
|
||||
-}
|
||||
-
|
||||
-return rv;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyModule::RegisterSelf(nsIComponentManager *aCompMgr,
|
||||
-nsIFile* aPath,
|
||||
-const char* registryLocation,
|
||||
-const char* componentType)
|
||||
-{
|
||||
-
|
||||
-char tBuff[54];
|
||||
-nsIComponentRegistrar* compReg = nsnull;
|
||||
-
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::RegisterSelf \n",GetTStamp(tBuff,56)));
|
||||
-nsresult rv = aCompMgr->QueryInterface(kIComponentRegistrarIID, (void**)&compReg);
|
||||
-if (NS_FAILED(rv))
|
||||
-return rv;
|
||||
-
|
||||
-rv = compReg->RegisterFactoryLocation(kCoolKeyCID,
|
||||
-"CoolKey",
|
||||
-"@redhat.com/rhCoolKey",
|
||||
-aPath,
|
||||
-registryLocation,
|
||||
-componentType);
|
||||
-
|
||||
-compReg->Release();
|
||||
-
|
||||
-return rv;
|
||||
-}
|
||||
-
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyModule::UnregisterSelf(nsIComponentManager* aCompMgr,
|
||||
-nsIFile* aPath,
|
||||
-const char* registryLocation)
|
||||
-{
|
||||
-char tBuff[56];
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::UnregisterSelf \n",GetTStamp(tBuff,56)));
|
||||
-nsIComponentRegistrar* compReg = nsnull;
|
||||
-
|
||||
-nsresult rv = aCompMgr->QueryInterface(kIComponentRegistrarIID, (void**)&compReg);
|
||||
-if (NS_FAILED(rv))
|
||||
-return rv;
|
||||
-
|
||||
-rv = compReg->UnregisterFactoryLocation(kCoolKeyCID, aPath);
|
||||
-
|
||||
-compReg->Release();
|
||||
-
|
||||
-return rv;
|
||||
-}
|
||||
-
|
||||
-NS_IMETHODIMP
|
||||
-rhCoolKeyModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *okToUnload)
|
||||
-{
|
||||
-*okToUnload = PR_FALSE; // we do not know how to unload.
|
||||
-return NS_OK;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-//----------------------------------------------------------------------
|
||||
-
|
||||
-extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
|
||||
-nsIFile* location,
|
||||
-nsIModule** return_cobj)
|
||||
-{
|
||||
-nsresult rv = NS_OK;
|
||||
-
|
||||
-char tBuff[56];
|
||||
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::NSGetModule \n",GetTStamp(tBuff,56)));
|
||||
-
|
||||
-// Create and initialize the module instance
|
||||
-rhCoolKeyModule *m = new rhCoolKeyModule();
|
||||
-if (!m) {
|
||||
-return NS_ERROR_OUT_OF_MEMORY;
|
||||
-}
|
||||
+NS_IMPL_ISUPPORTS1(rhCoolKey,rhICoolKey)
|
||||
|
||||
-// Increase refcnt and store away nsIModule interface to m in return_cobj
|
||||
-rv = m->QueryInterface(kIModuleIID, (void**)return_cobj);
|
||||
-if (NS_FAILED(rv)) {
|
||||
-delete m;
|
||||
-}
|
||||
-return rv;
|
||||
-}
|
||||
diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix9 ./esc/src/app/xpcom/rhCoolKey.h
|
||||
--- ./esc/src/app/xpcom/rhCoolKey.h.fix9 2011-03-24 12:40:07.291712102 -0700
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.h 2011-03-24 12:40:15.644712108 -0700
|
||||
@@ -19,7 +19,9 @@
|
||||
#define RH_COOLKEY_H
|
||||
|
||||
#include "rhICoolKey.h"
|
||||
-#include "nsIGenericFactory.h"
|
||||
+/*#include "nsIGenericFactory.h" */
|
||||
+#include "mozilla/ModuleUtils.h"
|
||||
+#include "nsIClassInfoImpl.h"
|
||||
#include "nsEmbedString.h"
|
||||
#include <list>
|
||||
#include "nspr.h"
|
||||
diff -up ./esc/src/app/xpcom/rhICoolKey.idl.fix9 ./esc/src/app/xpcom/rhICoolKey.idl
|
||||
--- ./esc/src/app/xpcom/rhICoolKey.idl.fix9 2011-03-24 12:42:27.595712113 -0700
|
||||
+++ ./esc/src/app/xpcom/rhICoolKey.idl 2011-03-24 12:42:39.069712124 -0700
|
||||
@@ -17,12 +17,11 @@
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "rhIKeyNotify.idl"
|
||||
-#include "nsIObserver.idl"
|
||||
+//#include "nsIObserver.idl"
|
||||
|
||||
-interface nsIDOMHTMLDocument;
|
||||
[scriptable,uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)]
|
||||
|
||||
-interface rhICoolKey: nsISupports
|
||||
+interface rhICoolKey:nsISupports
|
||||
{
|
||||
|
||||
void rhNotifyKeyStateChange(in unsigned long aKeyType, in string aKeyID, in unsigned long aKeyState, in unsigned long aData, in string strData);
|
||||
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix9 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix9 2011-03-24 12:43:20.262712118 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2011-03-24 12:43:34.767712121 -0700
|
||||
@@ -18,14 +18,17 @@
|
||||
#define FORCE_PR_LOG 1
|
||||
|
||||
#include "rhTray.h"
|
||||
-#include "nsIGenericFactory.h"
|
||||
+#include "mozilla/ModuleUtils.h"
|
||||
#include <prlog.h>
|
||||
#include "notifytray.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include <gdk/gdkx.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
-NS_IMPL_ISUPPORTS1(rhTray, rhITray)
|
||||
+#define RH_COOLKEY_TRAY_CONTRACTID "@redhat.com/rhTray;1"
|
||||
+
|
||||
+static const nsCID kCoolKeyTrayCID = RH_TRAY_CID;
|
||||
+
|
||||
|
||||
GtkWidget* rhTray::mWnd = NULL;
|
||||
GtkWidget* rhTray::mIconMenu = NULL;
|
||||
@@ -861,15 +864,36 @@ gboolean rhTrayWindowListener::WndDelete
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(rhTray)
|
||||
|
||||
|
||||
-//rhTray Module Implementation
|
||||
+// Build a table of ClassIDs (CIDs) which are implemented by this module. CIDs
|
||||
+// // // should be completely unique UUIDs.
|
||||
+// // // each entry has the form { CID, service, factoryproc, constructorproc }
|
||||
+// // // where factoryproc is usually NULL.
|
||||
+
|
||||
+static const mozilla::Module::CIDEntry kCoolKeyTrayCIDs[] = {
|
||||
+ { &kCoolKeyTrayCID, false, NULL, rhTrayConstructor },
|
||||
+ { NULL }
|
||||
+};
|
||||
|
||||
-static const nsModuleComponentInfo components[] =
|
||||
-{
|
||||
- { "rhTray",
|
||||
- RH_TRAY_CID,
|
||||
- "@redhat.com/rhTray",
|
||||
- rhTrayConstructor
|
||||
- }
|
||||
+// Build a table which maps contract IDs to CIDs.
|
||||
+// A contract is a string which identifies a particular set of functionality. In some
|
||||
+// cases an extension component may override the contract ID of a builtin gecko component
|
||||
+// to modify or extend functionality.
|
||||
+
|
||||
+static const mozilla::Module::ContractIDEntry kCoolKeyTrayContracts[] = {
|
||||
+ { RH_COOLKEY_TRAY_CONTRACTID, &kCoolKeyTrayCID },
|
||||
+ { NULL }
|
||||
};
|
||||
|
||||
-NS_IMPL_NSGETMODULE(rhTrayModule, components)
|
||||
+static const mozilla::Module kCoolKeyTrayModule = {
|
||||
+ mozilla::Module::kVersion,
|
||||
+ kCoolKeyTrayCIDs,
|
||||
+ kCoolKeyTrayContracts,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+// The following line implements the one-and-only "NSModule" symbol exported from this
|
||||
+// shared library.
|
||||
+NSMODULE_DEFN(rhCoolKeyTrayModule) = &kCoolKeyTrayModule;
|
||||
+
|
||||
+NS_IMPL_ISUPPORTS1(rhTray,rhITray)
|
||||
+
|
||||
diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix9 ./esc/src/app/xpcom/tray/rhTray.h
|
||||
--- ./esc/src/app/xpcom/tray/rhTray.h.fix9 2011-03-24 12:44:10.035712119 -0700
|
||||
+++ ./esc/src/app/xpcom/tray/rhTray.h 2011-03-24 12:44:19.059712129 -0700
|
||||
@@ -19,7 +19,8 @@
|
||||
#define RH_TRAY_H
|
||||
|
||||
#include "rhITray.h"
|
||||
-#include "nsIGenericFactory.h"
|
||||
+//#include "nsIGenericFactory.h"
|
||||
+//#include mozilla/ModuleUtils.h
|
||||
#include "nsEmbedString.h"
|
||||
#include <list>
|
||||
#include "nsCOMPtr.h"
|
||||
diff -up ./esc/src/app/xul/esc/application.ini.fix9 ./esc/src/app/xul/esc/application.ini
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix9 2011-03-24 12:45:51.087712126 -0700
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2011-03-24 12:46:01.780712129 -0700
|
||||
@@ -25,11 +25,11 @@ Vendor=RedHat
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.1.0-12
|
||||
+Version=1.1.0-13
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
-BuildID=0000001012
|
||||
+BuildID=0000001013
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
@@ -41,12 +41,12 @@ ID={6380471b-1924-4b48-b652-49f42951af86
|
||||
; This field is required. It specifies the minimum Gecko version that this
|
||||
; application requires. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
-MinVersion=1.9
|
||||
+MinVersion=1.99
|
||||
;
|
||||
; This field is optional. It specifies the maximum Gecko version that this
|
||||
; application requires. It should be specified if your application uses
|
||||
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
-MaxVersion=1.99
|
||||
+MaxVersion=2.99
|
||||
|
||||
[Shell]
|
||||
diff -up ./esc/src/app/xul/esc/chrome/chrome.manifest.fix9 ./esc/src/app/xul/esc/chrome/chrome.manifest
|
||||
--- ./esc/src/app/xul/esc/chrome/chrome.manifest.fix9 2011-03-24 12:52:14.601712157 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/chrome.manifest 2011-03-24 12:52:23.723712155 -0700
|
||||
@@ -1,19 +0,0 @@
|
||||
-# 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
|
||||
-
|
||||
-content esc content/esc/
|
||||
-locale esc en-US locale/en-US/
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix9 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix9 2011-03-24 12:52:49.995712156 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2011-03-24 12:52:59.829712160 -0700
|
||||
@@ -132,7 +132,7 @@ jsNotify.prototype = {
|
||||
|
||||
try {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
- netkey = Components.classes["@redhat.com/rhCoolKey"].getService();
|
||||
+ netkey = Components.classes["@redhat.com/rhCoolKey;1"].getService();
|
||||
netkey = netkey.QueryInterface(Components.interfaces.rhICoolKey);
|
||||
gNotify = new jsNotify;
|
||||
netkey.rhCoolKeySetNotifyCallback(gNotify);
|
||||
diff -up ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix9 ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js
|
||||
--- ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix9 2011-03-24 12:53:21.344712157 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js 2011-03-24 12:53:28.456712159 -0700
|
||||
@@ -63,7 +63,7 @@ jsWindNotify.prototype = {
|
||||
// GECKO ONLY initialization
|
||||
try {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
- gTray = Components.classes["@redhat.com/rhTray"].getService();
|
||||
+ gTray = Components.classes["@redhat.com/rhTray;1"].getService();
|
||||
|
||||
|
||||
gTray = gTray.QueryInterface(Components.interfaces.rhITray);
|
||||
diff -up ./esc/src/app/xul/esc/chrome.manifest.fix9 ./esc/src/app/xul/esc/chrome.manifest
|
||||
--- ./esc/src/app/xul/esc/chrome.manifest.fix9 2011-03-24 12:49:14.983712140 -0700
|
||||
+++ ./esc/src/app/xul/esc/chrome.manifest 2011-03-24 12:49:47.350712147 -0700
|
||||
@@ -0,0 +1,33 @@
|
||||
+# 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
|
||||
+
|
||||
+content esc chrome/content/esc/
|
||||
+locale esc en-US chrome/locale/en-US/
|
||||
+
|
||||
+interfaces components/rhICoolKey.xpt
|
||||
+interfaces components/rhIKeyNotify.xpt
|
||||
+interfaces components/rhITray.xpt
|
||||
+interfaces components/rhITrayWindNotify.xpt
|
||||
+
|
||||
+
|
||||
+binary-component components/librhCoolKey.so
|
||||
+binary-component components/librhTray.so
|
||||
+
|
||||
+
|
||||
+component {36c65861-52a8-4ce9-aa3b-235b88216ed4} components/escCLH.js
|
||||
+contract @redhat.com/esc-clh;1 {36c65861-52a8-4ce9-aa3b-235b88216ed4}
|
||||
+category command-line-handler escCLH @redhat.com/esc-clh;1
|
||||
diff -up ./esc/src/app/xul/esc/components/escCLH.js.fix9 ./esc/src/app/xul/esc/components/escCLH.js
|
||||
--- ./esc/src/app/xul/esc/components/escCLH.js.fix9 2011-03-24 12:54:15.072712160 -0700
|
||||
+++ ./esc/src/app/xul/esc/components/escCLH.js 2011-03-24 12:54:53.868712165 -0700
|
||||
@@ -2,6 +2,8 @@
|
||||
* -myapp commandline handler; starts up My App.
|
||||
*/
|
||||
|
||||
+ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
+
|
||||
const nsIAppShellService = Components.interfaces.nsIAppShellService;
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
||||
@@ -20,20 +22,26 @@
|
||||
consoleService.logStringMessage("esc: " + message + "\n");
|
||||
}
|
||||
|
||||
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
+
|
||||
/*
|
||||
* Classes
|
||||
*/
|
||||
+
|
||||
+function escCLH() {}
|
||||
|
||||
- const escCLH = {
|
||||
+ escCLH.prototype = {
|
||||
+
|
||||
+
|
||||
+ contractID: "@redhat.com/esc-clh;1",
|
||||
+ classID: Components.ID("{36c65861-52a8-4ce9-aa3b-235b88216ed4}"),
|
||||
+ // const clh_category = "c-esc";
|
||||
+
|
||||
+
|
||||
/* nsISupports */
|
||||
- QueryInterface : function clh_QI(iid) {
|
||||
- if (iid.equals(nsICommandLineHandler) ||
|
||||
- iid.equals(nsIFactory) ||
|
||||
- iid.equals(nsISupports))
|
||||
- return this;
|
||||
|
||||
- throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
- },
|
||||
+ QueryInterface : XPCOMUtils.generateQI([nsICommandLineHandler]),
|
||||
+
|
||||
|
||||
/* nsICommandLineHandler */
|
||||
|
||||
@@ -91,76 +99,8 @@
|
||||
|
||||
helpInfo : " -myapp Open the My App.\n",
|
||||
|
||||
- /* nsIFactory */
|
||||
-
|
||||
- createInstance : function clh_CI(outer, iid) {
|
||||
- if (outer != null)
|
||||
- throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
-
|
||||
- return this.QueryInterface(iid);
|
||||
- },
|
||||
-
|
||||
- lockFactory : function clh_lock(lock) {
|
||||
- /* no-op */
|
||||
- }
|
||||
- };
|
||||
-
|
||||
- const clh_contractID = "@redhat.com/esc-clh;1";
|
||||
- const clh_CID = Components.ID("{36c65861-52a8-4ce9-aa3b-235b88216ed4}");
|
||||
- const clh_category = "c-esc";
|
||||
-
|
||||
- const escCLHModule = {
|
||||
- /* nsISupports */
|
||||
-
|
||||
- QueryInterface : function mod_QI(iid) {
|
||||
- if (iid.equals(nsIModule) ||
|
||||
- iid.equals(nsISupports))
|
||||
- return this;
|
||||
-
|
||||
- throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
- },
|
||||
-
|
||||
- /* nsIModule */
|
||||
- getClassObject : function mod_gch(compMgr, cid, iid) {
|
||||
- if (cid.equals(clh_CID))
|
||||
- return escCLH.QueryInterface(iid);
|
||||
-
|
||||
- throw Components.results.NS_ERROR_NOT_REGISTERED;
|
||||
- },
|
||||
-
|
||||
- registerSelf : function mod_regself(compMgr, fileSpec, location, type) {
|
||||
- compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
-
|
||||
- compMgr.registerFactoryLocation(clh_CID,
|
||||
- "escCLH",
|
||||
- clh_contractID,
|
||||
- fileSpec,
|
||||
- location,
|
||||
- type);
|
||||
-
|
||||
- var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
- .getService(nsICategoryManager);
|
||||
- catMan.addCategoryEntry("command-line-handler",
|
||||
- clh_category,
|
||||
- clh_contractID, true, true);
|
||||
- },
|
||||
-
|
||||
- unregisterSelf : function mod_unreg(compMgr, location, type) {
|
||||
- compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
-
|
||||
- compMgr.unregisterFactoryLocation(clh_CID, location);
|
||||
-
|
||||
- var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
- .getService(nsICategoryManager);
|
||||
- catMan.deleteCategoryEntry("command-line-handler", clh_category);
|
||||
- },
|
||||
-
|
||||
- canUnload : function (compMgr) {
|
||||
- return true;
|
||||
- }
|
||||
};
|
||||
|
||||
/* Module initialisation */
|
||||
- function NSGetModule(comMgr, fileSpec) {
|
||||
- return escCLHModule;
|
||||
- }
|
||||
+
|
||||
+var NSGetFactory = XPCOMUtils.generateNSGetFactory([escCLH]);
|
||||
diff -up ./esc/src/lib/notifytray/notifyareaicon.c.fix9 ./esc/src/lib/notifytray/notifyareaicon.c
|
||||
--- ./esc/src/lib/notifytray/notifyareaicon.c.fix9 2011-03-24 12:57:00.410712173 -0700
|
||||
+++ ./esc/src/lib/notifytray/notifyareaicon.c 2011-03-24 12:57:21.501712174 -0700
|
||||
@@ -90,19 +90,7 @@ notify_area_icon_class_init (NotifyAreaI
|
||||
static void
|
||||
notify_area_icon_unrealize (GtkWidget *widget)
|
||||
{
|
||||
- NotifyAreaIcon *icon = (NotifyAreaIcon *) widget;
|
||||
-
|
||||
- GdkWindow *root_window;
|
||||
-
|
||||
g_print("notify_area_icon_unrealize \n");
|
||||
- if (icon->manager_wnd != None)
|
||||
- {
|
||||
- GdkWindow *gdkwin;
|
||||
- gdkwin = gdk_window_lookup (icon->manager_wnd);
|
||||
-
|
||||
- }
|
||||
-
|
||||
- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
|
||||
|
||||
if (GTK_WIDGET_CLASS (plug_parent_class)->unrealize)
|
||||
(* GTK_WIDGET_CLASS (plug_parent_class)->unrealize) (widget);
|
||||
@@ -159,14 +147,6 @@ notify_area_icon_update_manager_wnd(Noti
|
||||
|
||||
xdisplay = gdk_display;
|
||||
|
||||
- if (icon->manager_wnd != None)
|
||||
- {
|
||||
- GdkWindow *gdkwin;
|
||||
-
|
||||
- gdkwin = gdk_window_lookup (icon->manager_wnd);
|
||||
-
|
||||
- }
|
||||
-
|
||||
XGrabServer (xdisplay);
|
||||
|
||||
icon->manager_wnd = XGetSelectionOwner (xdisplay, icon->selection_atom);
|
||||
@@ -235,7 +215,7 @@ notify_area_icon_new(const gchar *name)
|
||||
{
|
||||
NotifyAreaIcon *icon;
|
||||
char buff[256];
|
||||
- GdkWindow *root;
|
||||
+ /* GdkWindow *root; */
|
||||
|
||||
Screen *xscreen = DefaultScreenOfDisplay (gdk_display);
|
||||
|
||||
@@ -275,8 +255,6 @@ notify_area_icon_new(const gchar *name)
|
||||
notify_area_icon_update_manager_wnd(icon);
|
||||
|
||||
g_print ("attempted to update_manager_wnd: %p",(void *)icon->manager_wnd);
|
||||
-
|
||||
- root = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
|
||||
|
||||
icon->tooltips = gtk_tooltips_new ();
|
||||
|
||||
diff -up ./esc/src/lib/notifytray/notifytray.c.fix9 ./esc/src/lib/notifytray/notifytray.c
|
||||
--- ./esc/src/lib/notifytray/notifytray.c.fix9 2011-03-24 12:57:57.680712175 -0700
|
||||
+++ ./esc/src/lib/notifytray/notifytray.c 2011-03-24 12:58:07.243712165 -0700
|
||||
@@ -239,7 +239,7 @@ void notify_icon_send_tooltip_msg(const
|
||||
}
|
||||
|
||||
g_print("icon %s", icon);
|
||||
- NotifyNotification *not = notify_notification_new(msg_title, message,icon, GTK_WIDGET(notify));
|
||||
+ NotifyNotification *not = notify_notification_new(msg_title, message,icon); /*, GTK_WIDGET(notify));*/
|
||||
|
||||
if(not)
|
||||
{
|
147
esc.spec
147
esc.spec
@ -1,55 +1,78 @@
|
||||
Name: esc
|
||||
Version: 1.1.0
|
||||
Release: 33%{?dist}
|
||||
Version: 1.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Enterprise Security Client Smart Card Client
|
||||
License: GPL+
|
||||
URL: http://directory.fedora.redhat.com/wiki/CoolKey
|
||||
Group: Applications/Internet
|
||||
|
||||
#Fix to build against XUlrunner SDK.
|
||||
Patch1: esc-1.1.0-fix1.patch
|
||||
#Fix to the smart card handling thread
|
||||
Patch2: esc-1.1.0-fix2.patch
|
||||
#Simple fix to some smart card error messages.
|
||||
Patch3: esc-1.1.0-fix3.patch
|
||||
#Add -fno-strict-aliasing compile flag.
|
||||
Patch4: esc-1.1.0-fix4.patch
|
||||
#Fix error with reporting a certain smart card error message.
|
||||
Patch5: esc-1.1.0-fix5.patch
|
||||
#Allow the http library the ability to observe security exceptions for incoming server certs.
|
||||
Patch6: esc-1.1.0-fix6.patch
|
||||
#Ipv6 support for the http library.
|
||||
Patch7: esc-1.1.0-fix7.patch
|
||||
%global freetype_version 2.1.9
|
||||
%global libnotify_version 0.7.0
|
||||
%global libvpx_version 1.0.0
|
||||
|
||||
Patch8: esc-1.1.0-fix8.patch
|
||||
Patch9: esc-1.1.0-fix9.patch
|
||||
Patch10: esc-1.1.0-fix10.patch
|
||||
Patch11: esc-1.1.0-fix11.patch
|
||||
Patch12: esc-1.1.0-fix12.patch
|
||||
Patch13: esc-1.1.0-fix13.patch
|
||||
Patch14: esc-1.1.0-fix14.patch
|
||||
Patch15: esc-1.1.0-fix15.patch
|
||||
Patch16: esc-1.1.0-fix16.patch
|
||||
Patch17: esc-1.1.0-fix17.patch
|
||||
Patch18: esc-1.1.0-fix18.patch
|
||||
Patch19: esc-1.1.0-fix19.patch
|
||||
Patch20: esc-1.1.0-fix20.patch
|
||||
Patch21: esc-1.1.0-fix21.patch
|
||||
Patch22: esc-1.1.0-fix22.patch
|
||||
|
||||
BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1
|
||||
BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel
|
||||
BuildRequires: pango-devel libpng-devel pkgconfig zlib-devel
|
||||
BuildRequires: doxygen fontconfig-devel
|
||||
BuildRequires: glib2-devel atk-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: nspr-devel nss-devel nss-static
|
||||
BuildRequires: autoconf213 libX11-devel libXt-devel
|
||||
BuildRequires: xulrunner xulrunner-devel
|
||||
BuildRequires: libX11-devel libXt-devel
|
||||
|
||||
BuildRequires: pcsc-lite-devel coolkey-devel
|
||||
BuildRequires: desktop-file-utils zip binutils libnotify-devel
|
||||
BuildRequires: desktop-file-utils zip binutils
|
||||
BuildRequires: libnotify-devel >= %{libnotify_version}
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: zip
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libIDL-devel
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: pango-devel
|
||||
BuildRequires: freetype-devel >= %{freetype_version}
|
||||
BuildRequires: libXt-devel
|
||||
BuildRequires: libXrender-devel
|
||||
BuildRequires: hunspell-devel
|
||||
BuildRequires: startup-notification-devel
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: mesa-libGL-devel
|
||||
BuildRequires: libcurl-devel
|
||||
BuildRequires: libvpx-devel >= %{libvpx_version}
|
||||
BuildRequires: autoconf213
|
||||
BuildRequires: pulseaudio-libs-devel
|
||||
BuildRequires: pkgconfig(gconf-2.0)
|
||||
BuildRequires: yasm
|
||||
BuildRequires: dbus-glib-devel
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: sqlite-devel
|
||||
Requires: sqlite
|
||||
|
||||
|
||||
Requires: pcsc-lite coolkey nss nspr
|
||||
Requires: zip dbus >= 0.90 libnotify >= 0.4.2
|
||||
Requires: xulrunner
|
||||
Requires: mozilla-filesystem
|
||||
Requires: nspr-devel
|
||||
Requires: nss-devel
|
||||
Requires: libjpeg-devel
|
||||
Requires: zip
|
||||
Requires: bzip2-devel
|
||||
Requires: zlib-devel
|
||||
Requires: libIDL-devel
|
||||
Requires: gtk2-devel
|
||||
Requires: krb5-devel
|
||||
Requires: pango-devel
|
||||
Requires: freetype-devel >= %{freetype_version}
|
||||
Requires: libXt-devel
|
||||
Requires: libXrender-devel
|
||||
Requires: hunspell-devel
|
||||
Requires: sqlite-devel
|
||||
Requires: startup-notification-devel
|
||||
Requires: alsa-lib-devel
|
||||
Requires: libnotify-devel
|
||||
Requires: mesa-libGL-devel
|
||||
Requires: libvpx-devel >= %{libvpx_version}
|
||||
|
||||
|
||||
# 390 does not have coolkey or smartCards
|
||||
ExcludeArch: s390 s390x
|
||||
@ -57,6 +80,8 @@ ExcludeArch: s390 s390x
|
||||
# We can't allow the internal xulrunner to leak out
|
||||
AutoReqProv: 0
|
||||
|
||||
%define debug_build 0
|
||||
|
||||
#%define __prelink_undo_cmd %{nil}
|
||||
%define escname %{name}-%{version}
|
||||
%define escdir %{_libdir}/%{escname}
|
||||
@ -89,41 +114,19 @@ cryptographic smartcards.
|
||||
|
||||
#patch esc
|
||||
|
||||
%patch1 -p1 -b .fix1
|
||||
%patch2 -p1 -b .fix2
|
||||
%patch3 -p1 -b .fix3
|
||||
%patch4 -p1 -b .fix4
|
||||
%patch5 -p1 -b .fix5
|
||||
%patch6 -p1 -b .fix6
|
||||
%patch7 -p1 -b .fix7
|
||||
%patch8 -p1 -b .fix8
|
||||
%patch9 -p1 -b .fix9
|
||||
%patch10 -p1 -b .fix10
|
||||
%patch11 -p1 -b .fix11
|
||||
%patch12 -p1 -b .fix12
|
||||
%patch13 -p1 -b .fix13
|
||||
%patch14 -p1 -b .fix14
|
||||
%patch15 -p1 -b .fix15
|
||||
%patch16 -p1 -b .fix16
|
||||
%patch17 -p1 -b .fix17
|
||||
%patch18 -p1 -b .fix18
|
||||
%patch19 -p1 -b .fix19
|
||||
%patch20 -p1 -b .fix20
|
||||
%patch21 -p1 -b .fix21
|
||||
%patch22 -p1 -b .fix22
|
||||
|
||||
r=$(uname -r | sed -e 's/\(^[^.]*\.[^.]*\).*/\1/')
|
||||
[ -f esc/coreconf/Linux$r.mk ] || ln -s Linux3.5.mk esc/coreconf/Linux$r.mk
|
||||
|
||||
%build
|
||||
|
||||
echo $RPM_BUILD_DIR
|
||||
%define geckoversion `rpm -qi xulrunner | grep Version | sed 's/[\t ]//g;/^$/d' | sed 's/Version://'`
|
||||
|
||||
|
||||
GECKO_SDK_PATH=%{_libdir}/xulrunner-devel-%{geckoversion}/sdk
|
||||
GECKO_BIN_PATH=%{_libdir}/xulrunner
|
||||
GECKO_BASE_PATH=$RPM_BUILD_DIR/%{escname}/%{name}/src/xulrunner/xulrunner-45.9.0/firefox-45.9.0esr/objdir
|
||||
GECKO_SDK_PATH=$GECKO_BASE_PATH/dist/xulrunner-sdk
|
||||
GECKO_BIN_PATH=$GECKO_BASE_PATH/dist/xulrunner-sdk/sdk/bin
|
||||
GECKO_INCLUDE_PATH=%{_includedir}/xulrunner-%{geckoversion}
|
||||
GECKO_IDL_PATH=/usr/share/idl/xulrunner-%{geckoversion}
|
||||
GECKO_IDL_PATH=$GECKO_BASE_PATH/dist/xulrunner-sdk/idl
|
||||
|
||||
%ifarch x86_64 %{power64} ia64 aarch64
|
||||
USE_64=1
|
||||
@ -143,6 +146,9 @@ cp %{SOURCE3} %{escxuldir}/%{esc_chromepath}
|
||||
rm -f %{escxulchromeicons}/*.ico
|
||||
cp %{escxulchromeicons}/esc-window.xpm %{escxulchromeicons}/default.xpm
|
||||
|
||||
|
||||
#xulrunner based flags.
|
||||
|
||||
make HAVE_LIB_NOTIFY=1 ESC_VERSION=%{version}-%{release} USE_XUL_SDK=1
|
||||
|
||||
%install
|
||||
@ -186,9 +192,9 @@ cd %{_builddir}
|
||||
cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir}
|
||||
|
||||
rm -f $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
rm -rf $RPM_BUILD_ROOT/%{escdir}/xulrunner
|
||||
#rm -rf $RPM_BUILD_ROOT/%{escdir}/xulrunner
|
||||
|
||||
echo "xulrunner ./application.ini \$* &" > $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
echo "xulrunner/xulrunner ./application.ini \$* &" > $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
|
||||
chmod 755 $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
chmod 755 -R $RPM_BUILD_ROOT/%{escdir}/chrome
|
||||
@ -216,7 +222,7 @@ chmod 755 $RPM_BUILD_ROOT/%{escdir}/application.ini
|
||||
|
||||
%{escdir}/defaults/preferences/esc-prefs.js
|
||||
|
||||
#%{escdir}/xulrunner
|
||||
%{escdir}/xulrunner
|
||||
%{icondir}/esc.png
|
||||
%{pixmapdir}/esc.png
|
||||
%{autostartdir}/esc.desktop
|
||||
@ -240,9 +246,8 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-33
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Mon Aug 07 2017 - 1.1.1-1
|
||||
- Rebuilt using internally built xulrunner, due to the xulrunner package going away.
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-32
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user