Chromium Code Reviews| Index: base/nss_util.cc |
| diff --git a/base/nss_util.cc b/base/nss_util.cc |
| index e4d1762baa75c572b07458bb43f3eed465edc922..01f596648f363f057b377500114cf402ed3cb74a 100644 |
| --- a/base/nss_util.cc |
| +++ b/base/nss_util.cc |
| @@ -19,9 +19,11 @@ |
| #endif |
| #include "base/environment.h" |
| +#include "base/file_path.h" |
| #include "base/file_util.h" |
| #include "base/lazy_instance.h" |
| #include "base/logging.h" |
| +#include "base/native_library.h" |
| #include "base/scoped_ptr.h" |
| #include "base/stringprintf.h" |
| #include "base/threading/thread_restrictions.h" |
| @@ -402,6 +404,15 @@ void DisableNSSForkCheck() { |
| env->SetVar("NSS_STRICT_NOFORK", "DISABLED"); |
| } |
| +void LoadNSSLibraries() { |
| + // NSS libraries are linked dynamically on Linux so do this only on Linux. |
| +#if defined(OS_LINUX) |
| + FilePath module_path("/usr/lib/nss"); |
|
wtc
2011/03/16 19:00:52
"/usr/lib/nss" is specific to Debian and its deriv
|
| + base::LoadNativeLibrary(module_path.Append("libsoftokn3.so")); |
| + base::LoadNativeLibrary(module_path.Append("libfreebl3.so")); |
| +#endif |
| +} |
| + |
| bool CheckNSSVersion(const char* version) { |
| return !!NSS_VersionCheck(version); |
| } |