author | Wolfgang Rosenauer <wr@rosenauer.org> |
Wed, 05 Feb 2014 07:13:27 +0100 | |
changeset 700 | 52284fd63667 |
parent 699 | f810fbe5fece |
child 703 | c4aab80e472f |
permissions | -rw-r--r-- |
1 | 1 |
From: Hans Petter Jansson <hpj@copyleft.no> |
2 |
Wolfgang Rosenauer <wr@rosenauer.org> |
|
3 |
Subject: use libnsssharedhelper if available at compile time |
|
4 |
(can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1) |
|
5 |
References: |
|
6 |
||
7 |
diff --git a/configure.in b/configure.in |
|
8 |
--- a/configure.in |
|
9 |
+++ b/configure.in |
|
691
18c2dc922e51
update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
686
diff
changeset
|
10 |
@@ -7999,16 +7999,31 @@ AC_SUBST(QCMS_LIBS) |
1 | 11 |
|
12 |
dnl ======================================================== |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
13 |
dnl HarfBuzz |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
14 |
dnl ======================================================== |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
15 |
MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)' |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
16 |
AC_SUBST(MOZ_HARFBUZZ_LIBS) |
1 | 17 |
|
18 |
dnl ======================================================== |
|
19 |
+dnl Check for nss-shared-helper |
|
20 |
+dnl ======================================================== |
|
21 |
+ |
|
191
14282ac75832
update to FIREFOX_4_0b7_BUILD1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
164
diff
changeset
|
22 |
+ PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper, |
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
23 |
+ [MOZ_ENABLE_NSSHELPER=1], |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
24 |
+ [MOZ_ENABLE_NSSHELPER=]) |
1 | 25 |
+ |
26 |
+if test "$MOZ_ENABLE_NSSHELPER"; then |
|
27 |
+ AC_DEFINE(MOZ_ENABLE_NSSHELPER) |
|
28 |
+fi |
|
29 |
+AC_SUBST(MOZ_ENABLE_NSSHELPER) |
|
30 |
+AC_SUBST(NSSHELPER_CFLAGS) |
|
31 |
+AC_SUBST(NSSHELPER_LIBS) |
|
32 |
+ |
|
33 |
+dnl ======================================================== |
|
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
34 |
dnl SIL Graphite |
191
14282ac75832
update to FIREFOX_4_0b7_BUILD1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
164
diff
changeset
|
35 |
dnl ======================================================== |
650 | 36 |
MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)' |
37 |
AC_SUBST(MOZ_GRAPHITE_LIBS) |
|
38 |
||
39 |
dnl ======================================================== |
|
40 |
dnl OTS |
|
41 |
dnl ======================================================== |
|
1 | 42 |
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in |
43 |
--- a/security/manager/ssl/src/Makefile.in |
|
44 |
+++ b/security/manager/ssl/src/Makefile.in |
|
691
18c2dc922e51
update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
686
diff
changeset
|
45 |
@@ -4,8 +4,11 @@ |
18c2dc922e51
update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
686
diff
changeset
|
46 |
# License, v. 2.0. If a copy of the MPL was not distributed with this |
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
47 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
515 | 48 |
|
653 | 49 |
DEFINES += \ |
50 |
-DNSS_ENABLE_ECC \ |
|
51 |
-DDLL_PREFIX=\"$(DLL_PREFIX)\" \ |
|
52 |
-DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ |
|
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
53 |
$(NULL) |
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
54 |
+ |
585
5a44d417c9b5
prepare for Beta 18 phase
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
568
diff
changeset
|
55 |
+LOCAL_INCLUDES += $(NSSHELPER_CFLAGS) |
5a44d417c9b5
prepare for Beta 18 phase
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
568
diff
changeset
|
56 |
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS) |
1 | 57 |
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp |
58 |
--- a/security/manager/ssl/src/nsNSSComponent.cpp |
|
59 |
+++ b/security/manager/ssl/src/nsNSSComponent.cpp |
|
596 | 60 |
@@ -3,16 +3,23 @@ |
467
a9baaad57fa4
refreshed patches and removed obsolete ones
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
438
diff
changeset
|
61 |
* This Source Code Form is subject to the terms of the Mozilla Public |
a9baaad57fa4
refreshed patches and removed obsolete ones
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
438
diff
changeset
|
62 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
a9baaad57fa4
refreshed patches and removed obsolete ones
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
438
diff
changeset
|
63 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
1 | 64 |
|
596 | 65 |
#ifdef MOZ_LOGGING |
66 |
#define FORCE_PR_LOG 1 |
|
67 |
#endif |
|
68 |
||
1 | 69 |
+#ifdef MOZ_ENABLE_NSSHELPER |
70 |
+#pragma GCC visibility push(default) |
|
71 |
+#include <nss-shared-helper.h> |
|
72 |
+#pragma GCC visibility pop |
|
73 |
+#include "prenv.h" |
|
74 |
+#endif |
|
75 |
+ |
|
76 |
#include "nsNSSComponent.h" |
|
653 | 77 |
|
78 |
#include "CertVerifier.h" |
|
699 | 79 |
#include "mozilla/Telemetry.h" |
1 | 80 |
#include "nsCertVerificationThread.h" |
659 | 81 |
#include "nsAppDirectoryServiceDefs.h" |
82 |
#include "nsComponentManagerUtils.h" |
|
83 |
#include "nsDirectoryServiceDefs.h" |
|
699 | 84 |
@@ -1263,18 +1270,35 @@ nsNSSComponent::InitializeNSS(bool showW |
1 | 85 |
ConfigureInternalPKCS11Token(); |
86 |
||
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
87 |
// The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
88 |
// module by NSS_Initialize because we will load it in InstallLoadableRoots |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
89 |
// later. It also allows us to work around a bug in the system NSS in |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
90 |
// Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
91 |
// "/usr/lib/nss/libnssckbi.so". |
541
830e50bbfc79
working Aurora 17.0 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
515
diff
changeset
|
92 |
uint32_t init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; |
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
93 |
- SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
94 |
- SECMOD_DB, init_flags); |
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
95 |
+ |
1 | 96 |
+ SECStatus init_rv = SECFailure; |
97 |
+#ifdef MOZ_ENABLE_NSSHELPER |
|
98 |
+ if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) { |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
99 |
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
100 |
+ SECMOD_DB, init_flags); |
1 | 101 |
+ } else { |
357
db07eb421d6b
fix nsshelper identifier "mozilla-xul" -> "Firefox"
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
356
diff
changeset
|
102 |
+ init_rv = ::nsshelp_open_db ("Firefox", profileStr.get(), init_flags); |
1 | 103 |
+ |
104 |
+ if (init_rv != SECSuccess) { |
|
105 |
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get())); |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
106 |
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
107 |
+ SECMOD_DB, init_flags); |
1 | 108 |
+ } |
109 |
+ } |
|
110 |
+#else |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
111 |
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
112 |
+ SECMOD_DB, init_flags); |
1 | 113 |
+#endif |
114 |
||
115 |
if (init_rv != SECSuccess) { |
|
116 |
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get())); |
|
117 |
||
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
118 |
if (suppressWarningPref) { |
1 | 119 |
which_nss_problem = problem_none; |
120 |
} |
|
121 |
else { |
|
122 |
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in |
|
123 |
--- a/toolkit/library/Makefile.in |
|
124 |
+++ b/toolkit/library/Makefile.in |
|
691
18c2dc922e51
update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
686
diff
changeset
|
125 |
@@ -484,17 +484,17 @@ LOCAL_INCLUDES += -I$(topsrcdir)/intl/un |
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
126 |
ifneq (,$(filter OS2 WINNT,$(OS_ARCH))) |
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
127 |
SDK_LIBRARY = $(IMPORT_LIBRARY) |
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
128 |
else |
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
129 |
SDK_LIBRARY = $(SHARED_LIBRARY) |
289
3c0dff7ca9c4
Update to version 6.0b1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
191
diff
changeset
|
130 |
endif |
3c0dff7ca9c4
Update to version 6.0b1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
191
diff
changeset
|
131 |
|
659 | 132 |
EXTRA_DSO_LDOPTS += $(LIBS_DIR) |
1 | 133 |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
134 |
-EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
135 |
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS) |
1 | 136 |
|
137 |
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) |
|
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
138 |
CXXFLAGS += $(TK_CFLAGS) |
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
139 |
OS_LIBS += \ |
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
140 |
-framework SystemConfiguration \ |
515 | 141 |
-framework QTKit \ |
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
142 |
-framework IOKit \ |
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
143 |
-F/System/Library/PrivateFrameworks -framework CoreUI \ |