CPKIFNSSDatabase Class Reference

#include <PKIFNSSDatabase.h>

Collaboration diagram for CPKIFNSSDatabase:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFNSSDatabase class is used to manage the initialization and shutdown of a NSS certificate database. The class implements a singleton design pattern.

TSP-enforcing: No

Definition at line 21 of file PKIFNSSDatabase.h.


Public Member Functions

std::string GetDBDir (void)

Static Public Member Functions

static CPKIFNSSDatabaseGetInstance (const std::string &dbdir)
static CPKIFNSSDatabaseGetInstance (void)
static void Shutdown (void)
static bool IsInitialized (void)

Member Function Documentation

CPKIFNSSDatabase * CPKIFNSSDatabase::GetInstance ( const std::string &  dbdir  )  [static]

Interface: Subsystems

Return an instance of the one and only nss database instance. This functions throws PKIFNSS_DB_ALREADY_INITED exception if the dbdir is different than the one and only instance or if nss can't initialize

Returns:
Return an instance of the one and only nss database instanc
Exceptions:
CPKIFCryptoException(PKIFNSS_DB_ALREADY_INITED) 

Definition at line 63 of file PKIFNSSDatabase.cpp.

References Initialize(), m_dbdir, PKIFNSS_DB_ALREADY_INITED, and RAISE_CRYPTO_EXCEPTION.

CPKIFNSSDatabase * CPKIFNSSDatabase::GetInstance ( void   )  [static]

Interface: Subsystems

This variant of GetInstance() just returns the current nss database instance or creates a new DB-free instance if none exists. Tt never complains about NSS being currently initialized.

Returns:
Returns the current nss database instance

Definition at line 44 of file PKIFNSSDatabase.cpp.

Referenced by CPKIFNSSCertUpdate::CPKIFNSSCertUpdate(), CPKIFNSSCRLUpdate::CPKIFNSSCRLUpdate(), CPKIFNSSRepository::CPKIFNSSRepository(), CPKIFNSSTrustStore::CPKIFNSSTrustStore(), GetCurrentNSSDBDir(), CPKIFNSSRaw::Initialize(), CPKIFNSS::Initialize(), and ShutdownCrypto().

std::string CPKIFNSSDatabase::GetDBDir ( void   ) 

Interface: Subsystems

This function returns the path to NSS DB directory

Returns:
std::string containing the path to the NSS DB directory

Definition at line 154 of file PKIFNSSDatabase.cpp.

References m_dbdir.

Referenced by GetCurrentNSSDBDir().

void CPKIFNSSDatabase::Shutdown ( void   )  [static]

Interface: Subsystems

This function shuts down NSS so that it can be re-initialized with a new database.

Returns:
None
Exceptions:
CPKIFCryptoException(PKIFNSS_SHUTDOWN_FAILED) 

Definition at line 98 of file PKIFNSSDatabase.cpp.

References CPKIFNSSHelper::NSSAvaliable(), PKIFDelete(), PKIFNSS_SHUTDOWN_FAILED, and RAISE_CRYPTO_EXCEPTION.

Referenced by ShutdownCrypto().

bool CPKIFNSSDatabase::IsInitialized ( void   )  [static]

Interface: Subsystems

This function returns the path to NSS DB directory

Returns:
True if DB has been initialized false otherwise

Definition at line 167 of file PKIFNSSDatabase.cpp.

Referenced by IsNSSDBInitialized().


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:20:28 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6