5 References: |
5 References: |
6 |
6 |
7 diff --git a/configure.in b/configure.in |
7 diff --git a/configure.in b/configure.in |
8 --- a/configure.in |
8 --- a/configure.in |
9 +++ b/configure.in |
9 +++ b/configure.in |
10 @@ -8217,16 +8217,31 @@ if test "$MOZ_ENABLE_SKIA"; then |
10 @@ -8296,16 +8296,31 @@ if test "$MOZ_ENABLE_SKIA"; then |
11 MOZ_ENABLE_SKIA_GPU=1 |
11 MOZ_ENABLE_SKIA_GPU=1 |
12 AC_DEFINE(USE_SKIA_GPU) |
12 AC_DEFINE(USE_SKIA_GPU) |
13 AC_SUBST(MOZ_ENABLE_SKIA_GPU) |
13 AC_SUBST(MOZ_ENABLE_SKIA_GPU) |
14 fi |
14 fi |
15 fi |
15 fi |
37 [ --disable-xul Disable XUL], |
37 [ --disable-xul Disable XUL], |
38 MOZ_XUL= ) |
38 MOZ_XUL= ) |
39 if test "$MOZ_XUL"; then |
39 if test "$MOZ_XUL"; then |
40 AC_DEFINE(MOZ_XUL) |
40 AC_DEFINE(MOZ_XUL) |
41 else |
41 else |
42 diff --git a/security/manager/ssl/src/moz.build b/security/manager/ssl/src/moz.build |
42 diff --git a/security/manager/ssl/moz.build b/security/manager/ssl/moz.build |
43 --- a/security/manager/ssl/src/moz.build |
43 --- a/security/manager/ssl/moz.build |
44 +++ b/security/manager/ssl/src/moz.build |
44 +++ b/security/manager/ssl/moz.build |
45 @@ -81,16 +81,19 @@ SOURCES += [ |
45 @@ -156,16 +156,19 @@ FAIL_ON_WARNINGS = True |
46 IPDL_SOURCES += [ |
46 FINAL_LIBRARY = 'xul' |
47 'PPSMContentDownloader.ipdl', |
|
48 ] |
|
49 |
47 |
50 LOCAL_INCLUDES += [ |
48 LOCAL_INCLUDES += [ |
51 '/security/manager/boot/src', |
49 '/dom/base', |
|
50 '/security/certverifier', |
|
51 '/security/pkix/include', |
52 ] |
52 ] |
53 |
53 |
54 +CXXFLAGS += sorted(CONFIG['NSSHELPER_CFLAGS']) |
54 +CXXFLAGS += sorted(CONFIG['NSSHELPER_CFLAGS']) |
55 +OS_LIBS += sorted(CONFIG['NSSHELPER_LIBS']) |
55 +OS_LIBS += sorted(CONFIG['NSSHELPER_LIBS']) |
56 + |
56 + |
57 if not CONFIG['MOZ_NO_SMART_CARDS']: |
57 GENERATED_INCLUDES += [ |
58 UNIFIED_SOURCES += [ |
58 '/dist/public/nss', |
59 'nsSmartCardMonitor.cpp', |
59 ] |
60 ] |
|
61 |
60 |
62 if CONFIG['MOZ_XUL']: |
61 if CONFIG['NSS_DISABLE_DBM']: |
63 UNIFIED_SOURCES += [ |
62 DEFINES['NSS_DISABLE_DBM'] = '1' |
64 'nsCertTree.cpp', |
63 |
65 diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp |
64 DEFINES['SSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES'] = 'True' |
66 --- a/security/manager/ssl/src/nsNSSComponent.cpp |
65 diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp |
67 +++ b/security/manager/ssl/src/nsNSSComponent.cpp |
66 --- a/security/manager/ssl/nsNSSComponent.cpp |
|
67 +++ b/security/manager/ssl/nsNSSComponent.cpp |
68 @@ -1,14 +1,21 @@ |
68 @@ -1,14 +1,21 @@ |
69 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
69 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
70 * |
70 * |
71 * This Source Code Form is subject to the terms of the Mozilla Public |
71 * This Source Code Form is subject to the terms of the Mozilla Public |
72 * License, v. 2.0. If a copy of the MPL was not distributed with this |
72 * License, v. 2.0. If a copy of the MPL was not distributed with this |
85 #include "NSSCertDBTrustDomain.h" |
85 #include "NSSCertDBTrustDomain.h" |
86 #include "mozilla/Telemetry.h" |
86 #include "mozilla/Telemetry.h" |
87 #include "nsAppDirectoryServiceDefs.h" |
87 #include "nsAppDirectoryServiceDefs.h" |
88 #include "nsCertVerificationThread.h" |
88 #include "nsCertVerificationThread.h" |
89 #include "nsAppDirectoryServiceDefs.h" |
89 #include "nsAppDirectoryServiceDefs.h" |
90 @@ -998,17 +1005,31 @@ nsNSSComponent::InitializeNSS() |
90 @@ -1015,17 +1022,31 @@ nsNSSComponent::InitializeNSS() |
91 if (NS_FAILED(rv)) { |
|
92 nsPSMInitPanic::SetPanic(); |
|
93 return NS_ERROR_NOT_AVAILABLE; |
91 return NS_ERROR_NOT_AVAILABLE; |
94 } |
92 } |
95 |
93 |
96 SECStatus init_rv = SECFailure; |
94 SECStatus init_rv = SECFailure; |
97 if (!profileStr.IsEmpty()) { |
95 bool nocertdb = Preferences::GetBool("security.nocertdb", false); |
|
96 |
|
97 if (!nocertdb && !profileStr.IsEmpty()) { |
98 // First try to initialize the NSS DB in read/write mode. |
98 // First try to initialize the NSS DB in read/write mode. |
99 - SECStatus init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
|
100 +#ifdef MOZ_ENABLE_NSSHELPER |
99 +#ifdef MOZ_ENABLE_NSSHELPER |
101 + if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) { |
100 + if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) { |
102 + init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
101 + init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
103 + } else { |
102 + } else { |
104 + uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; |
103 + uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; |
108 + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get())); |
107 + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get())); |
109 + init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
108 + init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
110 + } |
109 + } |
111 + } |
110 + } |
112 +#else |
111 +#else |
113 + init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
112 init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false); |
114 +#endif |
113 +#endif |
115 // If that fails, attempt read-only mode. |
114 // If that fails, attempt read-only mode. |
116 if (init_rv != SECSuccess) { |
115 if (init_rv != SECSuccess) { |
117 PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("could not init NSS r/w in %s\n", profileStr.get())); |
116 MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("could not init NSS r/w in %s\n", profileStr.get())); |
118 init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), true); |
117 init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), true); |
119 } |
118 } |
120 if (init_rv != SECSuccess) { |
119 if (init_rv != SECSuccess) { |
121 PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("could not init in r/o either\n")); |
120 MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("could not init in r/o either\n")); |
122 } |
121 } |
123 diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build |
122 diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build |
124 --- a/toolkit/library/moz.build |
123 --- a/toolkit/library/moz.build |
125 +++ b/toolkit/library/moz.build |
124 +++ b/toolkit/library/moz.build |
126 @@ -197,16 +197,18 @@ if CONFIG['MOZ_B2G_CAMERA'] and CONFIG[' |
125 @@ -203,16 +203,18 @@ if CONFIG['MOZ_B2G_CAMERA'] and CONFIG[' |
127 'stagefright_omx', |
126 'stagefright_omx', |
128 ] |
127 ] |
129 |
128 |
130 if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android': |
129 if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android': |
131 OS_LIBS += [ |
130 OS_LIBS += [ |