libdigidocpp
digidoc::DirectoryX509CertStore Class Reference

#include <DirectoryX509CertStore.h>

Inheritance diagram for digidoc::DirectoryX509CertStore:
Inheritance graph
Collaboration diagram for digidoc::DirectoryX509CertStore:
Collaboration graph

Public Member Functions

 DirectoryX509CertStore () throw (IOException)
 DirectoryX509CertStore (const std::string &path) throw (IOException)
- Public Member Functions inherited from digidoc::X509CertStore
virtual ~X509CertStore ()
virtual X509_STORE * getCertStore () const throw (IOException)
virtual STACK_OF (X509)*getCerts() const throw (IOException)
virtual X509 * getCert (const X509_NAME *subject) const throw (IOException)

Private Member Functions

void loadCerts (const std::string &path) throw (IOException)

Additional Inherited Members

- Static Public Member Functions inherited from digidoc::X509CertStore
static void init (X509CertStore *impl=0)
static void destroy ()
static X509CertStoregetInstance () throw (IOException)

Detailed Description

Implementation of X.509 certificate store, which loads the certificates from the directory provided.

Definition at line 30 of file DirectoryX509CertStore.h.

Constructor & Destructor Documentation

digidoc::DirectoryX509CertStore::DirectoryX509CertStore ( ) throw (IOException)

Gets certificate store path from configuration and loads all certificates found in directory and adds these to the certificate store.

Exceptions
IOExceptionexception is throws if the folder does not exist.

Definition at line 35 of file DirectoryX509CertStore.cpp.

References digidoc::Conf::getInstance(), and loadCerts().

Here is the call graph for this function:

digidoc::DirectoryX509CertStore::DirectoryX509CertStore ( const std::string &  path) throw (IOException)

Load all certificates found in directory and adds these to the cert store.

Parameters
pathpath to X.509 certificates in PEM format.
Exceptions
IOExceptionexception is throws if the folder does not exist.

Definition at line 46 of file DirectoryX509CertStore.cpp.

Member Function Documentation

void digidoc::DirectoryX509CertStore::loadCerts ( const std::string &  path) throw (IOException)
private

Load all certificates found in directory and adds these to the cert store.

Parameters
pathpath to X.509 certificates in PEM format.
Exceptions
IOExceptionexception is throws if the folder does not exist.

Definition at line 57 of file DirectoryX509CertStore.cpp.

References digidoc::util::File::directoryExists(), e, digidoc::Exception::getMsg(), INFO, digidoc::util::File::listFiles(), digidoc::X509Cert::loadX509(), THROW_IOEXCEPTION, and WARN.

Referenced by DirectoryX509CertStore().

Here is the call graph for this function:

Here is the caller graph for this function:


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