author | Dirk Müller <dmueller@suse.com> |
Sun, 13 Apr 2014 16:54:09 +0200 | |
changeset 715 | e1c226a4de34 |
parent 703 | c4aab80e472f |
child 716 | cef565f1c325 |
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 |
|
703 | 10 |
@@ -8042,16 +8042,31 @@ if test "$MOZ_ENABLE_SKIA"; then |
11 |
MOZ_ENABLE_SKIA_GPU=1 |
|
12 |
AC_DEFINE(USE_SKIA_GPU) |
|
13 |
AC_SUBST(MOZ_ENABLE_SKIA_GPU) |
|
14 |
fi |
|
15 |
fi |
|
16 |
AC_SUBST(MOZ_ENABLE_SKIA) |
|
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 ======================================================== |
|
703 | 34 |
dnl disable xul |
191
14282ac75832
update to FIREFOX_4_0b7_BUILD1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
164
diff
changeset
|
35 |
dnl ======================================================== |
703 | 36 |
MOZ_ARG_DISABLE_BOOL(xul, |
37 |
[ --disable-xul Disable XUL], |
|
38 |
MOZ_XUL= ) |
|
39 |
if test "$MOZ_XUL"; then |
|
40 |
AC_DEFINE(MOZ_XUL) |
|
41 |
else |
|
1 | 42 |
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in |
703 | 43 |
new file mode 100644 |
44 |
--- /dev/null |
|
1 | 45 |
+++ b/security/manager/ssl/src/Makefile.in |
703 | 46 |
@@ -0,0 +1,8 @@ |
47 |
+#! gmake |
|
48 |
+# |
|
49 |
+# This Source Code Form is subject to the terms of the Mozilla Public |
|
50 |
+# License, v. 2.0. If a copy of the MPL was not distributed with this |
|
51 |
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
52 |
+ |
585
5a44d417c9b5
prepare for Beta 18 phase
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
568
diff
changeset
|
53 |
+LOCAL_INCLUDES += $(NSSHELPER_CFLAGS) |
5a44d417c9b5
prepare for Beta 18 phase
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
568
diff
changeset
|
54 |
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS) |
1 | 55 |
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp |
56 |
--- a/security/manager/ssl/src/nsNSSComponent.cpp |
|
57 |
+++ b/security/manager/ssl/src/nsNSSComponent.cpp |
|
596 | 58 |
@@ -3,16 +3,23 @@ |
467
a9baaad57fa4
refreshed patches and removed obsolete ones
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
438
diff
changeset
|
59 |
* 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
|
60 |
* 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
|
61 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
1 | 62 |
|
596 | 63 |
#ifdef MOZ_LOGGING |
64 |
#define FORCE_PR_LOG 1 |
|
65 |
#endif |
|
66 |
||
1 | 67 |
+#ifdef MOZ_ENABLE_NSSHELPER |
68 |
+#pragma GCC visibility push(default) |
|
69 |
+#include <nss-shared-helper.h> |
|
70 |
+#pragma GCC visibility pop |
|
71 |
+#include "prenv.h" |
|
72 |
+#endif |
|
73 |
+ |
|
74 |
#include "nsNSSComponent.h" |
|
653 | 75 |
|
76 |
#include "CertVerifier.h" |
|
699 | 77 |
#include "mozilla/Telemetry.h" |
1 | 78 |
#include "nsCertVerificationThread.h" |
659 | 79 |
#include "nsAppDirectoryServiceDefs.h" |
80 |
#include "nsComponentManagerUtils.h" |
|
81 |
#include "nsDirectoryServiceDefs.h" |
|
703 | 82 |
@@ -1207,18 +1214,35 @@ nsNSSComponent::InitializeNSS() |
1 | 83 |
ConfigureInternalPKCS11Token(); |
84 |
||
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
85 |
// 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
|
86 |
// 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
|
87 |
// 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
|
88 |
// 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
|
89 |
// "/usr/lib/nss/libnssckbi.so". |
541
830e50bbfc79
working Aurora 17.0 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
515
diff
changeset
|
90 |
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
|
91 |
- SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
92 |
- SECMOD_DB, init_flags); |
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
93 |
+ |
1 | 94 |
+ SECStatus init_rv = SECFailure; |
95 |
+#ifdef MOZ_ENABLE_NSSHELPER |
|
96 |
+ if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) { |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
97 |
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
98 |
+ SECMOD_DB, init_flags); |
1 | 99 |
+ } else { |
357
db07eb421d6b
fix nsshelper identifier "mozilla-xul" -> "Firefox"
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
356
diff
changeset
|
100 |
+ init_rv = ::nsshelp_open_db ("Firefox", profileStr.get(), init_flags); |
1 | 101 |
+ |
102 |
+ if (init_rv != SECSuccess) { |
|
103 |
+ 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
|
104 |
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
105 |
+ SECMOD_DB, init_flags); |
1 | 106 |
+ } |
107 |
+ } |
|
108 |
+#else |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
109 |
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
110 |
+ SECMOD_DB, init_flags); |
1 | 111 |
+#endif |
112 |
||
113 |
if (init_rv != SECSuccess) { |
|
114 |
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get())); |
|
115 |
||
703 | 116 |
// try to init r/o |
117 |
init_flags |= NSS_INIT_READONLY; |
|
118 |
init_rv = ::NSS_Initialize(profileStr.get(), "", "", |
|
119 |
SECMOD_DB, init_flags); |
|
1 | 120 |
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in |
121 |
--- a/toolkit/library/Makefile.in |
|
122 |
+++ b/toolkit/library/Makefile.in |
|
703 | 123 |
@@ -245,17 +245,17 @@ endif |
686
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
124 |
ifneq (,$(filter OS2 WINNT,$(OS_ARCH))) |
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
125 |
SDK_LIBRARY = $(IMPORT_LIBRARY) |
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
126 |
else |
ab25aac2aa83
Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
680
diff
changeset
|
127 |
SDK_LIBRARY = $(SHARED_LIBRARY) |
289
3c0dff7ca9c4
Update to version 6.0b1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
191
diff
changeset
|
128 |
endif |
3c0dff7ca9c4
Update to version 6.0b1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
191
diff
changeset
|
129 |
|
659 | 130 |
EXTRA_DSO_LDOPTS += $(LIBS_DIR) |
1 | 131 |
|
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
132 |
-EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) |
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
133 |
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS) |
1 | 134 |
|
135 |
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) |
|
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
136 |
CXXFLAGS += $(TK_CFLAGS) |
125
bfef1af1ee28
reenable shared nss stuff
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1
diff
changeset
|
137 |
OS_LIBS += \ |
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
138 |
-framework SystemConfiguration \ |
515 | 139 |
-framework QTKit \ |
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
140 |
-framework IOKit \ |
703 | 141 |
-F$(MACOS_PRIVATE_FRAMEWORKS_DIR) -framework CoreUI \ |