mozilla-shared-nss-db.patch
changeset 686 ab25aac2aa83
parent 680 be770d3cbc02
child 691 18c2dc922e51
equal deleted inserted replaced
680:be770d3cbc02 686:ab25aac2aa83
     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 @@ -8289,16 +8289,31 @@ AC_SUBST(QCMS_LIBS)
    10 @@ -8162,16 +8162,31 @@ AC_SUBST(QCMS_LIBS)
    11  
    11  
    12  dnl ========================================================
    12  dnl ========================================================
    13  dnl HarfBuzz
    13  dnl HarfBuzz
    14  dnl ========================================================
    14  dnl ========================================================
    15  MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
    15  MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
    40  dnl OTS
    40  dnl OTS
    41  dnl ========================================================
    41  dnl ========================================================
    42 diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
    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
    43 --- a/security/manager/ssl/src/Makefile.in
    44 +++ b/security/manager/ssl/src/Makefile.in
    44 +++ b/security/manager/ssl/src/Makefile.in
    45 @@ -18,10 +18,13 @@ LIBXUL_LIBRARY	= 1
    45 @@ -5,8 +5,11 @@
    46  CSRCS += md4.c
    46  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
    47  
    47  
       
    48  EXPORT_LIBRARY	= 1
    48  DEFINES += \
    49  DEFINES += \
    49    -DNSS_ENABLE_ECC \
    50    -DNSS_ENABLE_ECC \
    50    -DDLL_PREFIX=\"$(DLL_PREFIX)\" \
    51    -DDLL_PREFIX=\"$(DLL_PREFIX)\" \
    51    -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
    52    -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
    52    $(NULL)
    53    $(NULL)
    53  
    54 +
    54 +LOCAL_INCLUDES += $(NSSHELPER_CFLAGS)
    55 +LOCAL_INCLUDES += $(NSSHELPER_CFLAGS)
    55 +EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
    56 +EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
    56 +
       
    57  include $(topsrcdir)/config/rules.mk
       
    58  
       
    59 diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
    57 diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
    60 --- a/security/manager/ssl/src/nsNSSComponent.cpp
    58 --- a/security/manager/ssl/src/nsNSSComponent.cpp
    61 +++ b/security/manager/ssl/src/nsNSSComponent.cpp
    59 +++ b/security/manager/ssl/src/nsNSSComponent.cpp
    62 @@ -3,16 +3,23 @@
    60 @@ -3,16 +3,23 @@
    63   * This Source Code Form is subject to the terms of the Mozilla Public
    61   * This Source Code Form is subject to the terms of the Mozilla Public
    81  #include "nsCertVerificationThread.h"
    79  #include "nsCertVerificationThread.h"
    82  #include "nsAppDirectoryServiceDefs.h"
    80  #include "nsAppDirectoryServiceDefs.h"
    83  #include "nsComponentManagerUtils.h"
    81  #include "nsComponentManagerUtils.h"
    84  #include "nsDirectoryServiceDefs.h"
    82  #include "nsDirectoryServiceDefs.h"
    85  #include "nsICertOverrideService.h"
    83  #include "nsICertOverrideService.h"
    86 @@ -1144,18 +1151,34 @@ nsNSSComponent::InitializeNSS(bool showW
    84 @@ -1136,18 +1143,35 @@ nsNSSComponent::InitializeNSS(bool showW
    87      ConfigureInternalPKCS11Token();
    85      ConfigureInternalPKCS11Token();
    88  
    86  
    89      // The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
    87      // The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
    90      // module by NSS_Initialize because we will load it in InstallLoadableRoots
    88      // module by NSS_Initialize because we will load it in InstallLoadableRoots
    91      // later.  It also allows us to work around a bug in the system NSS in
    89      // later.  It also allows us to work around a bug in the system NSS in
    92      // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as
    90      // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as
    93      // "/usr/lib/nss/libnssckbi.so".
    91      // "/usr/lib/nss/libnssckbi.so".
    94      uint32_t init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
    92      uint32_t init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
    95 -    SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "",
    93 -    SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "",
    96 -                                         SECMOD_DB, init_flags);
    94 -                                         SECMOD_DB, init_flags);
       
    95 +
    97 +    SECStatus init_rv = SECFailure;
    96 +    SECStatus init_rv = SECFailure;
    98 +#ifdef MOZ_ENABLE_NSSHELPER
    97 +#ifdef MOZ_ENABLE_NSSHELPER
    99 +    if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) {
    98 +    if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) {
   100 +      init_rv = ::NSS_Initialize(profileStr.get(), "", "",
    99 +      init_rv = ::NSS_Initialize(profileStr.get(), "", "",
   101 +                                 SECMOD_DB, init_flags);
   100 +                                 SECMOD_DB, init_flags);
   114 +#endif
   113 +#endif
   115  
   114  
   116      if (init_rv != SECSuccess) {
   115      if (init_rv != SECSuccess) {
   117        PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get()));
   116        PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get()));
   118  
   117  
   119        if (supress_warning_preference) {
   118        if (suppressWarningPref) {
   120          which_nss_problem = problem_none;
   119          which_nss_problem = problem_none;
   121        }
   120        }
   122        else {
   121        else {
   123 diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
   122 diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
   124 --- a/toolkit/library/Makefile.in
   123 --- a/toolkit/library/Makefile.in
   125 +++ b/toolkit/library/Makefile.in
   124 +++ b/toolkit/library/Makefile.in
   126 @@ -490,17 +490,17 @@ ifneq (,$(or $(filter 1400,$(_MSC_VER)),
   125 @@ -473,17 +473,17 @@ LOCAL_INCLUDES += -I$(topsrcdir)/intl/un
   127  ifdef MOZ_DEBUG
   126  ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
   128  EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
   127  SDK_LIBRARY = $(IMPORT_LIBRARY)
   129  endif
   128  else
   130  endif
   129  SDK_LIBRARY = $(SHARED_LIBRARY)
   131  endif
   130  endif
   132  
   131  
   133  EXTRA_DSO_LDOPTS += $(LIBS_DIR)
   132  EXTRA_DSO_LDOPTS += $(LIBS_DIR)
   134  
   133  
   135 -EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
   134 -EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)