Compare commits
58 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e434a2be5 | ||
|
|
5b99b06fdf | ||
|
|
d150eec782 | ||
|
|
9f04eed47c | ||
|
|
5a689aa060 | ||
|
|
a803f64e40 | ||
|
|
aaac37d345 | ||
|
|
ec3f4e1fdc | ||
|
|
e550a8864a | ||
|
|
dca0a1441f | ||
|
|
b6b02febb7 | ||
|
|
40395fe83e | ||
|
|
1dcfaf739c | ||
|
|
5e674a7f6d | ||
|
|
4048f11cfb | ||
|
|
233c82c191 | ||
|
|
ea4c49c58f | ||
|
|
bfdbda4c1e | ||
|
|
9fd18e66e4 | ||
|
|
53036c4341 | ||
|
|
79503e3b8a | ||
|
|
ef7af0b456 | ||
|
|
3a7b112a5a | ||
|
|
d091595250 |
||
|
|
87ce85a883 |
||
|
|
e96055cdd7 | ||
|
|
5f2975a440 | ||
|
|
a082559745 | ||
|
|
f2041c7865 | ||
|
|
379ec37680 | ||
|
|
2880b74454 | ||
|
|
6dbb4cff1a | ||
|
|
68c2f3438a | ||
|
|
99f187ef66 | ||
|
|
4295b786fa | ||
|
|
e658852015 | ||
|
|
662e4a437a | ||
|
|
61e6bb68f9 | ||
|
|
5be5f4beae | ||
|
|
bdb75acd08 | ||
|
|
c37e6755d5 | ||
|
|
d26bd9f634 | ||
|
|
277406e596 | ||
|
|
a50d5db220 | ||
|
|
e527b752d3 | ||
|
|
856e0127d6 | ||
|
|
75c7cc1fc3 | ||
|
|
d13cbbfc7a | ||
|
|
b4c1001acf | ||
|
|
7b7c1ced14 | ||
|
|
455fee806d | ||
|
|
4f5ee4dfac | ||
|
|
4648dcbfc8 | ||
|
|
cc41e8a6f6 | ||
|
|
28585e491c | ||
|
|
c3146bacac | ||
|
|
fcd865bf4f | ||
|
|
047eb609cd |
34 changed files with 5648 additions and 3127 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1,3 @@
|
|||
esc-1.1.0.tar.bz2
|
||||
/esc-1.1.1.tar.bz2
|
||||
/esc-1.1.2.tar.bz2
|
||||
|
|
|
|||
150
esc
150
esc
|
|
@ -18,153 +18,17 @@
|
|||
# END COPYRIGHT BLOCK
|
||||
|
||||
|
||||
DO_FORCEMODE="false"
|
||||
DO_SHOW_VERSION="false"
|
||||
ESC_ARGS=
|
||||
ESC_PATH=/usr/lib64/esc-1.1.2
|
||||
ESC_BIN=esc.js
|
||||
ESC_EXEC=gjs
|
||||
|
||||
|
||||
ESC_PROFILE_BASE=~/.redhat/esc
|
||||
ESC_LOG_FILE=esc.log
|
||||
|
||||
ESC_PATH=$LIBDIR/esc-1.1.0
|
||||
ESC_BIN_PATH=/usr/bin
|
||||
ESC_EXEC=esc
|
||||
ESCD_EXEC=escd
|
||||
|
||||
ESC_BIN=$ESC_PATH/xulrunner/xulrunner-bin
|
||||
ESCD_BIN=./$ESCD_EXEC
|
||||
|
||||
LAST_PROG_PID=0
|
||||
SIGUSR1=10
|
||||
|
||||
FORCE_START_ESC=
|
||||
|
||||
XPTI_DAT=xpti.dat
|
||||
COMPREG_DAT=compreg.dat
|
||||
LOCK_FILE=lock
|
||||
PARENT_LOCK_FILE=.parentlock
|
||||
|
||||
function isProgRunning {
|
||||
|
||||
userID=$(whoami)
|
||||
isProgRunning=$(pgrep -U $userID -f $1)
|
||||
if [ $isProgRunning ];
|
||||
then
|
||||
LAST_PROG_PID=$isProgRunning
|
||||
return 0
|
||||
fi
|
||||
LAST_PROG_PID=0
|
||||
return 1
|
||||
}
|
||||
|
||||
function removeFile {
|
||||
|
||||
rm -f $1
|
||||
}
|
||||
|
||||
function cleanupProfile {
|
||||
|
||||
removeFile $ESC_PROFILE_BASE/*default/$XPTI_DAT
|
||||
removeFile $ESC_PROFILE_BASE/*default/$COMPREG_DAT
|
||||
removeFile $ESC_PROFILE_BASE/*default/$LOCK_FILE
|
||||
removeFile $ESC_PROFILE_BASE/*default/$PARENT_LOCK_FILE
|
||||
|
||||
}
|
||||
|
||||
function processArgs {
|
||||
|
||||
for arg in $1
|
||||
do
|
||||
|
||||
#echo "theArg: $arg"
|
||||
if [ $arg == "forceStartESC" ]
|
||||
then
|
||||
#echo "Do force mode!"
|
||||
FORCE_START_ESC="true"
|
||||
fi
|
||||
|
||||
if [ $arg == "keyInserted" ]
|
||||
then
|
||||
FORCE_START_ESC="true"
|
||||
fi
|
||||
|
||||
if [ $arg == "-version" ]
|
||||
then
|
||||
#echo "Do show version!"
|
||||
DO_SHOW_VERSION="true"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
processArgs $*
|
||||
|
||||
if [ ! -d $ESC_PROFILE_BASE ]
|
||||
then
|
||||
mkdir -p $ESC_PROFILE_BASE
|
||||
fi
|
||||
export OPENSC_CONF=$ESC_PATH/opensc.esc.conf
|
||||
export GI_TYPELIB_PATH=$ESC_PATH/lib/girepository-1.0
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ESC_PATH/lib
|
||||
|
||||
cd $ESC_PATH
|
||||
|
||||
#First check if we just want the version
|
||||
|
||||
if [ $DO_SHOW_VERSION == "true" ]
|
||||
then
|
||||
#echo "try to run the version command!"
|
||||
ESC_ARGS="-version"
|
||||
./$ESC_EXEC $ESC_ARGS
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Start up the daemon if it is not running
|
||||
|
||||
isProgRunning $ESCD_BIN
|
||||
|
||||
if [ $LAST_PROG_PID -gt 0 ]
|
||||
then
|
||||
false
|
||||
#echo "escd already running."
|
||||
else
|
||||
#echo "escd not running start."
|
||||
cleanupProfile
|
||||
./$ESCD_EXEC --key_Inserted=\"/usr/bin/esc\" --on_Signal=\"/usr/bin/esc\"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Now check to see if we wer signaled from the daemon
|
||||
|
||||
if [ $FORCE_START_ESC ]
|
||||
then
|
||||
#echo "force start esc."
|
||||
|
||||
#Check to see if esc is already running
|
||||
|
||||
isProgRunning $ESC_BIN
|
||||
if [ $LAST_PROG_PID -gt 0 ]
|
||||
then
|
||||
#echo "attempting a force start but already running ... exit."
|
||||
exit 0
|
||||
fi
|
||||
#echo "force start esc not running start esc..."
|
||||
./$ESC_EXEC
|
||||
exit 0
|
||||
fi
|
||||
|
||||
isProgRunning $ESC_BIN
|
||||
|
||||
if [ $LAST_PROG_PID -gt 0 ]
|
||||
then
|
||||
#echo "esc already running."
|
||||
./$ESC_EXEC
|
||||
exit 0
|
||||
else
|
||||
#echo "esc not already running start up and bring up window."
|
||||
./$ESC_EXEC &
|
||||
sleep 4
|
||||
#echo "done sleeping bring up esc window."
|
||||
./$ESC_EXEC
|
||||
exit 0
|
||||
fi
|
||||
$ESC_EXEC ./$ESC_BIN &
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,85 +0,0 @@
|
|||
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix8 2008-01-18 10:05:09.000000000 -0800
|
||||
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2008-01-18 10:05:47.000000000 -0800
|
||||
@@ -817,7 +817,7 @@
|
||||
NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN(PRUint32 aKeyType, const char *aKeyID, const char *aScreenName, const char *aPIN, const char *aScreenNamePwd)
|
||||
{
|
||||
char tBuff[56];
|
||||
- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key PIN, ID: %s \n",GetTStamp(tBuff,56),aKeyID);
|
||||
+ ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key Password, ID: %s \n",GetTStamp(tBuff,56),aKeyID);
|
||||
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
|
||||
|
||||
if (!node)
|
||||
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix8 2008-01-18 10:06:00.000000000 -0800
|
||||
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2008-01-18 10:06:09.000000000 -0800
|
||||
@@ -49,9 +49,15 @@
|
||||
char tBuff[56];
|
||||
GtkWidget *icon_box_widget = GTK_WIDGET(user_data);
|
||||
|
||||
+
|
||||
if(icon_box_widget)
|
||||
{
|
||||
+ GdkScreen* gscreen = gdk_screen_get_default();
|
||||
GdkWindow* window = icon_box_widget->window;
|
||||
+
|
||||
+ if(!window)
|
||||
+ return;
|
||||
+
|
||||
|
||||
gint width;
|
||||
gint height;
|
||||
@@ -59,20 +65,37 @@
|
||||
gint px;
|
||||
gint py;
|
||||
|
||||
+ gint screen_width = 0;
|
||||
+ gint screen_height = 0;
|
||||
+
|
||||
+ if(gscreen)
|
||||
+ {
|
||||
+ screen_width = gdk_screen_get_width(gscreen);
|
||||
+ screen_height = gdk_screen_get_height(gscreen);
|
||||
+ }
|
||||
+
|
||||
gdk_drawable_get_size(window,&width,&height);
|
||||
|
||||
- gdk_window_get_position(window,
|
||||
+ gdk_window_get_origin(window,
|
||||
&px,
|
||||
&py);
|
||||
|
||||
- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d \n",GetTStamp(tBuff,56),width,height,px,py));
|
||||
+ PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d *x %d *y %d screen_w %d screen_h %d \n",GetTStamp(tBuff,56),width,height,px,py,*x,*y,screen_width, screen_height));
|
||||
+
|
||||
+ // Are we close to the bottom of the screen?
|
||||
|
||||
+ if( screen_width > 0 && screen_height > 0
|
||||
+ && ( screen_height - py) < (height * 3))
|
||||
+ {
|
||||
+ height = height* -2 ;
|
||||
+ }
|
||||
|
||||
gint x_coord = px;
|
||||
gint y_coord = (py + height);
|
||||
|
||||
*x = x_coord;
|
||||
*y = y_coord;
|
||||
+ *push_in = TRUE;
|
||||
|
||||
}
|
||||
|
||||
--- ./esc/src/app/xul/esc/application.ini.fix8 2008-01-18 10:04:33.000000000 -0800
|
||||
+++ ./esc/src/app/xul/esc/application.ini 2008-01-18 10:04:43.000000000 -0800
|
||||
@@ -25,11 +25,11 @@
|
||||
Name=ESC
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
-Version=1.0.1-7
|
||||
+Version=1.0.1-8
|
||||
;
|
||||
; 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,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,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,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)
|
||||
{
|
||||
33
esc-1.1.2-fix1.patch
Normal file
33
esc-1.1.2-fix1.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
diff -up ./esc/src/lib/coolkey/Makefile.am.fix1 ./esc/src/lib/coolkey/Makefile.am
|
||||
--- ./esc/src/lib/coolkey/Makefile.am.fix1 2018-10-08 14:04:44.963523599 -0700
|
||||
+++ ./esc/src/lib/coolkey/Makefile.am 2018-10-08 14:06:18.605022660 -0700
|
||||
@@ -54,6 +54,7 @@ lib_LTLIBRARIES += libCoolkey-1.0.la
|
||||
libCoolkey_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../nss-http-client
|
||||
libCoolkey_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../nss-http-client
|
||||
libCoolkey_1_0_la_LIBADD = $(COOLKEY_LIBS)
|
||||
+libCoolkey_1_0_la_LDFLAGS = -Wl,-z,now
|
||||
libCoolkey_1_0_la_SOURCES = $(source_c) $(source_cpp)
|
||||
|
||||
coolkeyincludedir = $(includedir)/src/lib/coolkey
|
||||
diff -up ./esc/src/lib/coolkey-mgr/Makefile.am.fix1 ./esc/src/lib/coolkey-mgr/Makefile.am
|
||||
--- ./esc/src/lib/coolkey-mgr/Makefile.am.fix1 2018-10-08 14:04:30.132602938 -0700
|
||||
+++ ./esc/src/lib/coolkey-mgr/Makefile.am 2018-10-08 14:05:38.265238463 -0700
|
||||
@@ -59,6 +59,7 @@ source_cpp = \
|
||||
|
||||
lib_LTLIBRARIES += libcoolkeymgr-1.0.la
|
||||
libcoolkeymgr_1_0_la_LIBADD = $(COOLKEY_MGR_LIBS) $(ESC_LIBS) $(OTHER_LIBS)
|
||||
+libcoolkeymgr_1_0_la_LDFLAGS = -Wl,-z,now
|
||||
libcoolkeymgr_1_0_la_SOURCES = $(source_c) $(source_cpp) $(source_h)
|
||||
|
||||
coolkeymgrincludedir = $(includedir)/coolkey-mgr
|
||||
diff -up ./esc/src/lib/nss-http-client/Makefile.am.fix1 ./esc/src/lib/nss-http-client/Makefile.am
|
||||
--- ./esc/src/lib/nss-http-client/Makefile.am.fix1 2018-10-08 14:04:57.302457592 -0700
|
||||
+++ ./esc/src/lib/nss-http-client/Makefile.am 2018-10-08 14:06:44.701883050 -0700
|
||||
@@ -52,6 +52,7 @@ lib_LTLIBRARIES += libNssHttpClient-1.0.
|
||||
#libNssHttpClient_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -DLINUX -I ../coolkey
|
||||
libNssHttpClient_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../coolkey @DEFS@
|
||||
libNssHttpClient_1_0_la_LIBADD = $(COOLKEY_LIBS)
|
||||
+libNssHttpClient_1_0_la_LDFLAGS = -Wl,-z,now
|
||||
libNssHttpClient_1_0_la_SOURCES = $(source_c) $(source_cpp) $(source_h)
|
||||
|
||||
coolkeyincludedir = $(includedir)/src/lib/coolkey
|
||||
291
esc-1.1.2-fix10.patch
Normal file
291
esc-1.1.2-fix10.patch
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
diff -up ./esc/esc-1.1.2/esc/src/app/esc.js.fix10 ./esc/esc-1.1.2/esc/src/app/esc.js
|
||||
--- ./esc/src/app/esc.js.fix10 2020-12-02 15:47:00.688951279 -0800
|
||||
+++ ./esc/src/app/esc.js 2020-12-02 15:47:00.690951273 -0800
|
||||
@@ -370,12 +370,20 @@ class ESC {
|
||||
let nick = "";
|
||||
if(certObj.token == null)
|
||||
token = "internal";
|
||||
- else
|
||||
+ else {
|
||||
token = certObj.token;
|
||||
+ }
|
||||
|
||||
nick = certObj.nick;
|
||||
-
|
||||
- certDetail = this._execProgram(['/usr/bin/certutil','-L','-d', this._getConfigPath(), '-h', token, '-f' , pFileName, '-n', token + ":" + nick]);
|
||||
+
|
||||
+ let tokenNick = '"' + token + ":" + nick + '"' ;
|
||||
+ token = '"' + token + '"';
|
||||
+ let argv1 = ['/usr/bin/certutil','-L','-d', this._getConfigPath(), '-h', token, '-f' , pFileName, '-n', tokenNick];
|
||||
+
|
||||
+ print("argv1: " + argv1);
|
||||
+
|
||||
+
|
||||
+ certDetail = this._execProgram(argv1);
|
||||
|
||||
return certDetail;
|
||||
}
|
||||
@@ -475,7 +483,7 @@ class ESC {
|
||||
result = -1;
|
||||
return result;
|
||||
}
|
||||
-
|
||||
+
|
||||
result = stdoutb.toString();
|
||||
|
||||
} catch (e) {
|
||||
@@ -792,19 +800,18 @@ class ESC {
|
||||
let status = this._selectedTokenInfo.status;
|
||||
|
||||
if(status == 4 /* enrolled */) {
|
||||
- this._pinMgr = new PinDialog.pinDialog(this);
|
||||
- this._pinMgr.launchPinPrompt(this._promptPinDone.bind(this));
|
||||
+ let coolkey_token = this._selectedTokenInfo;
|
||||
+
|
||||
+ this._tokenInfoBuffer.text +=
|
||||
+ this.mgr.get_certs_info(coolkey_token);
|
||||
+
|
||||
}
|
||||
|
||||
}
|
||||
- _promptPinDone(tempFileName) {
|
||||
-
|
||||
- let coolkey_token = this._selectedTokenInfo;
|
||||
-
|
||||
- this._tokenInfoBuffer.text +=
|
||||
- this._getCertList(coolkey_token,tempFileName) + "\n";
|
||||
|
||||
+ _promptPinDone(tempFileName) {
|
||||
}
|
||||
+
|
||||
_response_cb() {
|
||||
if(this._messageDialog) {
|
||||
this._messageDialog.destroy();
|
||||
diff -up ./esc/src/app/opensc.esc.conf.fix10 ./esc/src/app/opensc.esc.conf
|
||||
--- ./esc/src/app/opensc.esc.conf.fix10 2020-12-02 15:51:05.812283690 -0800
|
||||
+++ ./esc/src/app/opensc.esc.conf 2020-12-02 15:51:30.835215539 -0800
|
||||
@@ -94,6 +94,7 @@ app default {
|
||||
module_path = /usr/lib64;
|
||||
}
|
||||
framework pkcs15 {
|
||||
+ use_file_caching = true;
|
||||
builtin_emulators = coolkey, cac, cac1, PIV-II;
|
||||
}
|
||||
}
|
||||
diff -up ./esc/src/app/pinDialog.js.fix10 ./esc/src/app/pinDialog.js
|
||||
--- ./esc/src/app/pinDialog.js.fix10 2020-12-02 15:47:00.683951293 -0800
|
||||
+++ ./esc/src/app/pinDialog.js 2020-12-02 15:47:00.691951271 -0800
|
||||
@@ -94,7 +94,6 @@ pinDialog.prototype = {
|
||||
if(this.notify) {
|
||||
this.notify(this.tempFileName);
|
||||
}
|
||||
-
|
||||
this.clearTempFile();
|
||||
this.dialog.destroy();
|
||||
this.dialog = null;
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix10 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix10 2020-12-02 16:25:29.075670723 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2020-12-02 16:30:53.310789119 -0800
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
static const char *cac_manu_id= "Common Access Card";
|
||||
static const char *piv_manu_id= "piv II ";
|
||||
+static const char *piv_manu_id_1= "piv_II";
|
||||
|
||||
//static char *test_extended_login = "s=325&msg_type=13&invalid_login=0&blocked=0&error=&required_parameter0=id%3DUSER%5FID%26name%3DUser+ID%26desc%3DUser+ID%26type%3Dstring%26option%3Doption1%2Coption2%2Coption3&required_parameter1=id%3DUSER%5FPWD%26name%3DUser+Password%26desc%3DUser+Password%26type%3Dpassword%26option%3D&required_parameter2=id%3DUSER%5FPIN%26name%3DPIN%26desc%3DOne+time+PIN+received+via+mail%26type%3Dpassword%26option%3D";
|
||||
|
||||
@@ -2300,7 +2301,9 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
if(!memcmp( tokenInfo.manufacturerID,cac_manu_id,strlen(cac_manu_id ))) {
|
||||
isACAC = 1;
|
||||
} else if(!memcmp(tokenInfo.manufacturerID, piv_manu_id, strlen(piv_manu_id))) {
|
||||
- isAPIV = 1;
|
||||
+ isAPIV = 1;
|
||||
+ } else if(!memcmp(tokenInfo.manufacturerID, piv_manu_id_1, strlen(piv_manu_id_1))) {
|
||||
+ isAPIV = 1;
|
||||
} else {
|
||||
isACOOLKey = 1;
|
||||
}
|
||||
diff -up ./esc/src/lib/coolkey-mgr/coolkey-api.cpp.fix10 ./esc/src/lib/coolkey-mgr/coolkey-api.cpp
|
||||
--- ./esc/src/lib/coolkey-mgr/coolkey-api.cpp.fix10 2020-12-02 15:47:00.673951320 -0800
|
||||
+++ ./esc/src/lib/coolkey-mgr/coolkey-api.cpp 2020-12-02 15:47:00.691951271 -0800
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "coolkey-api.h"
|
||||
#include "rhCoolKey.h"
|
||||
+#include <string>
|
||||
+
|
||||
|
||||
static rhCoolKey *coolkey = NULL;
|
||||
static const char * coolkeyDbusName = NULL;
|
||||
@@ -79,6 +81,54 @@ char *coolkey_get_phone_home(char *url)
|
||||
}
|
||||
}
|
||||
|
||||
+/* get a string with all the certs detail for a token */
|
||||
+
|
||||
+char *coolkey_get_certs_info(int keyType, const char *keyID) {
|
||||
+
|
||||
+ string str_result;
|
||||
+ if (coolkey == NULL) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ char *result = NULL;
|
||||
+ char **names = NULL;
|
||||
+ PRUint32 count = 0;
|
||||
+ HRESULT res = coolkey->GetCoolKeyCertNicknames(keyType, keyID, &count, &names);
|
||||
+
|
||||
+ if(count > 0 && res == S_OK) {
|
||||
+ for(int i = 0 ; i < count ; i++) {
|
||||
+ char *curName = names[i];
|
||||
+
|
||||
+ if(curName) {
|
||||
+ char *certDetail = NULL;
|
||||
+ str_result = str_result + curName + "\n" ;
|
||||
+ res = coolkey->GetCoolKeyCertInfo(keyType, keyID, curName, &certDetail);
|
||||
+ if(res == S_OK && certDetail != NULL) {
|
||||
+ str_result = str_result + certDetail + "\n";
|
||||
+ PL_strfree(certDetail);
|
||||
+ certDetail = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if(str_result.c_str()) {
|
||||
+ result = PL_strdup((char *) str_result.c_str());
|
||||
+ }
|
||||
+
|
||||
+ for(int i = 0 ; i < count ; i++) {
|
||||
+ if(names[i]) {
|
||||
+ PL_strfree(names[i]);
|
||||
+ names[i] = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ PR_Free(names);
|
||||
+ names = NULL;
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
|
||||
/* get a block of data about a token in a structure format */
|
||||
tokenInfo *coolkey_get_token_info(int keyType, const char *keyID) {
|
||||
diff -up ./esc/src/lib/coolkey-mgr/coolkey-api.h.fix10 ./esc/src/lib/coolkey-mgr/coolkey-api.h
|
||||
--- ./esc/src/lib/coolkey-mgr/coolkey-api.h.fix10 2020-12-02 15:47:00.673951320 -0800
|
||||
+++ ./esc/src/lib/coolkey-mgr/coolkey-api.h 2020-12-02 15:47:00.691951271 -0800
|
||||
@@ -43,6 +43,8 @@ void coolkey_init(const char *db_dir, co
|
||||
void coolkey_destroy();
|
||||
|
||||
char *coolkey_get_phone_home(char *url);
|
||||
+char *coolkey_get_certs_info(int keyType, const char *keyID);
|
||||
+
|
||||
tokenInfo *coolkey_get_token_info(int keyType,const char *keyID);
|
||||
void coolkey_free_token_info(tokenInfo *tInfo);
|
||||
|
||||
diff -up ./esc/src/lib/coolkey-mgr/coolkey-mgr.c.fix10 ./esc/src/lib/coolkey-mgr/coolkey-mgr.c
|
||||
--- ./esc/src/lib/coolkey-mgr/coolkey-mgr.c.fix10 2020-12-02 15:47:00.673951320 -0800
|
||||
+++ ./esc/src/lib/coolkey-mgr/coolkey-mgr.c 2020-12-02 15:47:00.691951271 -0800
|
||||
@@ -346,6 +346,36 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
+gchar*
|
||||
+coolkey_mgr_get_certs_info(CoolkeyMgr *self, CoolkeyToken* token) {
|
||||
+
|
||||
+ gchar *cuid = NULL;
|
||||
+ gchar *keyType = NULL;
|
||||
+ int keyTypeInt = 0;
|
||||
+ gchar *certInfo = NULL;
|
||||
+
|
||||
+ g_object_get(token,"key_type", &keyType,NULL);
|
||||
+ g_object_get(token,"cuid", &cuid, NULL);
|
||||
+
|
||||
+ if(keyType == NULL || cuid == NULL) {
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ keyTypeInt = atoi(keyType);
|
||||
+
|
||||
+ if(keyType == NULL || cuid == NULL) {
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ certInfo = coolkey_get_certs_info(keyTypeInt, cuid);
|
||||
+
|
||||
+cleanup:
|
||||
+
|
||||
+ g_free (keyType);
|
||||
+ g_free (cuid);
|
||||
+
|
||||
+ return certInfo;
|
||||
+}
|
||||
|
||||
void
|
||||
coolkey_mgr_get_token_info(CoolkeyMgr* self, CoolkeyToken* token) {
|
||||
diff -up ./esc/src/lib/coolkey-mgr/coolkey-mgr.h.fix10 ./esc/src/lib/coolkey-mgr/coolkey-mgr.h
|
||||
--- ./esc/src/lib/coolkey-mgr/coolkey-mgr.h.fix10 2020-12-02 15:47:00.673951320 -0800
|
||||
+++ ./esc/src/lib/coolkey-mgr/coolkey-mgr.h 2020-12-02 15:47:00.691951271 -0800
|
||||
@@ -46,6 +46,8 @@ int coolkey_mgr_cancel_token_operation(C
|
||||
|
||||
void coolkey_mgr_get_token_info(CoolkeyMgr* self, CoolkeyToken* token);
|
||||
|
||||
+gchar * coolkey_mgr_get_certs_info(CoolkeyMgr*self, CoolkeyToken* token);
|
||||
+
|
||||
gchar * coolkey_mgr_phone_home(CoolkeyMgr* self, gchar *url);
|
||||
|
||||
gchar * coolkey_mgr_speak (CoolkeyMgr* self, gchar *words);
|
||||
diff -up ./esc/src/lib/coolkey/NSSManager.cpp.fix10 ./esc/src/lib/coolkey/NSSManager.cpp
|
||||
--- ./esc/src/lib/coolkey/NSSManager.cpp.fix10 2020-12-02 15:47:00.680951301 -0800
|
||||
+++ ./esc/src/lib/coolkey/NSSManager.cpp 2020-12-02 15:47:00.691951271 -0800
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
-
|
||||
+#include <algorithm>
|
||||
#include "SlotUtils.h"
|
||||
|
||||
static PRLogModuleInfo *coolKeyLogNSS = PR_NewLogModule("coolKeyNSS");
|
||||
@@ -314,7 +314,10 @@ NSSManager::GetKeyCertNicknames( const C
|
||||
CERTCertificate *cert = node->cert;
|
||||
if(cert)
|
||||
{
|
||||
- if(cert->slot != slot)
|
||||
+ char *certSlotName = PK11_GetSlotName(cert->slot);
|
||||
+ char *slotName = PK11_GetSlotName(slot);
|
||||
+
|
||||
+ if(strcmp(certSlotName, slotName))
|
||||
{
|
||||
CERT_RemoveCertListNode(node);
|
||||
}
|
||||
@@ -346,7 +349,10 @@ NSSManager::GetKeyCertNicknames( const C
|
||||
PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetCertKeyNicknames name %s \n",GetTStamp(tBuff,56),curName));
|
||||
|
||||
string str = curName;
|
||||
- aStrings.push_back (str);
|
||||
+
|
||||
+ if (find(aStrings.begin(), aStrings.end(), str) == aStrings.end()) {
|
||||
+ aStrings.push_back (str);
|
||||
+ }
|
||||
}
|
||||
|
||||
CERT_FreeNicknames(nicknames);
|
||||
@@ -691,6 +697,16 @@ HRESULT NSSManager::GetKeyCertInfo(const
|
||||
aCertInfo = issuedToCNStr + "\n" + issuerCNStr + "\n"
|
||||
+ notBeforeStr + "\n" + notAfterStr + "\n" + serialStr ;
|
||||
PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo issuerCN %s issuedToCN %s \n",GetTStamp(tBuff,56),issuerCN, issuedToCN));
|
||||
+
|
||||
+ if(nBefore) {
|
||||
+ PORT_Free(nBefore);
|
||||
+ nBefore = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if(nAfter) {
|
||||
+ PORT_Free(nAfter);
|
||||
+ nAfter = NULL;
|
||||
+ }
|
||||
|
||||
break;
|
||||
}
|
||||
58
esc-1.1.2-fix11.patch
Normal file
58
esc-1.1.2-fix11.patch
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
diff -up ./esc/src/lib/coolkey/Makefile.am.fix11 ./esc/src/lib/coolkey/Makefile.am
|
||||
--- ./esc/src/lib/coolkey/Makefile.am.fix11 2021-09-23 15:54:17.207378817 -0700
|
||||
+++ ./esc/src/lib/coolkey/Makefile.am 2021-09-23 17:36:26.312894242 -0700
|
||||
@@ -24,6 +24,7 @@ EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
lib_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
+COOLKEY_CFLAGS=-D_FORTIFY_SOURCE=2 -fcf-protection=full
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(COOLKEY_CFLAGS) \
|
||||
@@ -51,8 +52,8 @@ source_c = \
|
||||
|
||||
lib_LTLIBRARIES += libCoolkey-1.0.la
|
||||
|
||||
-libCoolkey_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../nss-http-client
|
||||
-libCoolkey_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../nss-http-client
|
||||
+libCoolkey_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ $(AM_CFLAGS) -I ../nss-http-client
|
||||
+libCoolkey_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ $(AM_CPPFLAGS) -I ../nss-http-client
|
||||
libCoolkey_1_0_la_LIBADD = $(COOLKEY_LIBS)
|
||||
libCoolkey_1_0_la_LDFLAGS = -Wl,-z,now
|
||||
libCoolkey_1_0_la_SOURCES = $(source_c) $(source_cpp)
|
||||
diff -up ./esc/src/lib/coolkey-mgr/Makefile.am.fix11 ./esc/src/lib/coolkey-mgr/Makefile.am
|
||||
--- ./esc/src/lib/coolkey-mgr/Makefile.am.fix11 2021-09-23 17:37:12.680837943 -0700
|
||||
+++ ./esc/src/lib/coolkey-mgr/Makefile.am 2021-09-23 18:25:02.611294039 -0700
|
||||
@@ -24,8 +24,9 @@ EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
lib_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
+COOLKEY_MGR_CFLAGS=-fcf-protection=full
|
||||
|
||||
-OTHER_CPPFLAGS = -I ../coolkey $(PCSC_CFLAGS)
|
||||
+OTHER_CPPFLAGS = -I ../coolkey $(PCSC_CFLAGS) $(COOLKEY_MGR_CFLAGS)
|
||||
OTHER_LIBS = -L../coolkey/.libs -lCoolkey-1.0 -L../nss-http-client/.libs -lNssHttpClient-1.0 $(DBUS_LIBS)
|
||||
ESC_CFLAGS += $(DBUS_CFLAGS)
|
||||
|
||||
diff -up ./esc/src/lib/nss-http-client/Makefile.am.fix11 ./esc/src/lib/nss-http-client/Makefile.am
|
||||
--- ./esc/src/lib/nss-http-client/Makefile.am.fix11 2021-09-23 16:09:43.841312015 -0700
|
||||
+++ ./esc/src/lib/nss-http-client/Makefile.am 2021-09-23 17:36:44.518872136 -0700
|
||||
@@ -24,6 +24,7 @@ EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
lib_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
+NSS_HTTP_CLIENT_CFLAGS=-D_FORTIFY_SOURCE=2 -fcf-protection=full
|
||||
AM_CPPFLAGS += \
|
||||
$(NSS_HTTP_CLIENT_CFLAGS) \
|
||||
$(NULL)
|
||||
@@ -49,8 +50,8 @@ source_c = \
|
||||
MYDEFS = @DEFS@
|
||||
lib_LTLIBRARIES += libNssHttpClient-1.0.la
|
||||
|
||||
-#libNssHttpClient_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -DLINUX -I ../coolkey
|
||||
-libNssHttpClient_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../coolkey @DEFS@
|
||||
+#libNssHttpClient_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -DLINUX $(AM_CFLAGS) -I ../coolkey
|
||||
+libNssHttpClient_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ $(AM_CPPFLAGS) -I ../coolkey @DEFS@
|
||||
libNssHttpClient_1_0_la_LIBADD = $(COOLKEY_LIBS)
|
||||
libNssHttpClient_1_0_la_LDFLAGS = -Wl,-z,now
|
||||
libNssHttpClient_1_0_la_SOURCES = $(source_c) $(source_cpp) $(source_h)
|
||||
70
esc-1.1.2-fix12.patch
Normal file
70
esc-1.1.2-fix12.patch
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
diff -up ./esc/configure.ac.fix12 ./esc/configure.ac
|
||||
--- ./esc/configure.ac.fix12 2021-09-27 14:53:49.932567105 -0700
|
||||
+++ ./esc/configure.ac 2021-09-27 15:31:30.949185258 -0700
|
||||
@@ -47,6 +47,30 @@ PKG_CHECK_MODULES([DBUS],[dbus-1])
|
||||
AC_PROG_CC_STDC
|
||||
|
||||
# Compiler flags
|
||||
+
|
||||
+AC_CANONICAL_HOST
|
||||
+ARCH_CPPFLAGS=""
|
||||
+ARCH_CFLAGS=""
|
||||
+
|
||||
+AS_CASE([$host_os],
|
||||
+ [linux*],
|
||||
+ [
|
||||
+ AS_CASE([$host_cpu],
|
||||
+ [x86_64],
|
||||
+ [
|
||||
+ ARCH_CPPFLAGS="-fcf-protection=full"
|
||||
+ ARCH_CFLAGS="-fcf-protection=full"
|
||||
+ ],
|
||||
+ [i?86],
|
||||
+ [
|
||||
+ ARCH_CPPFLAGS="-fcf-protection=full"
|
||||
+ ARCH_CFLAGS="-fcf-protection=full"
|
||||
+ ])
|
||||
+ ])
|
||||
+AC_SUBST(ARCH_CPPFLAGS)
|
||||
+AC_SUBST(ARCH_CFLAGS)
|
||||
+
|
||||
+
|
||||
ESC_CFLAGS="$GOBJECT_CFLAGS"
|
||||
ESC_LIBS="$GOBJECT_LIBS $NSS_LIBS"
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/Makefile.am.fix12 ./esc/src/lib/coolkey/Makefile.am
|
||||
--- ./esc/src/lib/coolkey/Makefile.am.fix12 2021-09-27 15:26:24.130634037 -0700
|
||||
+++ ./esc/src/lib/coolkey/Makefile.am 2021-09-27 15:27:24.332545740 -0700
|
||||
@@ -24,7 +24,7 @@ EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
lib_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
-COOLKEY_CFLAGS=-D_FORTIFY_SOURCE=2 -fcf-protection=full
|
||||
+COOLKEY_CFLAGS=-D_FORTIFY_SOURCE=2 $(ARCH_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(COOLKEY_CFLAGS) \
|
||||
diff -up ./esc/src/lib/coolkey-mgr/Makefile.am.fix12 ./esc/src/lib/coolkey-mgr/Makefile.am
|
||||
--- ./esc/src/lib/coolkey-mgr/Makefile.am.fix12 2021-09-27 15:34:18.400943562 -0700
|
||||
+++ ./esc/src/lib/coolkey-mgr/Makefile.am 2021-09-27 15:34:51.020896480 -0700
|
||||
@@ -24,7 +24,7 @@ EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
lib_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
-COOLKEY_MGR_CFLAGS=-fcf-protection=full
|
||||
+COOLKEY_MGR_CFLAGS=$(ARCH_CFLAGS)
|
||||
|
||||
OTHER_CPPFLAGS = -I ../coolkey $(PCSC_CFLAGS) $(COOLKEY_MGR_CFLAGS)
|
||||
OTHER_LIBS = -L../coolkey/.libs -lCoolkey-1.0 -L../nss-http-client/.libs -lNssHttpClient-1.0 $(DBUS_LIBS)
|
||||
diff -up ./esc/src/lib/nss-http-client/Makefile.am.fix12 ./esc/src/lib/nss-http-client/Makefile.am
|
||||
--- ./esc/src/lib/nss-http-client/Makefile.am.fix12 2021-09-27 15:33:16.482032935 -0700
|
||||
+++ ./esc/src/lib/nss-http-client/Makefile.am 2021-09-27 15:34:04.524963592 -0700
|
||||
@@ -24,7 +24,7 @@ EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
lib_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
-NSS_HTTP_CLIENT_CFLAGS=-D_FORTIFY_SOURCE=2 -fcf-protection=full
|
||||
+NSS_HTTP_CLIENT_CFLAGS=-D_FORTIFY_SOURCE=2 $(ARCH_CFLAGS)
|
||||
AM_CPPFLAGS += \
|
||||
$(NSS_HTTP_CLIENT_CFLAGS) \
|
||||
$(NULL)
|
||||
104
esc-1.1.2-fix13.patch
Normal file
104
esc-1.1.2-fix13.patch
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
diff -up ./esc/src/app/esc.js.fix13 ./esc/src/app/esc.js
|
||||
--- ./esc/src/app/esc.js.fix13 2022-06-29 16:03:45.002292355 -0700
|
||||
+++ ./esc/src/app/esc.js 2022-06-29 16:04:40.594027223 -0700
|
||||
@@ -581,7 +581,6 @@ class ESC {
|
||||
this._configFile = new GLib.KeyFile();
|
||||
|
||||
this._configPath = GLib.get_user_config_dir() + "/esc";
|
||||
-
|
||||
let configDir = Gio.File.new_for_path(this._configPath);
|
||||
|
||||
try {
|
||||
@@ -606,6 +605,9 @@ class ESC {
|
||||
this._configFile.save_to_file(this._configFileName);
|
||||
}
|
||||
}
|
||||
+ _initConfigTokenManuIDs() {
|
||||
+ this._setConfigValue("esc.token.manu_id.0","Volkswagen AG");
|
||||
+ }
|
||||
|
||||
_buildUI() {
|
||||
// Create the application window
|
||||
@@ -637,6 +639,7 @@ class ESC {
|
||||
|
||||
|
||||
this._initConfig();
|
||||
+ this._initConfigTokenManuIDs();
|
||||
this._initProperties();
|
||||
|
||||
this._statusMessages = null;
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix13 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix13 2022-06-29 16:04:10.082172742 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2022-06-29 16:04:40.595027219 -0700
|
||||
@@ -63,6 +63,7 @@ static const char *piv_manu_id_1= "piv_
|
||||
static PRLogModuleInfo *coolKeyLogHN = PR_NewLogModule("coolKeyHandler");
|
||||
|
||||
void NotifyEndResult(CoolKeyHandler* context, int operation, int result, int description);
|
||||
+bool isTokenTypeOtherKnownType(CK_TOKEN_INFO *tokenInfo);
|
||||
|
||||
struct AutoCKYBuffer : public CKYBuffer
|
||||
{
|
||||
@@ -2246,6 +2247,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
int isACOOLKey = 0;
|
||||
int isACAC = 0;
|
||||
int isAPIV = 0;
|
||||
+ bool isOtherKey = false;
|
||||
|
||||
int hasApplet = 0;
|
||||
int isPersonalized = 0;
|
||||
@@ -2306,6 +2308,12 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
isAPIV = 1;
|
||||
} else {
|
||||
isACOOLKey = 1;
|
||||
+ isOtherKey = isTokenTypeOtherKnownType(&tokenInfo);
|
||||
+ if(isOtherKey == true && hasApplet == 0 && isPersonalized == 0) {
|
||||
+ isACOOLKey = 0;
|
||||
+ } else {
|
||||
+ isOtherKey = false;
|
||||
+ }
|
||||
}
|
||||
|
||||
// OK, we have everything we need, now build the COOLKEYInfo structure.
|
||||
@@ -2336,7 +2344,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
tokenInfo.firmwareVersion.major = 1;
|
||||
}
|
||||
|
||||
- if(isPersonalized == 1 || isACAC == 1 || isAPIV == 1) {
|
||||
+ if(isPersonalized == 1 || isACAC == 1 || isAPIV == 1 || isOtherKey == true) {
|
||||
tokenInfo.flags |= CKF_TOKEN_INITIALIZED;
|
||||
}
|
||||
|
||||
@@ -2407,3 +2415,33 @@ failed:
|
||||
|
||||
return NULL;
|
||||
}
|
||||
+
|
||||
+bool isTokenTypeOtherKnownType(CK_TOKEN_INFO *tokenInfo)
|
||||
+{
|
||||
+ char tBuff[56];
|
||||
+ bool res = false;
|
||||
+
|
||||
+ if(tokenInfo == NULL) {
|
||||
+ return res;
|
||||
+ }
|
||||
+ string curManuCfg;
|
||||
+ string num;
|
||||
+ for(int i = 0;;i++) {
|
||||
+ num = to_string(i);
|
||||
+ curManuCfg = "esc.token.manu_id." + num;
|
||||
+ const char *curManu = CoolKeyGetConfig(curManuCfg.c_str());
|
||||
+
|
||||
+ if(curManu == NULL) {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ int match = memcmp(tokenInfo->manufacturerID, curManu, strlen(curManu));
|
||||
+ CoolKeyFreeConfig(curManu);
|
||||
+ if(match == 0) {
|
||||
+ res = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CoolKeyHandler::isTokenTypeOtherKnownType: result: %d .\n",GetTStamp(tBuff,56), res));
|
||||
+ return res;
|
||||
+}
|
||||
103
esc-1.1.2-fix2.patch
Normal file
103
esc-1.1.2-fix2.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix2 ./esc/src/lib/coolkey/CoolKey.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix2 2018-10-11 18:34:34.622987227 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2018-10-11 18:36:11.918476971 -0700
|
||||
@@ -492,13 +492,11 @@ HRESULT CoolKeyGetCUIDDirectly(char *aBu
|
||||
}
|
||||
|
||||
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
- assert(cardCtxt);
|
||||
if (!cardCtxt) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
conn = CKYCardConnection_Create(cardCtxt);
|
||||
- assert(conn);
|
||||
if (!conn) {
|
||||
goto done;
|
||||
}
|
||||
@@ -559,13 +557,11 @@ HRESULT CoolKeyGetATRDirectly(char *aBuf
|
||||
}
|
||||
|
||||
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
- assert(cardCtxt);
|
||||
if (!cardCtxt) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
conn = CKYCardConnection_Create(cardCtxt);
|
||||
- assert(conn);
|
||||
if (!conn) {
|
||||
goto done;
|
||||
}
|
||||
@@ -629,13 +625,11 @@ HRESULT CoolKeyGetLifeCycleDirectly(CKYB
|
||||
}
|
||||
|
||||
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
- assert(cardCtxt);
|
||||
if (!cardCtxt) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
conn = CKYCardConnection_Create(cardCtxt);
|
||||
- assert(conn);
|
||||
if (!conn) {
|
||||
goto done;
|
||||
}
|
||||
@@ -691,13 +685,11 @@ HRESULT CoolKeyGetCPLCDataDirectly(CKYAp
|
||||
}
|
||||
|
||||
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
- assert(cardCtxt);
|
||||
if (!cardCtxt) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
conn = CKYCardConnection_Create(cardCtxt);
|
||||
- assert(conn);
|
||||
if (!conn) {
|
||||
goto done;
|
||||
}
|
||||
@@ -752,19 +744,16 @@ static void PR_CALLBACK BlinkTimer(void
|
||||
const char *readerName = NULL;
|
||||
|
||||
CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
- assert(cardCtxt);
|
||||
if (!cardCtxt) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
conn = CKYCardConnection_Create(cardCtxt);
|
||||
- assert(conn);
|
||||
if (!conn) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
readerName = GetReaderNameForKeyID(¶ms->mKey);
|
||||
- assert(readerName);
|
||||
if (!readerName) {
|
||||
goto done;
|
||||
}
|
||||
@@ -1336,7 +1325,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
|
||||
|
||||
CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
|
||||
- assert(cardCtxt);
|
||||
if (!cardCtxt) {
|
||||
CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't create Card Context !.\n",GetTStamp(tBuff,56));
|
||||
result = E_FAIL;
|
||||
@@ -1344,7 +1332,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
|
||||
}
|
||||
|
||||
conn = CKYCardConnection_Create(cardCtxt);
|
||||
- assert(conn);
|
||||
if (!conn) {
|
||||
CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't create Card Connection!\n",GetTStamp(tBuff,56));
|
||||
result = E_FAIL;
|
||||
@@ -1352,7 +1339,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
|
||||
}
|
||||
|
||||
readerName = GetReaderNameForKeyID(aKey);
|
||||
- assert(readerName);
|
||||
if (!readerName) {
|
||||
CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't get reader name!\n",GetTStamp(tBuff,56));
|
||||
result = E_FAIL;
|
||||
300
esc-1.1.2-fix3.patch
Normal file
300
esc-1.1.2-fix3.patch
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
diff -up ./esc/configure.ac.fix3 ./esc/configure.ac
|
||||
--- ./esc/configure.ac.fix3 2018-07-30 14:51:37.000000000 -0700
|
||||
+++ ./esc/configure.ac 2018-10-12 14:06:48.349544811 -0700
|
||||
@@ -56,8 +56,6 @@ AM_PROG_AR
|
||||
AM_SILENT_RULES([yes])
|
||||
LT_INIT
|
||||
|
||||
-SCARD_LIB_NAME="libpcsclite.so.1"
|
||||
-
|
||||
# Versioning
|
||||
ESC_MAJOR_VERSION=esc_major_version
|
||||
ESC_MINOR_VERSION=esc_minor_version
|
||||
@@ -75,6 +73,7 @@ GOBJECT_INTROSPECTION_CHECK(1.56.1)
|
||||
# Output
|
||||
AC_DEFINE([DLL_SUFFIX], ["so"], [Description])
|
||||
AC_DEFINE([LINUX], [1], [Description])
|
||||
+AC_DEFINE([SCARD_LIB_NAME],["libpcsclite.so.1"], [Description])
|
||||
AC_SUBST(ESC_CFLAGS)
|
||||
AC_SUBST(ESC_LIBS)
|
||||
AC_CONFIG_FILES([Makefile src/app/Makefile src/lib/coolkey/Makefile src/lib/nss-http-client/Makefile src/lib/coolkey-mgr/Makefile])
|
||||
diff -up ./esc/src/app/esc.js.fix3 ./esc/src/app/esc.js
|
||||
--- ./esc/src/app/esc.js.fix3 2018-10-12 17:59:36.790939337 -0700
|
||||
+++ ./esc/src/app/esc.js 2018-10-12 19:26:51.847470201 -0700
|
||||
@@ -44,13 +44,16 @@ const CoolKeyNotify = new Lang.Class({
|
||||
this._unique_name = "Unknown";
|
||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(CoolKeyNotifyIface, this);
|
||||
this._dbusImpl.export(Gio.DBus.session, '/com/jmagne/CoolKeyNotify');
|
||||
- this._dbusId = Gio.DBus.session.own_name( 'com.rm5248', Gio.BusNameOwnerFlags.NONE, this._nameAcquired.bind(this), this._nameLost);
|
||||
+ this._dbusId = Gio.DBus.session.own_name( 'com.rm5248', Gio.BusNameOwnerFlags.NONE, this._nameAcquired.bind(this), this._nameLost.bind(this));
|
||||
},
|
||||
_nameAcquired: function( name ) {
|
||||
this._unique_name = name.unique_name;
|
||||
this._client._createCoolKeyMgr(this._unique_name);
|
||||
},
|
||||
_nameLost: function( name ) {
|
||||
+ if(this._client._window) {
|
||||
+ this._client._window.destroy();
|
||||
+ }
|
||||
},
|
||||
|
||||
notifyCoolKeyEvent: function(aKeyType, aKeyID, aKeyState, aData, strData) {
|
||||
@@ -76,6 +79,7 @@ class ESC {
|
||||
this._window.present();
|
||||
}
|
||||
_onStartup() {
|
||||
+ this.mgr = null;
|
||||
this._buildUI();
|
||||
this.notify = new CoolKeyNotify(this);
|
||||
}
|
||||
@@ -95,8 +99,10 @@ class ESC {
|
||||
this.notify._dbusImpl.unexport();
|
||||
this.notify = null;
|
||||
}
|
||||
- this.mgr.cleanup();
|
||||
- this.mgr = null;
|
||||
+ if(this.mgr) {
|
||||
+ this.mgr.cleanup();
|
||||
+ this.mgr = null;
|
||||
+ }
|
||||
this._window.destroy();
|
||||
}
|
||||
|
||||
@@ -212,9 +218,7 @@ class ESC {
|
||||
|
||||
if (res == false) {
|
||||
this._configFile.set_string("ESC","name","Smart Card Utility");
|
||||
- print("attmpeting to create: " + config_name);
|
||||
res = this._configFile.save_to_file(config_name);
|
||||
- print("res: " + res);
|
||||
}
|
||||
}
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/cky_card.c.fix3 ./esc/src/lib/coolkey/cky_card.c
|
||||
--- ./esc/src/lib/coolkey/cky_card.c.fix3 2018-05-03 14:03:07.000000000 -0700
|
||||
+++ ./esc/src/lib/coolkey/cky_card.c 2018-10-12 14:06:48.350544806 -0700
|
||||
@@ -139,21 +139,15 @@ typedef struct _SCard {
|
||||
goto fail; \
|
||||
}
|
||||
|
||||
-#ifdef WIN32
|
||||
-#define SCARD_LIB_NAME "winscard.dll"
|
||||
-#else
|
||||
-#ifdef MAC
|
||||
-#define SCARD_LIB_NAME "PCSC.Framework/PCSC"
|
||||
-#else
|
||||
#ifdef LINUX
|
||||
-#define SCARD_LIB_NAME "libpcsclite.so"
|
||||
+#ifndef SCARD_LIB_NAME
|
||||
+#define SCARD_LIB_NAME "libpcsclite.so.1"
|
||||
#else
|
||||
#ifndef SCARD_LIB_NAME
|
||||
#error "define wincard library for this platform"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
static SCard *
|
||||
ckySCard_Init(void)
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix3 ./esc/src/lib/coolkey/CoolKey.cpp
|
||||
diff -up ./esc/src/lib/coolkey-mgr/coolkey-api.cpp.fix3 ./esc/src/lib/coolkey-mgr/coolkey-api.cpp
|
||||
--- ./esc/src/lib/coolkey-mgr/coolkey-api.cpp.fix3 2018-10-12 15:12:59.937348875 -0700
|
||||
+++ ./esc/src/lib/coolkey-mgr/coolkey-api.cpp 2018-10-12 18:28:34.674060797 -0700
|
||||
@@ -71,6 +71,12 @@ tokenInfo *coolkey_get_token_info(int ke
|
||||
if(tInfo == NULL) {
|
||||
exit(1);
|
||||
}
|
||||
+
|
||||
+ tInfo ->atr = NULL;
|
||||
+ tInfo->issuerInfo = NULL;
|
||||
+ tInfo->issuer = NULL;
|
||||
+ tInfo->issuedTo = NULL;
|
||||
+ tInfo->status = 0;
|
||||
|
||||
coolkey->GetCoolKeyATR(keyType, keyID, &tInfo->atr);
|
||||
|
||||
diff -up ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp.fix3 ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp
|
||||
--- ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp.fix3 2018-10-12 14:22:05.938864628 -0700
|
||||
+++ ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp 2018-10-12 19:15:26.447926406 -0700
|
||||
@@ -1053,17 +1053,19 @@ HRESULT rhCoolKey::GetCoolKeyCertInfo(PR
|
||||
HRESULT rhCoolKey::GetCoolKeyATR(PRUint32 aKeyType, const char *aKeyID, char **_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
+ if(aKeyID == NULL || _retval == NULL) {
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
*_retval = NULL;
|
||||
AutoCoolKey key(aKeyType, aKeyID);
|
||||
- char atr[128];
|
||||
- HRESULT res = CoolKeyGetATR(&key, (char *)&atr,sizeof(atr));
|
||||
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr));
|
||||
- if(res == S_OK)
|
||||
- {
|
||||
- char *temp = (char *) PL_strdup(atr);
|
||||
- *_retval = temp;
|
||||
+ char atr[128] = {};
|
||||
+ HRESULT res = CoolKeyGetATR(&key, (char *)&atr,sizeof(atr));
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr));
|
||||
+
|
||||
+ if(res == S_OK) {
|
||||
+ *_retval = (char *) PL_strdup(atr);
|
||||
}
|
||||
- return NS_OK;
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/* string GetCoolKeyTokenName (in unsigned long aKeyType, in string aKeyID); */
|
||||
@@ -1097,24 +1099,25 @@ HRESULT rhCoolKey::GetCoolKeyTokenName(P
|
||||
HRESULT rhCoolKey::GetCoolKeyIssuerInfo(PRUint32 aKeyType, const char *aKeyID, char **_retval)
|
||||
{
|
||||
char tBuff[56];
|
||||
+
|
||||
+ if(aKeyID == NULL || _retval == NULL) {
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
*_retval = NULL;
|
||||
|
||||
AutoCoolKey key(aKeyType, aKeyID);
|
||||
|
||||
- char issuerInfo[256];
|
||||
+ char issuerInfo[256] = {};
|
||||
|
||||
HRESULT res = CoolKeyGetIssuerInfo(&key, (char *)&issuerInfo,256);
|
||||
|
||||
::CoolKeyLogMsg( 1, "%s Attempting to get the key's Issuer: Key: %s, Issuer %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) issuerInfo);
|
||||
|
||||
- if(res == S_OK)
|
||||
- {
|
||||
- char *temp = (char *) PL_strdup(issuerInfo);
|
||||
- *_retval = temp;
|
||||
-
|
||||
+ if(res == S_OK) {
|
||||
+ *_retval = (char *) PL_strdup(issuerInfo);
|
||||
}
|
||||
- return NS_OK;
|
||||
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/* void rhGetCoolKeyPolicy (in unsigned long aKeyType, in string aKeyID, out string policy); */
|
||||
@@ -1153,28 +1156,22 @@ HRESULT rhCoolKey::GetCoolKeyPolicy(PRUi
|
||||
HRESULT rhCoolKey::GetCoolKeyUID(PRUint32 aKeyType, const char *aKeyID, char **uid)
|
||||
{
|
||||
char tBuff[56];
|
||||
- if (!aKeyID) {
|
||||
- return NS_ERROR_FAILURE;
|
||||
+ if (aKeyID == NULL || uid == NULL) {
|
||||
+ return E_FAIL;
|
||||
}
|
||||
|
||||
AutoCoolKey key(aKeyType, ( char *)aKeyID);
|
||||
|
||||
- char buff[512];
|
||||
+ char buff[512] = {};
|
||||
int bufLength = 512;
|
||||
- buff[0] = 0;
|
||||
|
||||
- CoolKeyGetUID(&key, (char *) buff, bufLength);
|
||||
-
|
||||
- if(!buff[0])
|
||||
- {
|
||||
- return NS_OK;
|
||||
- }
|
||||
+ HRESULT res = CoolKeyGetUID(&key, (char *) buff, bufLength);
|
||||
|
||||
PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetUID %s \n",GetTStamp(tBuff,56),(char *) buff));
|
||||
|
||||
- char *temp = (char *) PL_strdup(buff);
|
||||
-
|
||||
- *uid = temp;
|
||||
+ if(res == S_OK) {
|
||||
+ char *uid = (char *) PL_strdup(buff);
|
||||
+ }
|
||||
|
||||
return NS_OK;
|
||||
|
||||
@@ -1185,32 +1182,25 @@ HRESULT rhCoolKey::GetCoolKeyUID(PRUint3
|
||||
HRESULT rhCoolKey::GetCoolKeyIssuedTo(PRUint32 aKeyType, const char *aKeyID, char **issuedTo)
|
||||
{
|
||||
char tBuff[56];
|
||||
- if (!aKeyID) {
|
||||
- return NS_ERROR_FAILURE;
|
||||
+ if (aKeyID == NULL || issuedTo == NULL) {
|
||||
+ return E_FAIL;
|
||||
}
|
||||
|
||||
+ *issuedTo = NULL;
|
||||
AutoCoolKey key(aKeyType, ( char *)aKeyID);
|
||||
|
||||
- // const char *keyName = CoolKeyGetTokenName(&key);
|
||||
-
|
||||
- char buff[512];
|
||||
+ char buff[512] = {};
|
||||
int bufLength = 512;
|
||||
- buff[0] = 0;
|
||||
|
||||
- CoolKeyGetIssuedTo(&key, (char *) buff, bufLength);
|
||||
-
|
||||
- if(!buff[0])
|
||||
- {
|
||||
- return NS_OK;
|
||||
- }
|
||||
+ HRESULT res = CoolKeyGetIssuedTo(&key, (char *) buff, bufLength);
|
||||
|
||||
PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuedTo %s \n",GetTStamp(tBuff,56),(char *) buff));
|
||||
|
||||
- char *temp = (char *) PL_strdup(buff);
|
||||
-
|
||||
- *issuedTo = temp;
|
||||
+ if(res == S_OK) {
|
||||
+ *issuedTo = (char *) PL_strdup(buff);
|
||||
+ }
|
||||
|
||||
- return NS_OK;
|
||||
+ return res;
|
||||
|
||||
}
|
||||
|
||||
@@ -1218,32 +1208,24 @@ HRESULT rhCoolKey::GetCoolKeyIssuedTo(PR
|
||||
HRESULT rhCoolKey::GetCoolKeyIssuer(PRUint32 aKeyType, const char *aKeyID, char **issuer)
|
||||
{
|
||||
char tBuff[56];
|
||||
- if (!aKeyID) {
|
||||
- return NS_ERROR_FAILURE;
|
||||
+ if (!aKeyID || !issuer) {
|
||||
+ return E_FAIL;
|
||||
}
|
||||
|
||||
AutoCoolKey key(aKeyType, ( char *)aKeyID);
|
||||
|
||||
- // const char *keyName = CoolKeyGetTokenName(&key);
|
||||
-
|
||||
- char buff[512];
|
||||
+ char buff[512] = {};
|
||||
int bufLength = 512;
|
||||
- buff[0] = 0;
|
||||
|
||||
- CoolKeyGetIssuer(&key, (char *) buff, bufLength);
|
||||
-
|
||||
- if(!buff[0])
|
||||
- {
|
||||
- return NS_OK;
|
||||
- }
|
||||
+ HRESULT res = CoolKeyGetIssuer(&key, (char *) buff, bufLength);
|
||||
|
||||
PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuer %s \n",GetTStamp(tBuff,56),(char *) buff));
|
||||
|
||||
- char *temp = (char *) PL_strdup(buff);
|
||||
-
|
||||
- *issuer = temp;
|
||||
+ if(res == S_OK) {
|
||||
+ *issuer = (char *) PL_strdup(buff);
|
||||
+ }
|
||||
|
||||
- return NS_OK;
|
||||
+ return res;
|
||||
|
||||
}
|
||||
|
||||
diff -up ./esc/src/lib/coolkey-mgr/rhCoolKey.h.fix3 ./esc/src/lib/coolkey-mgr/rhCoolKey.h
|
||||
3722
esc-1.1.2-fix4.patch
Normal file
3722
esc-1.1.2-fix4.patch
Normal file
File diff suppressed because it is too large
Load diff
12
esc-1.1.2-fix5.patch
Normal file
12
esc-1.1.2-fix5.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up ./esc/src/lib/nss-http-client/httpClientNss.cpp.fix5 ./esc/src/lib/nss-http-client/httpClientNss.cpp
|
||||
--- ./esc/src/lib/nss-http-client/httpClientNss.cpp.fix5 2019-10-29 11:16:36.042807434 -0700
|
||||
+++ ./esc/src/lib/nss-http-client/httpClientNss.cpp 2019-10-29 11:18:22.169301918 -0700
|
||||
@@ -172,6 +172,8 @@ PSHttpResponse *HttpClientNss::httpSendC
|
||||
|
||||
request.addHeader( "Content-Type", "text/plain" );
|
||||
|
||||
+ request.setMethod(method);
|
||||
+
|
||||
if(cb)
|
||||
{
|
||||
request.setChunkedCallback(cb);
|
||||
250
esc-1.1.2-fix6.patch
Normal file
250
esc-1.1.2-fix6.patch
Normal file
|
|
@ -0,0 +1,250 @@
|
|||
diff -up ./esc/src/app/opensc.esc.conf.fix6 ./esc/src/app/opensc.esc.conf
|
||||
--- ./esc/src/app/opensc.esc.conf.fix6 2019-11-14 18:19:13.343923930 -0800
|
||||
+++ ./esc/src/app/opensc.esc.conf 2019-11-15 11:30:01.967034720 -0800
|
||||
@@ -26,6 +26,11 @@ app default {
|
||||
# Default: stderr
|
||||
#
|
||||
#debug_file = /tmp/opensc.log;
|
||||
+ # sc650 scp01 (older version)
|
||||
+ card_atr
|
||||
+ 3B:FF:14:00:FF:81:31:FE:45:80:25:A0:00:00:00:56:57:53:43:36:35:30:03:02:39 {
|
||||
+ pkcs11_enable_InitToken = yes;
|
||||
+ }
|
||||
|
||||
card_atr
|
||||
3B:FF:14:00:FF:81:31:FE:45:80:25:A0:00:00:00:56:57:53:43:36:35:30:03:03:38 {
|
||||
@@ -52,12 +57,31 @@ app default {
|
||||
pkcs11_enable_InitToken = yes;
|
||||
}
|
||||
|
||||
+ card_atr
|
||||
+ 3B:95:95:40:FF:AE:01:03:00:00 {
|
||||
+ pkcs11_enable_InitToken = yes;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ #g&d 6.0 smart cafe scp03
|
||||
|
||||
card_atr
|
||||
3B:FE:18:00:00:80:31:FE:45:53:43:45:36:30:2D:43:44:30:38:31:2D:6E:46:A9 {
|
||||
pkcs11_enable_InitToken = yes;
|
||||
}
|
||||
|
||||
+ #g&d 7.0 smart cafe scp03
|
||||
+ card_atr
|
||||
+ 3B:F9:96:00:00:80:31:FE:45:53:43:45:37:20:03:00:20:46:42 {
|
||||
+ pkcs11_enable_InitToken = yes;
|
||||
+ }
|
||||
+
|
||||
+ #sc650 scp03
|
||||
+
|
||||
+ card_atr
|
||||
+ 3B:FF:14:00:FF:81:31:FE:45:80:25:A0:00:00:00:56:57:53:43:36:35:30:04:02:3E {
|
||||
+ pkcs11_enable_InitToken = yes;
|
||||
+ }
|
||||
|
||||
reader_driver ctapi {
|
||||
}
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix6 ./esc/src/lib/coolkey/CoolKey.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix6 2019-11-13 18:30:45.454938214 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2019-11-14 18:16:49.078377331 -0800
|
||||
@@ -542,6 +542,67 @@ done:
|
||||
|
||||
|
||||
}
|
||||
+/* Return the full reader name since nss can't seem to give us the whole name
|
||||
+ * when the length is longer than 65 chars.
|
||||
+ * Caller has to free the returned string.
|
||||
+ */
|
||||
+char *CoolKeyGetFullReaderName(const char *nssReaderName)
|
||||
+{
|
||||
+ char* fullReaderName = NULL;
|
||||
+ CKYReaderNameList readerNames;
|
||||
+ CKYCardContext *cardCtxt = NULL;
|
||||
+ CKYStatus ret = CKYSCARDERR;
|
||||
+ int readerCount = 0;
|
||||
+ char tBuff[56];
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyGetFullReaderName entering:\n",GetTStamp(tBuff,56)));
|
||||
+
|
||||
+ if(nssReaderName == NULL) {
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
|
||||
+ if (!cardCtxt) {
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ ret = CKYCardContext_ListReaders(cardCtxt, &readerNames);
|
||||
+ if (ret != CKYSUCCESS) {
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ readerCount = CKYReaderNameList_GetCount(readerNames);
|
||||
+
|
||||
+ /* none found, return success */
|
||||
+ if (readerCount == 0) {
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ /* step through reader list to match to our possible partial reader name from nss. */
|
||||
+ for (int i=0; i < readerCount ; i++) {
|
||||
+ const char *thisReader = CKYReaderNameList_GetValue(readerNames, i);
|
||||
+
|
||||
+ const char *match = strstr(thisReader, nssReaderName );
|
||||
+ if(match == NULL) {
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyGetFullReaderName reader: %s not the one. \n",thisReader,GetTStamp(tBuff,56)));
|
||||
+
|
||||
+ } else {
|
||||
+ fullReaderName = strdup(thisReader);
|
||||
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyGetFullReaderName correct full name: %s \n",fullReaderName,GetTStamp(tBuff,56)));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+done:
|
||||
+
|
||||
+ if (cardCtxt) {
|
||||
+ CKYCardContext_Destroy(cardCtxt);
|
||||
+ }
|
||||
+
|
||||
+ if(readerNames) {
|
||||
+ CKYReaderNameList_Destroy(readerNames);
|
||||
+ }
|
||||
+ return fullReaderName;
|
||||
+
|
||||
+}
|
||||
|
||||
HRESULT CoolKeyGetATRDirectly(char *aBuff, int aBuffLen,const char *readerName) {
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix6 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix6 2019-11-13 18:30:59.934918507 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2019-11-14 17:16:03.946077277 -0800
|
||||
@@ -2209,10 +2209,10 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
SECStatus status;
|
||||
HRESULT hres,atrRes,cuidRes,cycleRes;
|
||||
|
||||
- CKYBuffer cardATR;
|
||||
- CKYBuffer_InitEmpty(&cardATR);
|
||||
char *readerName = PK11_GetSlotName(aSlot);
|
||||
-
|
||||
+
|
||||
+ char *actualReaderName = CoolKeyGetFullReaderName(readerName);
|
||||
+
|
||||
memset((void *) &tokenInfo,0,sizeof(tokenInfo));
|
||||
ATR.data = NULL; // initialize for error processing
|
||||
label.data = NULL; // initialize for error processing
|
||||
@@ -2233,6 +2233,11 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
char cuidChar[100];
|
||||
memset((void*) cuidChar,0 ,sizeof(cuidChar));
|
||||
|
||||
+ if(actualReaderName == NULL) {
|
||||
+ goto failed;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
// get the CUID/Serial number (we *WILL* continue to need it )
|
||||
status = PK11_GetTokenInfo(aSlot,&tokenInfo);
|
||||
if (status != SECSuccess) {
|
||||
@@ -2242,7 +2247,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
tokenInfo.flags=0; //Ignore what opensc says, get the info ourselves later.
|
||||
//Get the life cycle state:
|
||||
|
||||
- cycleRes = CoolKeyGetLifeCycleDirectly(&lifeCycle,readerName);
|
||||
+ cycleRes = CoolKeyGetLifeCycleDirectly(&lifeCycle,actualReaderName);
|
||||
|
||||
if(lifeCycle == 0x7) { // applet only
|
||||
hasApplet = 1;
|
||||
@@ -2255,7 +2260,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
|
||||
//Let's see if we can get the ATR by force explicitly
|
||||
|
||||
- atrRes = CoolKeyGetATRDirectly(atrChar,100,readerName);
|
||||
+ atrRes = CoolKeyGetATRDirectly(atrChar,100,actualReaderName);
|
||||
|
||||
if(atrRes == E_FAIL) {
|
||||
goto failed;
|
||||
@@ -2310,7 +2315,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
|
||||
info->mInfoFlags = MapGetFlags(&tokenInfo);
|
||||
|
||||
- info->mReaderName = strdup(readerName);
|
||||
+ info->mReaderName = strdup(actualReaderName);
|
||||
|
||||
info->mCUID = (char *)malloc(35); /* should be a define ! */
|
||||
|
||||
@@ -2361,6 +2366,9 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
|
||||
SECITEM_FreeItem(&label,PR_FALSE);
|
||||
|
||||
+ if(actualReaderName) {
|
||||
+ free(actualReaderName);
|
||||
+ }
|
||||
info->mSlot = PK11_ReferenceSlot(aSlot);
|
||||
info->mSeries = PK11_GetSlotSeries(aSlot);
|
||||
return info;
|
||||
@@ -2372,7 +2380,9 @@ failed:
|
||||
if (info) {
|
||||
delete info;
|
||||
}
|
||||
-
|
||||
- CKYBuffer_FreeData(&cardATR);
|
||||
+ if (actualReaderName) {
|
||||
+ free(actualReaderName);
|
||||
+ }
|
||||
+
|
||||
return NULL;
|
||||
}
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey.h.fix6 ./esc/src/lib/coolkey/CoolKey.h
|
||||
--- ./esc/src/lib/coolkey/CoolKey.h.fix6 2019-11-13 18:30:37.263949374 -0800
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.h 2019-11-14 17:15:23.216143691 -0800
|
||||
@@ -300,6 +300,7 @@ HRESULT CoolKeyGetATRDirectly(char *aBuf
|
||||
HRESULT CoolKeyGetCUIDDirectly(char *aBuff, int aBuffLen, const char *readerName);
|
||||
HRESULT CoolKeyGetCPLCDataDirectly(CKYAppletRespGetCPLCData *cplc,const char *readerName);
|
||||
HRESULT CoolKeyGetLifeCycleDirectly(CKYByte *personalized,const char *readerName);
|
||||
+char *CoolKeyGetFullReaderName(const char *nssReaderName);
|
||||
|
||||
}
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/NSSManager.cpp.fix6 ./esc/src/lib/coolkey/NSSManager.cpp
|
||||
--- ./esc/src/lib/coolkey/NSSManager.cpp.fix6 2019-11-14 17:21:14.596622085 -0800
|
||||
+++ ./esc/src/lib/coolkey/NSSManager.cpp 2019-11-14 18:24:25.461109006 -0800
|
||||
@@ -402,7 +402,8 @@ HRESULT NSSManager::GetKeyIssuer(const C
|
||||
|
||||
if(cert)
|
||||
{
|
||||
- if(cert->slot == slot)
|
||||
+ int not_equal = strncmp(PK11_GetSlotName(slot), PK11_GetSlotName(cert->slot),65);
|
||||
+ if(not_equal == 0)
|
||||
{
|
||||
if(IsCACert(cert))
|
||||
{
|
||||
@@ -478,7 +479,8 @@ HRESULT NSSManager::GetKeyUID(const Cool
|
||||
|
||||
if(cert)
|
||||
{
|
||||
- if(cert->slot == slot)
|
||||
+ int not_equal = strncmp(PK11_GetSlotName(slot), PK11_GetSlotName(cert->slot),65);
|
||||
+ if(not_equal == 0)
|
||||
{
|
||||
if(IsCACert(cert))
|
||||
{
|
||||
@@ -557,7 +559,8 @@ HRESULT NSSManager::GetKeyIssuedTo(const
|
||||
|
||||
if(cert)
|
||||
{
|
||||
- if(cert->slot == slot)
|
||||
+ int not_equal = strncmp(PK11_GetSlotName(slot), PK11_GetSlotName(cert->slot),65);
|
||||
+ if(not_equal == 0)
|
||||
{
|
||||
if(IsCACert(cert))
|
||||
{
|
||||
@@ -643,7 +646,8 @@ HRESULT NSSManager::GetKeyCertInfo(const
|
||||
CERTCertificate *cert = node->cert;
|
||||
if(cert)
|
||||
{
|
||||
- if(cert->slot == slot)
|
||||
+ int not_equal = strncmp(PK11_GetSlotName(slot), PK11_GetSlotName(cert->slot),65);
|
||||
+ if(not_equal == 0)
|
||||
{
|
||||
if(!strcmp(cert->nickname,aCertNickname))
|
||||
{
|
||||
343
esc-1.1.2-fix7.patch
Normal file
343
esc-1.1.2-fix7.patch
Normal file
|
|
@ -0,0 +1,343 @@
|
|||
diff -up ./esc/src/app/esc.js.fix7 ./esc/src/app/esc.js
|
||||
--- ./esc/src/app/esc.js.fix7 2020-05-30 18:57:40.423388032 -0700
|
||||
+++ ./esc/src/app/esc.js 2020-05-30 19:01:40.769955310 -0700
|
||||
@@ -30,6 +30,12 @@ const ESC_CONFIG_FILE_NAME = "esc.conf";
|
||||
const ESC_CONFIG_GROUP = "ESC";
|
||||
const ESC_PWORD_FILE = "pword";
|
||||
|
||||
+const STATUS_ENROLLED="Enrolled";
|
||||
+const STATUS_FORMATTED="Formatted";
|
||||
+const STATUS_UNFORMATTED="Unformatted";
|
||||
+const STATUS_UNKNOWN="Unknown";
|
||||
+const FORMATTED_CODE=2;
|
||||
+
|
||||
const UNKNOWN_LABEL = "unknown";
|
||||
const CoolKeyNotifyIface = '<node> \
|
||||
<interface name="com.jmagne.CoolKeyNotify"> \
|
||||
@@ -185,17 +191,17 @@ class ESC {
|
||||
_getStatusString(intStatus) {
|
||||
switch(intStatus) {
|
||||
case 4:
|
||||
- return "enrolled";
|
||||
+ return STATUS_ENROLLED;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
- return "uninitialized";
|
||||
+ return STATUS_FORMATTED;
|
||||
break;
|
||||
case 1:
|
||||
- return "unknown";
|
||||
+ return STATUS_UNFORMATTED;
|
||||
break;
|
||||
default:
|
||||
- return "unknown";
|
||||
+ return STATUS_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -216,14 +222,30 @@ class ESC {
|
||||
let issuer = inserted.issuer;
|
||||
let issuedTo = inserted.issued_to;
|
||||
|
||||
+ let cachedIssuer = null;
|
||||
+
|
||||
+ if(inserted.is_a_cool_key) {
|
||||
+ cachedIssuer = this._phoneHomeMgr.getCachedIssuer(aKeyID);
|
||||
+ }
|
||||
+
|
||||
+ if(cachedIssuer != null) {
|
||||
+ issuer = cachedIssuer;
|
||||
+ }
|
||||
+
|
||||
if(issuer == null || issuer.length == 0) {
|
||||
- issuer = "unknown";
|
||||
+ issuer = STATUS_UNKNOWN;
|
||||
}
|
||||
if(issuedTo == null || issuedTo.length == 0) {
|
||||
- issuedTo = "unknown";
|
||||
+ issuedTo = STATUS_UNKNOWN;
|
||||
}
|
||||
+ let newStatus = inserted.status;
|
||||
+
|
||||
+ if(newStatus == FORMATTED_CODE) {
|
||||
+ issuedTo = STATUS_UNKNOWN;
|
||||
+ }
|
||||
+
|
||||
this._tokenStore.set (this._tokenStore.append(), [0, 1, 2, 3, 4],
|
||||
- [issuer, issuedTo, this._getStatusString(inserted.status), aKeyID,aKeyType]);
|
||||
+ [issuer, issuedTo, this._getStatusString(newStatus), aKeyID,aKeyType]);
|
||||
|
||||
let [ isSelected, iter] = this._tokenStore.get_iter_first();
|
||||
|
||||
diff -up ./esc/src/app/opensc.esc.conf.fix7 ./esc/src/app/opensc.esc.conf
|
||||
--- ./esc/src/app/opensc.esc.conf.fix7 2020-05-30 18:54:14.079618060 -0700
|
||||
+++ ./esc/src/app/opensc.esc.conf 2020-05-30 19:02:16.191744158 -0700
|
||||
@@ -89,12 +89,12 @@ app default {
|
||||
}
|
||||
reader_driver openct {
|
||||
};
|
||||
- card_drivers = coolkey, cac, piv, default;
|
||||
+ card_drivers = coolkey, cac,cac1, piv, default;
|
||||
secure_messaging local_authentic {
|
||||
module_path = /usr/lib64;
|
||||
}
|
||||
framework pkcs15 {
|
||||
- builtin_emulators = coolkey, cac, piv;
|
||||
+ builtin_emulators = coolkey, cac, cac1, piv;
|
||||
}
|
||||
}
|
||||
app opensc-pkcs11 {
|
||||
diff -up ./esc/src/app/operationDialog.js.fix7 ./esc/src/app/operationDialog.js
|
||||
--- ./esc/src/app/operationDialog.js.fix7 2020-05-30 18:54:48.700411683 -0700
|
||||
+++ ./esc/src/app/operationDialog.js 2020-05-30 19:03:01.354474940 -0700
|
||||
@@ -47,34 +47,32 @@ operationDialog.prototype = {
|
||||
if(tokenInfo == null) {
|
||||
this.app_alert("Invalid Token!");
|
||||
}
|
||||
- this.dialog = new Gtk.Dialog ({ transient_for: this.app._window,
|
||||
- modal: true,deletable: false,
|
||||
- title: TOKEN_OPERATION, border_width: 10 });
|
||||
|
||||
this.operation = operation;
|
||||
this.tokenInfo = tokenInfo;
|
||||
|
||||
let opMessage = "";
|
||||
if(this.operation == OP_FORMAT) {
|
||||
- opMessage = "Format Smart Card";
|
||||
+ opMessage = "Format Smart Card:";
|
||||
|
||||
} else if(this.operation == OP_ENROLL) {
|
||||
- opMessage = "Enroll Smart Card";
|
||||
+ opMessage = "Enroll Smart Card:";
|
||||
} else if(this.operation == OP_PIN_RESET) {
|
||||
- opMessage = "Reset Smart Card Pin";
|
||||
+ opMessage = "Reset Smart Card Pin:";
|
||||
} else {
|
||||
this.app._alert("operationdDialog: Invalid operation!");
|
||||
return;
|
||||
}
|
||||
|
||||
+ this.dialog = new Gtk.Dialog ({ transient_for: this.app._window,
|
||||
+ modal: true,deletable: false,
|
||||
+ title: TOKEN_OPERATION, border_width: 10 });
|
||||
+
|
||||
this.area = this.dialog.get_content_area();
|
||||
this.grid = new Gtk.Grid ({row_spacing: 20, column_spacing: 20});
|
||||
|
||||
- this.message = new Gtk.Label ({label: opMessage});
|
||||
- this.area.add (this.message);
|
||||
-
|
||||
//this.throbberImage = new Gtk.Image({file: this.app._currentDir + "/" + "throbber-anim5.gif"});
|
||||
-
|
||||
+ this.label = new Gtk.Label({label: opMessage});
|
||||
this.progressBar = new Gtk.ProgressBar ({ valign: Gtk.Align.CENTER });
|
||||
this.progressBar.set_fraction(0.0);
|
||||
|
||||
@@ -86,15 +84,16 @@ operationDialog.prototype = {
|
||||
this.ldapUserLabel = new Gtk.Label({label: "Ldap User:"});
|
||||
this.ldapUserBox = new Gtk.Entry();
|
||||
|
||||
- this.grid.attach(this.ldapUserLabel, 0, 0, 1,1);
|
||||
- this.grid.attach(this.ldapUserBox,1, 0,1,1);
|
||||
+ this.grid.attach(this.label,0,0,1,1);
|
||||
+ this.grid.attach(this.ldapUserLabel, 0, 1, 1,1);
|
||||
+ this.grid.attach(this.ldapUserBox,1, 1,1,1);
|
||||
|
||||
this.ldapPasswordLabel = new Gtk.Label({label: "Ldap Password:"});
|
||||
this.ldapPasswordBox = new Gtk.Entry();
|
||||
this.ldapPasswordBox.set_visibility(false);
|
||||
|
||||
- this.grid.attach(this.ldapPasswordLabel,2,0,1,1);
|
||||
- this.grid.attach(this.ldapPasswordBox,3,0,1,1);
|
||||
+ this.grid.attach(this.ldapPasswordLabel,2,1,1,1);
|
||||
+ this.grid.attach(this.ldapPasswordBox,3,1,1,1);
|
||||
|
||||
if(this.operation != OP_FORMAT ) {
|
||||
|
||||
@@ -106,10 +105,10 @@ operationDialog.prototype = {
|
||||
this.confirmPinBox = new Gtk.Entry();
|
||||
this.confirmPinBox.set_visibility(false);
|
||||
|
||||
- this.grid.attach(this.newpinLabel, 0,1,1,1);
|
||||
- this.grid.attach(this.newpinBox,1,1,1,1);
|
||||
- this.grid.attach(this.confirmPinLabel,2,1,1,1);
|
||||
- this.grid.attach(this.confirmPinBox,3,1,1,1);
|
||||
+ this.grid.attach(this.newpinLabel, 0,2,1,1);
|
||||
+ this.grid.attach(this.newpinBox,1,2,1,1);
|
||||
+ this.grid.attach(this.confirmPinLabel,2,2,1,1);
|
||||
+ this.grid.attach(this.confirmPinBox,3,2,1,1);
|
||||
}
|
||||
|
||||
this.oKButton = new Gtk.Button ({label: OpLabels[this.operation]});
|
||||
@@ -117,11 +116,11 @@ operationDialog.prototype = {
|
||||
this.dismissButton = new Gtk.Button({label: "Cancel" });
|
||||
|
||||
//this.grid.attach(this.throbberImage,0,2,1,1);
|
||||
- this.grid.attach(this.progressLabel, 0,2,1,1);
|
||||
+ this.grid.attach(this.progressLabel, 0,3,1,1);
|
||||
//this.throbberImage.hide();
|
||||
- this.grid.attach(this.progressBar, 1,2,1,1);
|
||||
- this.grid.attach (this.oKButton,2,2,1,1);
|
||||
- this.grid.attach (this.dismissButton,3,2,1,1);
|
||||
+ this.grid.attach(this.progressBar, 1,3,1,1);
|
||||
+ this.grid.attach (this.oKButton,2,3,1,1);
|
||||
+ this.grid.attach (this.dismissButton,3,3,1,1);
|
||||
|
||||
// Connect the button to the function that handles what it does
|
||||
this.oKButton.connect ("clicked", this.oKHandler.bind(this));
|
||||
diff -up ./esc/src/app/phoneHome.js.fix7 ./esc/src/app/phoneHome.js
|
||||
--- ./esc/src/app/phoneHome.js.fix7 2020-05-30 18:55:43.223086670 -0700
|
||||
+++ ./esc/src/app/phoneHome.js 2020-05-30 19:03:49.787186230 -0700
|
||||
@@ -93,7 +93,7 @@ phoneHome.prototype = {
|
||||
|
||||
this.phArea = this.phDialog.get_content_area();
|
||||
this.phMessage = new Gtk.Label ({label: "Enter url: ex: http://test.host.com:8080/tps/phoneHome"});
|
||||
- this.phArea.add (this.phMessage);
|
||||
+ //this.phArea.add (this.phMessage);
|
||||
|
||||
this.phActionArea = this.phDialog.get_action_area();
|
||||
this.phUrlBox = new Gtk.Entry({width_chars: 35});
|
||||
@@ -108,9 +108,9 @@ phoneHome.prototype = {
|
||||
this.phActionArea.add(this.phGrid);
|
||||
|
||||
this.phOKButton = Gtk.Button.new_from_stock (Gtk.STOCK_OK);
|
||||
-
|
||||
- this.phGrid.attach(this.phUrlBox, 0, 0, 1,1);
|
||||
- this.phGrid.attach(this.phOKButton,1, 0,1,1);
|
||||
+ this.phGrid.add(this.phMessage);
|
||||
+ this.phGrid.attach(this.phUrlBox, 0, 1, 1,1);
|
||||
+ this.phGrid.attach(this.phOKButton,1, 1,1,1);
|
||||
|
||||
// Connect the button to the function that handles what it does
|
||||
this.phOKButton.connect ("clicked", this.phoneHomeOKHandler.bind(this));
|
||||
@@ -228,9 +228,9 @@ phoneHome.prototype = {
|
||||
if(!aKeyID)
|
||||
return null;
|
||||
|
||||
- var issuerValue = this.app._configValueWithKeyID(aKeyID,KEY_ISSUER);
|
||||
+ let issuerValue = this.app._configValueWithKeyID(aKeyID,KEY_ISSUER);
|
||||
|
||||
- if(!issuerValue)
|
||||
+ if(issuerValue == null)
|
||||
return null;
|
||||
|
||||
issuer = this.app._getConfigValue(issuerValue);
|
||||
diff -up ./esc/src/app/pinDialog.js.fix7 ./esc/src/app/pinDialog.js
|
||||
--- ./esc/src/app/pinDialog.js.fix7 2020-05-30 18:55:09.395288320 -0700
|
||||
+++ ./esc/src/app/pinDialog.js 2020-05-30 19:04:51.380819066 -0700
|
||||
@@ -36,16 +36,15 @@ pinDialog.prototype = {
|
||||
launchPinPrompt: function(notify) {
|
||||
|
||||
this.notify = notify;
|
||||
+ this.message = "Token Pin Entry";
|
||||
this.dialog = new Gtk.Dialog ({ transient_for: this.app._window,
|
||||
modal: true,
|
||||
expand: false,
|
||||
- title: PIN_OPERATION ,border_width: 20, deletable: false });
|
||||
+ title: this.message ,border_width: 20, deletable: false });
|
||||
|
||||
this.area = this.dialog.get_content_area();
|
||||
this.grid = new Gtk.Grid ({row_spacing: 10, column_spacing: 20});
|
||||
|
||||
- this.message = new Gtk.Label ({label: "Enter Token Pin"});
|
||||
- this.area.add (this.message);
|
||||
|
||||
this.actionArea = this.dialog.get_action_area();
|
||||
this.pinBox = new Gtk.Entry();
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix7 ./esc/src/lib/coolkey/CoolKey.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix7 2020-05-30 18:56:35.827773090 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2020-05-30 19:05:30.561585507 -0700
|
||||
@@ -511,6 +511,11 @@ HRESULT CoolKeyGetCUIDDirectly(char *aBu
|
||||
|
||||
CKYCardConnection_BeginTransaction(conn);
|
||||
|
||||
+ status = CKYApplet_SelectCardManager(conn, &apduRC);
|
||||
+ if (status != CKYSUCCESS) {
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
status = CKYApplet_GetCUID(conn, &cuid, &apduRC);
|
||||
if (status != CKYSUCCESS) {
|
||||
goto done;
|
||||
@@ -764,7 +769,6 @@ HRESULT CoolKeyGetCPLCDataDirectly(CKYAp
|
||||
}
|
||||
|
||||
CKYCardConnection_BeginTransaction(conn);
|
||||
- unsigned long state;
|
||||
|
||||
status = CKYApplet_SelectCardManager(conn, &apduRC);
|
||||
if (status != CKYSUCCESS) {
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix7 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix7 2020-05-30 18:56:56.511649792 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2020-05-30 19:06:21.955279145 -0700
|
||||
@@ -2157,11 +2157,22 @@ copySerialNumber(char *dest, const char
|
||||
// it will probably have Dashes and store in lower case some time in the
|
||||
// future.
|
||||
//
|
||||
-static HRESULT
|
||||
+static HRESULT
|
||||
getCUIDFromTokenInfo(CK_TOKEN_INFO *tokenInfo, char *tokenSerialNumber)
|
||||
{
|
||||
+ const int minCUIDLen = 18;
|
||||
+
|
||||
char *cp = tokenSerialNumber;
|
||||
|
||||
+ if( tokenSerialNumber == NULL) {
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ if(tokenInfo == NULL) {
|
||||
+ *cp = 0;
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
if (isxdigit(tokenInfo->manufacturerID[0]) &&
|
||||
isxdigit(tokenInfo->manufacturerID[1]) &&
|
||||
isxdigit(tokenInfo->manufacturerID[2]) &&
|
||||
@@ -2181,6 +2192,10 @@ getCUIDFromTokenInfo(CK_TOKEN_INFO *toke
|
||||
}
|
||||
*cp=0;
|
||||
|
||||
+ if( strlen(tokenSerialNumber) < minCUIDLen) {
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2207,7 +2222,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
CK_TOKEN_INFO tokenInfo;
|
||||
CoolKeyInfo *info = NULL;
|
||||
SECStatus status;
|
||||
- HRESULT hres,atrRes,cuidRes,cycleRes;
|
||||
+ HRESULT hres,atrRes,cycleRes,cuidRes;
|
||||
|
||||
char *readerName = PK11_GetSlotName(aSlot);
|
||||
|
||||
@@ -2327,22 +2342,16 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
goto failed;
|
||||
}
|
||||
|
||||
- hres = getCUIDFromTokenInfo(&tokenInfo, info->mCUID);
|
||||
- /* shouldn't the be != S_SUCCESS? */
|
||||
- if (hres == E_FAIL) {
|
||||
- goto failed;
|
||||
- }
|
||||
-
|
||||
+ cuidRes = getCUIDFromTokenInfo(&tokenInfo, info->mCUID);
|
||||
//Check for blank cuid and put something there
|
||||
|
||||
- if(isACOOLKey && strlen(info->mCUID) == 0 )
|
||||
- {
|
||||
+ if(isACOOLKey && cuidRes == E_FAIL) {
|
||||
//Let's try to get the cuid directly from the token.
|
||||
|
||||
cuidRes = CoolKeyGetCUIDDirectly(cuidChar, 100, readerName);
|
||||
|
||||
if(cuidRes != S_OK) {
|
||||
- strcpy(info->mCUID, "blank-token");
|
||||
+ strcpy(info->mCUID, "unknown");
|
||||
} else {
|
||||
strcpy(info->mCUID, cuidChar);
|
||||
}
|
||||
60
esc-1.1.2-fix8.patch
Normal file
60
esc-1.1.2-fix8.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
diff -up ./esc/src/app/opensc.esc.conf.fix8 ./esc/src/app/opensc.esc.conf
|
||||
--- ./esc/src/app/opensc.esc.conf.fix8 2020-08-07 16:17:37.464650003 -0700
|
||||
+++ ./esc/src/app/opensc.esc.conf 2020-08-07 16:20:21.861957011 -0700
|
||||
@@ -89,12 +89,12 @@ app default {
|
||||
}
|
||||
reader_driver openct {
|
||||
};
|
||||
- card_drivers = coolkey, cac,cac1, piv, default;
|
||||
+ card_drivers = coolkey, cac,cac1, PIV-II, default;
|
||||
secure_messaging local_authentic {
|
||||
module_path = /usr/lib64;
|
||||
}
|
||||
framework pkcs15 {
|
||||
- builtin_emulators = coolkey, cac, cac1, piv;
|
||||
+ builtin_emulators = coolkey, cac, cac1, PIV-II;
|
||||
}
|
||||
}
|
||||
app opensc-pkcs11 {
|
||||
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix8 ./esc/src/lib/coolkey/CoolKey.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix8 2020-08-07 12:05:35.982966019 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2020-08-07 16:08:16.747602873 -0700
|
||||
@@ -593,6 +593,7 @@ char *CoolKeyGetFullReaderName(const cha
|
||||
} else {
|
||||
fullReaderName = strdup(thisReader);
|
||||
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyGetFullReaderName correct full name: %s \n",fullReaderName,GetTStamp(tBuff,56)));
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix8 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix8 2020-08-07 12:05:44.394982245 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2020-08-07 16:10:35.504862004 -0700
|
||||
@@ -2225,8 +2225,17 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
HRESULT hres,atrRes,cycleRes,cuidRes;
|
||||
|
||||
char *readerName = PK11_GetSlotName(aSlot);
|
||||
+ int readerNameLen = strlen(readerName);
|
||||
|
||||
- char *actualReaderName = CoolKeyGetFullReaderName(readerName);
|
||||
+ //Since there is no local support to get a reader name by slot,
|
||||
+ //Will simply do a partial substring compare, using less characters
|
||||
+ //to avoid any hard coded trailing chars.
|
||||
+
|
||||
+ char partialReaderName[60];
|
||||
+ memset(partialReaderName, 0, 60);
|
||||
+
|
||||
+ strncpy(partialReaderName,readerName, 59);
|
||||
+ char *actualReaderName = CoolKeyGetFullReaderName(partialReaderName);
|
||||
|
||||
memset((void *) &tokenInfo,0,sizeof(tokenInfo));
|
||||
ATR.data = NULL; // initialize for error processing
|
||||
@@ -2348,7 +2357,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
if(isACOOLKey && cuidRes == E_FAIL) {
|
||||
//Let's try to get the cuid directly from the token.
|
||||
|
||||
- cuidRes = CoolKeyGetCUIDDirectly(cuidChar, 100, readerName);
|
||||
+ cuidRes = CoolKeyGetCUIDDirectly(cuidChar, 100, actualReaderName);
|
||||
|
||||
if(cuidRes != S_OK) {
|
||||
strcpy(info->mCUID, "unknown");
|
||||
41
esc-1.1.2-fix9.patch
Normal file
41
esc-1.1.2-fix9.patch
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
diff -up ./esc/src/app/esc.js.fix9 ./esc/src/app/esc.js
|
||||
--- ./esc/src/app/esc.js.fix9 2020-08-12 11:15:29.423093856 -0700
|
||||
+++ ./esc/src/app/esc.js 2020-08-12 11:43:47.646556310 -0700
|
||||
@@ -271,7 +271,6 @@ class ESC {
|
||||
if(!insertedToken && !doReset) {
|
||||
return;
|
||||
}
|
||||
-
|
||||
if(doReset) {
|
||||
this._operationsGrid.remove(this._phoneHomeButton);
|
||||
this._operationsGrid.remove(this._enrollButton);
|
||||
@@ -297,6 +296,12 @@ class ESC {
|
||||
}
|
||||
|
||||
this._operationsGrid.show_all();
|
||||
+ } else {
|
||||
+ if(insertedToken.status == 4) {
|
||||
+ this._operationsGrid.add(this._certDetailButton);
|
||||
+ this._operationsGrid.show_all();
|
||||
+
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix9 ./esc/src/lib/coolkey/CoolKeyHandler.cpp
|
||||
--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix9 2020-08-12 10:59:24.844704399 -0700
|
||||
+++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2020-08-12 11:11:05.480713407 -0700
|
||||
@@ -2329,11 +2329,11 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co
|
||||
}
|
||||
|
||||
//Massage the tokenInfo so it adhered to when coolkey was doing it.
|
||||
- if(hasApplet) {
|
||||
+ if(hasApplet == 1 || isACAC == 1 || isAPIV == 1) {
|
||||
tokenInfo.firmwareVersion.major = 1;
|
||||
}
|
||||
|
||||
- if(isPersonalized) {
|
||||
+ if(isPersonalized == 1 || isACAC == 1 || isAPIV == 1) {
|
||||
tokenInfo.flags |= CKF_TOKEN_INITIALIZED;
|
||||
}
|
||||
|
||||
26
esc-gcc11.patch
Normal file
26
esc-gcc11.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/esc/src/lib/coolkey/CoolKey_Message.cpp b/esc/src/lib/coolkey/CoolKey_Message.cpp
|
||||
index 87ee309..7b80f70 100644
|
||||
--- a/esc/src/lib/coolkey/CoolKey_Message.cpp
|
||||
+++ b/esc/src/lib/coolkey/CoolKey_Message.cpp
|
||||
@@ -213,7 +213,7 @@ void eCKMessage::setBinValue(string &aKey,unsigned char*aValue,int *aSize)
|
||||
if(!aKey.length())
|
||||
return;
|
||||
|
||||
- if(aSize <=0 || !aValue)
|
||||
+ if(aSize ==0 || !aValue)
|
||||
return;
|
||||
|
||||
string data = "";
|
||||
diff --git a/esc/src/lib/nss-http-client/request.cpp b/esc/src/lib/nss-http-client/request.cpp
|
||||
index cabd94f..5428350 100644
|
||||
--- a/esc/src/lib/nss-http-client/request.cpp
|
||||
+++ b/esc/src/lib/nss-http-client/request.cpp
|
||||
@@ -192,7 +192,7 @@ PRBool PSHttpRequest::setBody(int size, const char* body) {
|
||||
}
|
||||
|
||||
_bodyLength = size;
|
||||
- sprintf(_body,body);
|
||||
+ sprintf(_body,"%s",body);
|
||||
//_body = (char *)body;
|
||||
|
||||
return PR_TRUE;
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Name=Smart Card Manager
|
||||
Comment=Enterprise Security Client Smart Card Manager
|
||||
Categories=System;Application;SystemSetup;X-Red-Hat-Base;
|
||||
Categories=System;
|
||||
Exec=esc
|
||||
Icon=esc.png
|
||||
Icon=esc
|
||||
|
|
|
|||
397
esc.spec
397
esc.spec
|
|
@ -1,68 +1,72 @@
|
|||
Name: esc
|
||||
Version: 1.1.0
|
||||
Release: 15%{?dist}
|
||||
Version: 1.1.2
|
||||
Release: 22%{?dist}
|
||||
Summary: Enterprise Security Client Smart Card Client
|
||||
License: GPL
|
||||
License: GPL-1.0-or-later
|
||||
URL: http://directory.fedora.redhat.com/wiki/CoolKey
|
||||
Group: Applications/Internet
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
#BuildRequires: doxygen fontconfig-devel
|
||||
BuildRequires: glib2-devel atk-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: nspr-devel nss-devel nss-static
|
||||
#BuildRequires: libX11-devel libXt-devel
|
||||
|
||||
Patch1: esc-1.1.0-fix1.patch
|
||||
Patch2: esc-1.1.0-fix2.patch
|
||||
Patch3: esc-1.1.0-fix3.patch
|
||||
Patch4: esc-1.1.0-fix4.patch
|
||||
Patch5: esc-1.1.0-fix5.patch
|
||||
Patch6: esc-1.1.0-fix6.patch
|
||||
Patch7: esc-1.1.0-fix7.patch
|
||||
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
|
||||
|
||||
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: nspr-devel nss-devel
|
||||
BuildRequires: autoconf213 libX11-devel libXt-devel
|
||||
BuildRequires: xulrunner xulrunner-devel
|
||||
|
||||
BuildRequires: pcsc-lite-devel coolkey-devel
|
||||
BuildRequires: desktop-file-utils zip binutils libnotify-devel
|
||||
BuildRequires: pcsc-lite-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
%if ! 0%{?rhel} >= 9
|
||||
BuildRequires: pkgconfig(gconf-2.0)
|
||||
%endif
|
||||
BuildRequires: dbus-devel
|
||||
Requires: pcsc-lite coolkey nss nspr
|
||||
Requires: zip dbus >= 0.90 libnotify >= 0.4.2
|
||||
Requires: xulrunner
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: opensc
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: gjs-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
BuildRequires: chrpath
|
||||
|
||||
# 390 does not have coolkey or smartCards
|
||||
ExcludeArch: s390 s390x
|
||||
|
||||
# We can't allow the internal xulrunner to leak out
|
||||
Requires: pcsc-lite nss nspr
|
||||
Requires: dbus
|
||||
Requires: opensc
|
||||
Requires: gjs
|
||||
Requires: gobject-introspection
|
||||
Requires: gtk3
|
||||
Requires: glib2
|
||||
|
||||
# multiple libraries in package-specific directory, linked against each other
|
||||
AutoReqProv: 0
|
||||
|
||||
#%define __prelink_undo_cmd %{nil}
|
||||
%define debug_build 0
|
||||
|
||||
%define escname %{name}-%{version}
|
||||
%define escdir %{_libdir}/%{escname}
|
||||
%define escbindir %{_bindir}
|
||||
%define esc_chromepath chrome/content/esc
|
||||
%define appdir applications
|
||||
%define icondir %{_datadir}/icons/hicolor/48x48/apps
|
||||
%define esc_vendor esc
|
||||
%define autostartdir %{_sysconfdir}/xdg/autostart
|
||||
%define icondir %{_datadir}/icons/hicolor/48x48/apps
|
||||
%define pixmapdir %{_datadir}/pixmaps
|
||||
%define docdir %{_defaultdocdir}/%{escname}
|
||||
%define escappdir src/app/xpcom
|
||||
%define escxuldir src/app/xul/esc
|
||||
%define escxulchromeicons %{escxuldir}/chrome/icons/default
|
||||
%define escdaemon escd
|
||||
|
||||
|
||||
Source0: %{escname}.tar.bz2
|
||||
Source1: esc
|
||||
Source0: https://www.dogtagpki.org/pki/sources/esc/%{escname}.tar.bz2
|
||||
Source1: https://www.dogtagpki.org/pki/sources/esc/esc
|
||||
# originally https://www.dogtagpki.org/pki/sources/esc/esc.desktop, since modified
|
||||
Source2: esc.desktop
|
||||
Source3: esc.png
|
||||
Source3: https://www.dogtagpki.org/pki/sources/esc/esc.png
|
||||
Patch0: esc-gcc11.patch
|
||||
Patch1: esc-1.1.2-fix1.patch
|
||||
Patch2: esc-1.1.2-fix2.patch
|
||||
Patch3: esc-1.1.2-fix3.patch
|
||||
Patch4: esc-1.1.2-fix4.patch
|
||||
Patch5: esc-1.1.2-fix5.patch
|
||||
Patch6: esc-1.1.2-fix6.patch
|
||||
Patch7: esc-1.1.2-fix7.patch
|
||||
Patch8: esc-1.1.2-fix8.patch
|
||||
Patch9: esc-1.1.2-fix9.patch
|
||||
Patch10: esc-1.1.2-fix10.patch
|
||||
Patch11: esc-1.1.2-fix11.patch
|
||||
Patch12: esc-1.1.2-fix12.patch
|
||||
Patch13: esc-1.1.2-fix13.patch
|
||||
|
||||
|
||||
%description
|
||||
|
|
@ -70,158 +74,203 @@ Enterprise Security Client allows the user to enroll and manage their
|
|||
cryptographic smartcards.
|
||||
|
||||
%prep
|
||||
%autosetup -c -p1 -n %{escname}
|
||||
|
||||
%setup -q -c -n %{escname}
|
||||
|
||||
#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
|
||||
|
||||
%build
|
||||
echo $RPM_BUILD_DIR
|
||||
|
||||
GECKO_SDK_PATH=%{_libdir}/xulrunner-devel-2/sdk
|
||||
GECKO_BIN_PATH=%{_libdir}/xulrunner-2
|
||||
GECKO_INCLUDE_PATH=%{_includedir}/xulrunner-2
|
||||
|
||||
%ifarch x86_64 ppc64 ia64
|
||||
USE_64=1
|
||||
export USE_64
|
||||
%endif
|
||||
|
||||
export GECKO_SDK_PATH
|
||||
export GECKO_BIN_PATH
|
||||
export GECKO_INCLUDE_PATH
|
||||
# last setup call moved the current directory
|
||||
|
||||
echo "build section" $PWD
|
||||
cd esc
|
||||
#cd ../..
|
||||
|
||||
cp %{SOURCE3} %{escxuldir}/%{esc_chromepath}
|
||||
rm -f %{escxulchromeicons}/*.ico
|
||||
cp %{escxulchromeicons}/esc-window.xpm %{escxulchromeicons}/default.xpm
|
||||
autoreconf --force --install --verbose
|
||||
%configure --bindir %{escdir} --libdir %{escdir}/lib --datadir %{_datadir}
|
||||
%make_build -j1
|
||||
|
||||
make BUILD_OPT=1 HAVE_LIB_NOTIFY=1 ESC_VERSION=%{version}-%{release} USE_XUL_SDK=1
|
||||
|
||||
%install
|
||||
echo "install section" $PWD
|
||||
cd esc
|
||||
%make_install
|
||||
|
||||
cd esc/src/app/xpcom
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{icondir}
|
||||
mkdir -p %{buildroot}%{_datadir}/applications
|
||||
mkdir -p %{buildroot}%{pixmapdir}
|
||||
mkdir -p %{buildroot}%{docdir}
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{escbindir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{icondir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{appdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{autostartdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{pixmapdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{docdir}
|
||||
echo "dir: " %{buildroot}%{_bindir}/%{name}
|
||||
sed -e 's;\$LIBDIR;'%{_libdir}';g' %{SOURCE1} > %{buildroot}%{_bindir}/%{name}
|
||||
chmod 755 %{buildroot}%{_bindir}/%{name}
|
||||
chmod -x %{buildroot}%{escdir}/*.{conf,js,properties}
|
||||
|
||||
rm %{buildroot}%{escdir}/lib/*.a
|
||||
rm %{buildroot}%{escdir}/lib/*.la
|
||||
rm -r %{buildroot}%{_includedir}/coolkey-mgr/
|
||||
rm -r %{buildroot}%{_datadir}/gir-*/
|
||||
|
||||
sed -e 's;\$LIBDIR;'%{_libdir}';g' %{SOURCE1} > $RPM_BUILD_ROOT/%{escbindir}/%{name}
|
||||
cp %{SOURCE3} %{buildroot}%{icondir}
|
||||
cp %{SOURCE3} %{buildroot}%{pixmapdir}/esc.png
|
||||
|
||||
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE2}
|
||||
|
||||
chmod 755 $RPM_BUILD_ROOT/%{escbindir}/esc
|
||||
#Get rid of rpath
|
||||
chrpath --delete %{buildroot}%{escdir}/lib/libcoolkeymgr-1.0.so
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{escdir}
|
||||
|
||||
%ifarch x86_64 ppc64 ia64
|
||||
USE_64=1
|
||||
export USE_64
|
||||
%endif
|
||||
|
||||
|
||||
make BUILD_OPT=1 USE_XUL_SDK=1 install DESTDIR=$RPM_BUILD_ROOT/%{escdir}
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT/%{escdir}/usr
|
||||
|
||||
cd ../../../dist/*OPT*/esc_build/esc
|
||||
|
||||
cp %{esc_chromepath}/esc.png $RPM_BUILD_ROOT/%{icondir}
|
||||
ln -s $RPMBUILD_ROOT%{icondir}/esc.png $RPM_BUILD_ROOT/%{pixmapdir}/esc.png
|
||||
|
||||
cp %{SOURCE2} $RPM_BUILD_ROOT/%{_datadir}/%{appdir}
|
||||
cp %{SOURCE2} $RPM_BUILD_ROOT/%{autostartdir}
|
||||
|
||||
cd %{_builddir}
|
||||
cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir}
|
||||
|
||||
rm -f $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
|
||||
echo "xulrunner ./application.ini \$* &" > $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
|
||||
chmod 755 $RPM_BUILD_ROOT/%{escdir}/esc
|
||||
chmod 755 -R $RPM_BUILD_ROOT/%{escdir}/chrome
|
||||
chmod 755 -R $RPM_BUILD_ROOT/%{escdir}/defaults
|
||||
chmod 755 $RPM_BUILD_ROOT/%{escdir}/application.ini
|
||||
|
||||
|
||||
%clean
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%license esc/LICENSE
|
||||
|
||||
%{escdir}/esc
|
||||
%{escdir}/escd
|
||||
%{escbindir}/esc
|
||||
%{escdir}/application.ini
|
||||
|
||||
%{escdir}/chrome.manifest
|
||||
%{escdir}/chrome/chrome.manifest
|
||||
|
||||
%{escdir}/chrome/content
|
||||
%{escdir}/chrome/locale
|
||||
%{escdir}/chrome/icons/default
|
||||
%{escdir}/components
|
||||
|
||||
%{escdir}/defaults/preferences/esc-prefs.js
|
||||
|
||||
#%{escdir}/xulrunner
|
||||
%{_bindir}/esc
|
||||
%dir %{escdir}
|
||||
%{escdir}/lib
|
||||
%{escdir}/*.js
|
||||
%{escdir}/esc.properties
|
||||
%{escdir}/opensc.esc.conf
|
||||
%{_datadir}/applications/esc.desktop
|
||||
%{icondir}/esc.png
|
||||
%{pixmapdir}/esc.png
|
||||
%{autostartdir}/esc.desktop
|
||||
%{_datadir}/%{appdir}/esc.desktop
|
||||
%doc %{docdir}/LICENSE
|
||||
|
||||
%post
|
||||
touch --no-create %{_datadir}/icons/hicolor || :
|
||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
|
||||
killall --exact -q escd
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
touch --no-create %{_datadir}/icons/hicolor || :
|
||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Mon Feb 20 2012 Jack Magne <jmagne@redhat.com>= 1.1.0-15
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jun 22 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.2-16
|
||||
- Sync patches from c9s
|
||||
- Enable s390x build
|
||||
- Fix various packaging issues
|
||||
|
||||
* Wed May 10 2023 Tomas Popela <tpopela@redhat.com> - 1.1.2-15
|
||||
- Drop BR on dbus-glib as the project is not using it at all. Explicitly add the
|
||||
dbus-devel to BR as that's what the project is using.
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Tue Nov 09 2021 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.2-11
|
||||
- Fix rpath (#1987464)
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Tomas Popela <tpopela@redhat.com> - 1.1.2-9
|
||||
- Don't enable GConf2 on RHEL 9 as it won't be available there.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Jeff Law <law@redhat.com> - 1.1.2-7
|
||||
- Force C++14 as this code is not C++17 ready
|
||||
- Fix sprintf format issue
|
||||
- Fix ordered comparison of a pointer against zero issue
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Aug 01 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-1
|
||||
- Remove uneeded Requires and no longer put in autostart directory.
|
||||
* Mon Jul 30 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-1
|
||||
- Build bare bones esc, without xulrunner, using gjs / gobject
|
||||
- introspection.
|
||||
* Thu Jun 07 2018 Jack Magne <jmagne@redhat.com> - 1.1.1-5
|
||||
- Rebuild.
|
||||
* Mon Apr 23 2018 Jack Magne <jmagne@redhat.com> - 1.1.1-4
|
||||
- Remove coolkey dependencies, replace with opensc.
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.1-2
|
||||
- Remove obsolete scriptlets
|
||||
|
||||
* 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
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-31
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Sun May 8 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-30
|
||||
- Secondary arch fixes
|
||||
- Use %%license
|
||||
|
||||
* Mon Feb 08 2016 Jack Magne <jmagne@redhat.com> 1.1.0-29
|
||||
- Apease latest xullrunner api changes.
|
||||
|
||||
* Thu Apr 09 2015 Jack Magne <jmagne@redhat.com> 1.1.0-27
|
||||
- More xulrunner adjustments.
|
||||
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-26
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-25
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Wed Apr 23 2014 Jack Magne <jmagne@redhat.com>=1.1.0-24
|
||||
- Fix minor http client error.
|
||||
* Thu Apr 17 2014 Jack Maghe <jmagne@redhat.com>=1.1.0-23
|
||||
- Appease more xulrunner changes.
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Sun Jul 7 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.1.0-22
|
||||
- Make buildable with kernels > 3.5.
|
||||
- %%changelog syntax and bogus date fixes.
|
||||
- Bump xulrunner version to 22.0.
|
||||
|
||||
* Mon Jun 17 2013 Jack Magne <jmagne@redhat.com>- 1.1.0-21
|
||||
- Appease latest compiler errors and build to xulrunner 21.0.
|
||||
* Wed Nov 28 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-20
|
||||
- Gecko no longer supports UniversalXPConnect, remove it.
|
||||
* Wed Nov 21 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-19
|
||||
- Pick up latest fixes.
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Fri Jun 22 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-17
|
||||
- Related #688361 - Get ESC to run on Gecko 2.0, again.
|
||||
* Thu May 10 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-16
|
||||
- Related #688361 - Get ESC to run on Gecko 2.0.
|
||||
* Tue Nov 19 2011 Jack Magne <jmagne@redhat.com>= 1.1.0-14
|
||||
* Mon Feb 20 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-15
|
||||
- Related #688361 - Get ESC to run on Gecko 2.0.
|
||||
* Thu Apr 15 2010 Jack Magne <jmagne@redhat.com>= 1.1.0-11
|
||||
* Tue Nov 29 2011 Jack Magne <jmagne@redhat.com>- 1.1.0-14
|
||||
- Related #688361 - Get ESC to run on Gecko 2.0.
|
||||
* Thu Apr 15 2010 Jack Magne <jmagne@redhat.com>- 1.1.0-11
|
||||
- Adjust for new linking rules.
|
||||
* Tue Sep 15 2009 Jack Magne <jmagne@redhat.com>= 1.1.0-10
|
||||
* Tue Sep 15 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-10
|
||||
- Pick up latest improvements.
|
||||
* Mon Jun 22 2009 Jack Magne <jmagne@redhat.com>= 1.1.0-9
|
||||
* Mon Jun 22 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-9
|
||||
- Related: #496410, also IPV6 support.
|
||||
* Fri Jun 19 2009 Jack Magne <jmagne@redhat.com>= 1.1.0-8
|
||||
* Fri Jun 19 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-8
|
||||
- Related: #496410, SSL Conn fix.
|
||||
* Mon Jun 8 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-7
|
||||
- Releated: #496410.
|
||||
|
|
@ -283,7 +332,7 @@ fi
|
|||
-fix for escd double free problem. Bug #209882
|
||||
* Tue Oct 24 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-18
|
||||
-rebuilt on RHEL-5 branch
|
||||
* Sun Oct 4 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-17
|
||||
* Wed Oct 4 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-17
|
||||
- Diagnostics display fixes, Mac and Window fixes.
|
||||
|
||||
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0-16
|
||||
|
|
@ -310,7 +359,7 @@ fi
|
|||
* Wed Aug 30 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-9
|
||||
- Revision of the strings used in ESC.
|
||||
|
||||
* Sat Aug 27 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-8
|
||||
* Wed Aug 30 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-8
|
||||
- Fixes to get libnotify working properly on FC6 systems.
|
||||
|
||||
* Tue Aug 22 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-7
|
||||
|
|
@ -321,7 +370,7 @@ fi
|
|||
* Fri Aug 18 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-6
|
||||
- Correct problem with Patch #6
|
||||
|
||||
* Tue Aug 17 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-5
|
||||
* Fri Aug 18 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-5
|
||||
- Build ESC's xulrunner component using system nss and nspr
|
||||
- Build process creates run script based on {_libdir} variable,
|
||||
accounting for differences on 64 bit machines.
|
||||
|
|
|
|||
|
|
@ -1,124 +0,0 @@
|
|||
Index: mozilla/security/coreconf/location.mk
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/coreconf/location.mk,v
|
||||
retrieving revision 1.9
|
||||
diff -u -r1.9 location.mk
|
||||
--- mozilla/security/coreconf/location.mk 25 Apr 2004 15:02:17 -0000 1.9
|
||||
+++ mozilla/security/coreconf/location.mk 11 Apr 2005 20:21:57 -0000
|
||||
@@ -61,6 +61,8 @@
|
||||
|
||||
DIST = $(SOURCE_PREFIX)/$(PLATFORM)
|
||||
|
||||
+NSPR_LIBDIR = $(DIST)/lib
|
||||
+
|
||||
ifdef BUILD_DEBUG_GC
|
||||
DEFINES += -DDEBUG_GC
|
||||
endif
|
||||
Index: mozilla/security/manager/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v
|
||||
retrieving revision 1.56
|
||||
diff -u -r1.56 Makefile.in
|
||||
--- mozilla/security/manager/Makefile.in 14 Mar 2005 10:00:58 -0000 1.56
|
||||
+++ mozilla/security/manager/Makefile.in 11 Apr 2005 20:21:57 -0000
|
||||
@@ -76,12 +76,23 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
+ABS_DIST := $(shell cd $(DIST) && pwd)
|
||||
+ifeq ($(OS_ARCH),WINNT)
|
||||
+ABS_DIST := $(shell cygpath -w $(ABS_DIST) | sed -e 's|\\\\|/|g')
|
||||
+endif
|
||||
+NSPR_LIBDIR = $(firstword $(filter -L%,$(NSPR_LIBS)))
|
||||
+ifneq (,$(strip $(NSPR_LIBDIR)))
|
||||
+NSPR_LIBDIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIBDIR)))
|
||||
+else
|
||||
+NSPR_LIBDIR = $(ABS_DIST)/lib
|
||||
+endif
|
||||
# NSS makefiles are not safe for parallel execution.
|
||||
DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1
|
||||
DEFAULT_GMAKE_FLAGS += CC="$(CC)"
|
||||
-DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="-I$(MOZ_BUILD_ROOT)/dist/include/nspr -I$(MOZ_BUILD_ROOT)/dist/include/dbm"
|
||||
-DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(MOZ_BUILD_ROOT)/dist
|
||||
-DEFAULT_GMAKE_FLAGS += DIST=$(MOZ_BUILD_ROOT)/dist
|
||||
+DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_CFLAGS) -I$(DIST)/include/dbm)"
|
||||
+DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST)
|
||||
+DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
|
||||
+DEFAULT_GMAKE_FLAGS += NSPR_LIBDIR=$(NSPR_LIBDIR)
|
||||
DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
|
||||
DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
|
||||
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
|
||||
Index: mozilla/security/nss/lib/ckfw/builtins/Makefile
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/ckfw/builtins/Makefile,v
|
||||
retrieving revision 1.14
|
||||
diff -u -r1.14 Makefile
|
||||
--- mozilla/security/nss/lib/ckfw/builtins/Makefile 20 Jan 2005 02:25:46 -0000 1.14
|
||||
+++ mozilla/security/nss/lib/ckfw/builtins/Makefile 11 Apr 2005 20:21:57 -0000
|
||||
@@ -53,23 +53,23 @@
|
||||
# This is merely an expedient hack and not the right solution.
|
||||
ifdef NS_USE_GCC
|
||||
EXTRA_LIBS += \
|
||||
- -L$(DIST)/lib \
|
||||
+ -L$(NSPR_LIBDIR) \
|
||||
-lplc4 \
|
||||
-lplds4 \
|
||||
-lnspr4 \
|
||||
$(NULL)
|
||||
else
|
||||
EXTRA_LIBS += \
|
||||
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
|
||||
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
|
||||
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
|
||||
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
EXTRA_LIBS += \
|
||||
- $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
|
||||
- $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
|
||||
+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
|
||||
+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
endif
|
||||
Index: mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile,v
|
||||
retrieving revision 1.18
|
||||
diff -u -r1.18 Makefile
|
||||
--- mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile 25 Apr 2004 15:03:08 -0000 1.18
|
||||
+++ mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile 11 Apr 2005 20:21:57 -0000
|
||||
@@ -63,7 +63,7 @@
|
||||
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
|
||||
$(CRYPTO_LIB) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
|
||||
- -L$(DIST)/lib \
|
||||
+ -L$(NSPR_LIBDIR) \
|
||||
-lplc4 \
|
||||
-lplds4 \
|
||||
-lnspr4 \
|
||||
@@ -76,8 +76,8 @@
|
||||
$(DIST)/lib/softokn.lib \
|
||||
$(CRYPTO_LIB) \
|
||||
$(DIST)/lib/secutil.lib \
|
||||
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
|
||||
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
|
||||
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
|
||||
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
|
||||
wsock32.lib \
|
||||
winmm.lib \
|
||||
$(NULL)
|
||||
@@ -98,8 +98,8 @@
|
||||
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
|
||||
$(CRYPTO_LIB) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
|
||||
- $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
|
||||
- $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
|
||||
+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
|
||||
+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
endif
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
76dc573edfd410f3fdd08ad0010b9205 esc-1.1.0.tar.bz2
|
||||
SHA512 (esc-1.1.2.tar.bz2) = ffcc5bdb95b93862790a223bde2ac7d8f5cd9788ea05815a8c6f55f1e1e9b41ef0bc19c7d7c4e97ee313e5bb1696da486d4d2f2719ea11b9ac8491d25d85969f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue