libdigidocpp
digidoc::X509CertStore Class Reference

#include <X509CertStore.h>

Inheritance diagram for digidoc::X509CertStore:
Inheritance graph
Collaboration diagram for digidoc::X509CertStore:
Collaboration graph

Public Member Functions

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)

Static Public Member Functions

static void init (X509CertStore *impl=0)
static void destroy ()
static X509CertStoregetInstance () throw (IOException)

Private Member Functions

 X509CertStore ()

Private Attributes

X509CertStorePrivated

Static Private Attributes

static X509CertStoreINSTANCE = 0

Friends

class DirectoryX509CertStore
class MSX509CertStore
class MACX509CertStore

Detailed Description

Definition at line 30 of file X509CertStore.h.

Constructor & Destructor Documentation

X509CertStore::~X509CertStore ( )
virtual

Release all certificates.

Definition at line 61 of file X509CertStore.cpp.

References d, and digidoc::X509CertStorePrivate::store.

X509CertStore::X509CertStore ( ) const
privatevirtual

X509CertStore constructor.

Definition at line 50 of file X509CertStore.cpp.

References d, digidoc::X509CertStorePrivate::store, and digidoc::X509CertStorePrivate::verify_callback().

Here is the call graph for this function:

Member Function Documentation

void X509CertStore::destroy ( )
static

Releases the X.509 certificate store implementation.

Definition at line 97 of file X509CertStore.cpp.

References INSTANCE.

Referenced by digidoc::terminate().

Here is the caller graph for this function:

X509 * digidoc::X509CertStore::getCert ( const X509_NAME *  subject) const throw (IOException)
virtual

Searches certificate by subject and returns a copy of it if found. If not found returns NULL. NB! The returned certificate must be freed with OpenSSL function X509_free(X509* cert).

Parameters
subjectcertificate subject.
Returns
returns copy of found certificate or NULL if certificate was not found.
Exceptions
IOExceptionexception is thrown if copying certificate failed.

Definition at line 143 of file X509CertStore.cpp.

References digidoc::X509Cert::copyX509(), and i.

Referenced by digidoc::SignatureTM::notarize(), and digidoc::SignatureBES::validateOnline().

Here is the call graph for this function:

Here is the caller graph for this function:

X509_STORE * digidoc::X509CertStore::getCertStore ( ) const throw (IOException)
virtual

Return X509_STORE containing all certs loaded from directory

Returns
X509_STORE all certs in store. throws IOException

Definition at line 129 of file X509CertStore.cpp.

Referenced by digidoc::X509Cert::verify().

Here is the caller graph for this function:

X509CertStore * X509CertStore::getInstance ( ) throw (IOException)
static
Returns
returns the X.509 certificate store implementation.

Definition at line 106 of file X509CertStore.cpp.

References INSTANCE, and THROW_IOEXCEPTION.

Referenced by init(), digidoc::SignatureTM::notarize(), digidoc::SignatureTM::validateOffline(), digidoc::SignatureBES::validateOnline(), and digidoc::X509Cert::verify().

Here is the caller graph for this function:

void X509CertStore::init ( X509CertStore impl = 0)
static

Sets the X.509 certificate store implementation.

Parameters
implX.509 certificate store implementation or 0 for platform default.

Definition at line 73 of file X509CertStore.cpp.

References CERTS_PATH, DirectoryX509CertStore, getInstance(), INSTANCE, MACX509CertStore, and MSX509CertStore.

Referenced by digidoc::initialize(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual digidoc::X509CertStore::STACK_OF ( X509  ) const throw (IOException)
virtual

Friends And Related Function Documentation

friend class DirectoryX509CertStore
friend

Definition at line 49 of file X509CertStore.h.

Referenced by init().

friend class MACX509CertStore
friend

Definition at line 51 of file X509CertStore.h.

Referenced by init().

friend class MSX509CertStore
friend

Definition at line 50 of file X509CertStore.h.

Referenced by init().

Member Data Documentation

X509CertStore * X509CertStore::INSTANCE = 0
staticprivate

X.509 certificate store implementation.

Definition at line 46 of file X509CertStore.h.

Referenced by destroy(), getInstance(), and init().


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