| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_NSS_UTIL_H_ | 5 #ifndef BASE_NSS_UTIL_H_ |
| 6 #define BASE_NSS_UTIL_H_ | 6 #define BASE_NSS_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // NSS checks whether it is running a forked process to avoid problems when | 58 // NSS checks whether it is running a forked process to avoid problems when |
| 59 // using user security modules in a forked process. However if we are sure | 59 // using user security modules in a forked process. However if we are sure |
| 60 // there are no modules loaded before the process is forked then there is no | 60 // there are no modules loaded before the process is forked then there is no |
| 61 // harm disabling the check. | 61 // harm disabling the check. |
| 62 // | 62 // |
| 63 // This method must be called before EnsureNSSInit() to take effect. | 63 // This method must be called before EnsureNSSInit() to take effect. |
| 64 // | 64 // |
| 65 // WARNING: Use this with caution. | 65 // WARNING: Use this with caution. |
| 66 void DisableNSSForkCheck(); | 66 void DisableNSSForkCheck(); |
| 67 | 67 |
| 68 // Load NSS library files. This function has no effect on Mac and Windows. |
| 69 // This loads the necessary NSS library files so that NSS can be initialized |
| 70 // after loading additional library files is disallowed, for example when the |
| 71 // sandbox is active. |
| 72 // |
| 73 // Note that this does not load libnssckbi.so which contains the root |
| 74 // certificates. |
| 75 void LoadNSSLibraries(); |
| 76 |
| 68 // Check if the current NSS version is greater than or equals to |version|. | 77 // Check if the current NSS version is greater than or equals to |version|. |
| 69 // A sample version string is "3.12.3". | 78 // A sample version string is "3.12.3". |
| 70 bool CheckNSSVersion(const char* version); | 79 bool CheckNSSVersion(const char* version); |
| 71 | 80 |
| 72 #if defined(OS_CHROMEOS) | 81 #if defined(OS_CHROMEOS) |
| 73 // Open the r/w nssdb that's stored inside the user's encrypted home directory. | 82 // Open the r/w nssdb that's stored inside the user's encrypted home directory. |
| 74 void OpenPersistentNSSDB(); | 83 void OpenPersistentNSSDB(); |
| 75 #endif | 84 #endif |
| 76 | 85 |
| 77 // Convert a NSS PRTime value into a base::Time object. | 86 // Convert a NSS PRTime value into a base::Time object. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 104 private: | 113 private: |
| 105 Lock *lock_; | 114 Lock *lock_; |
| 106 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); | 115 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); |
| 107 }; | 116 }; |
| 108 | 117 |
| 109 #endif // defined(USE_NSS) | 118 #endif // defined(USE_NSS) |
| 110 | 119 |
| 111 } // namespace base | 120 } // namespace base |
| 112 | 121 |
| 113 #endif // BASE_NSS_UTIL_H_ | 122 #endif // BASE_NSS_UTIL_H_ |
| OLD | NEW |