#include "crypto/nss_util.h"
#include <nss.h>
#include <pk11pub.h>
#include <plarena.h>
#include <prerror.h>
#include <prinit.h>
#include <prtime.h>
#include <secmod.h>
#include <memory>
#include <utility>
#include "base/base_paths.h"
#include "base/containers/flat_map.h"
#include "base/containers/heap_array.h"
#include "base/debug/alias.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/threading/scoped_blocking_call.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "crypto/nss_crypto_module_delegate.h"
#include "crypto/nss_util_internal.h"
namespace crypto {
namespace {
#if !(BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS))
base::FilePath GetDefaultConfigDirectory() { … }
#endif
base::FilePath GetInitialConfigDirectory() { … }
char* PKCS11PasswordFunc(PK11SlotInfo* slot, PRBool retry, void* arg) { … }
class NSPRInitSingleton { … };
base::LazyInstance<NSPRInitSingleton>::Leaky g_nspr_singleton = …;
void CrashOnNSSInitFailure() { … }
class NSSInitSingleton { … };
base::LazyInstance<NSSInitSingleton>::Leaky g_nss_singleton = …;
}
ScopedPK11Slot OpenSoftwareNSSDB(const base::FilePath& path,
const std::string& description) { … }
SECStatus CloseSoftwareNSSDB(PK11SlotInfo* slot) { … }
void EnsureNSPRInit() { … }
void EnsureNSSInit() { … }
bool CheckNSSVersion(const char* version) { … }
AutoSECMODListReadLock::AutoSECMODListReadLock()
: … { … }
AutoSECMODListReadLock::~AutoSECMODListReadLock() { … }
base::Time PRTimeToBaseTime(PRTime prtime) { … }
PRTime BaseTimeToPRTime(base::Time time) { … }
SECMODModule* LoadNSSModule(const char* name,
const char* library_path,
const char* params) { … }
std::string GetNSSErrorMessage() { … }
}