Mixe for Privacy and Anonymity in the Internet
|
#include <CACertStore.hpp>
Public Member Functions | |
CACertStore () | |
~CACertStore () | |
SINT32 | add (CACertificate *cert) |
Adds a COPY of a given certifcate to this CertStore. More... | |
CACertificate * | getFirst () |
CACertificate * | getNext () |
UINT32 | getNumber () |
CACertificate * | verifyMixCert (DOMNode *mixNode) |
This function parses the certificates from a <Mix>-node and tries to build a certPath to the trusted root certificates loaded from the config file. More... | |
SINT32 | encode (UINT8 *buff, UINT32 *bufflen, UINT32 type) |
SINT32 | encode (DOMElement *&elemnRoot, XERCES_CPP_NAMESPACE::DOMDocument *doc) |
Creates a XML DocumentFragment which represenst all the Certifcates in this CertStore. More... | |
Static Public Member Functions | |
static CACertStore * | decode (UINT8 *buff, UINT32 bufflen, UINT32 type) |
static CACertStore * | decode (const DOMNode *node, UINT32 type) |
Private Attributes | |
LP_CERTSTORE_ENTRY | m_pCertList |
UINT32 | m_cCerts |
LP_CERTSTORE_ENTRY | m_pCurrent |
Definition at line 41 of file CACertStore.hpp.
CACertStore::CACertStore | ( | ) |
Definition at line 34 of file CACertStore.cpp.
References m_cCerts, m_pCertList, and m_pCurrent.
Referenced by decode().
CACertStore::~CACertStore | ( | ) |
Definition at line 41 of file CACertStore.cpp.
References m_pCertList, __t_certstore_list::next, and __t_certstore_list::pCert.
SINT32 CACertStore::add | ( | CACertificate * | cert | ) |
Adds a COPY of a given certifcate to this CertStore.
cert | Certifcate of which a copy is added to this cert store |
E_SUCCESS | if successfull |
E_UNKNOWN | if not (for instance if cert==NULL) |
Definition at line 60 of file CACertStore.cpp.
References CACertificate::clone(), E_SUCCESS, E_UNKNOWN, m_cCerts, m_pCertList, __t_certstore_list::next, and __t_certstore_list::pCert.
Referenced by decode(), CACmdLnOptions::setOwnCertificate(), and CACmdLnOptions::setTrustedRootCertificates().
|
static |
Definition at line 245 of file CACertStore.cpp.
References add(), CACertStore(), CERT_X509CERTIFICATE, CACertificate::decode(), getElementsByTagName(), type, and XML_X509DATA.
|
static |
SINT32 CACertStore::encode | ( | DOMElement *& | elemRoot, |
XERCES_CPP_NAMESPACE::DOMDocument * | doc | ||
) |
Creates a XML DocumentFragment which represenst all the Certifcates in this CertStore.
docFrag | on ouput holds the created DOMElement |
doc | owner document of the new DOM_DocumentFragment |
E_SUCCESS | if successful |
E_UNKNOWN | otherwise |
Definition at line 230 of file CACertStore.cpp.
References createDOMElement(), E_SUCCESS, CACertificate::encode(), m_pCertList, __t_certstore_list::next, and __t_certstore_list::pCert.
Definition at line 196 of file CACertStore.cpp.
References CERT_XML_X509CERTIFICATE, E_SUCCESS, CACertificate::encode(), len, m_pCertList, __t_certstore_list::next, __t_certstore_list::pCert, type, and XML_X509DATA.
Referenced by CAMultiSignature::signXML().
CACertificate * CACertStore::getFirst | ( | ) |
Definition at line 74 of file CACertStore.cpp.
References m_pCertList, m_pCurrent, and __t_certstore_list::pCert.
Referenced by verifyMixCert().
CACertificate * CACertStore::getNext | ( | ) |
Definition at line 80 of file CACertStore.cpp.
References m_pCertList, m_pCurrent, __t_certstore_list::next, and __t_certstore_list::pCert.
Referenced by verifyMixCert().
|
inline |
Definition at line 49 of file CACertStore.hpp.
References m_cCerts.
Referenced by CACmdLnOptions::setOwnCertificate(), and CACmdLnOptions::setTrustedRootCertificates().
CACertificate * CACertStore::verifyMixCert | ( | DOMNode * | mixNode | ) |
This function parses the certificates from a <Mix>-node and tries to build a certPath to the trusted root certificates loaded from the config file.
The certificates are parsed from any <Signature>-node that is a direct child of <Mix> (MultiSignature compatible). The function will return a certificate in the following cases:
mixNode | - a <Mix>-Node containing one or more signatures |
Definition at line 110 of file CACertStore.cpp.
References decode(), E_SUCCESS, getDOMChildByName(), getFirst(), getNext(), getSignatureElements(), m_cCerts, m_pCertList, MAX_SIGNATURE_ELEMENTS, CAMsg::printMsg(), CACertificate::verify(), and XML_X509DATA.
Referenced by CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
|
private |
Definition at line 57 of file CACertStore.hpp.
Referenced by add(), CACertStore(), getNumber(), and verifyMixCert().
|
private |
Definition at line 56 of file CACertStore.hpp.
Referenced by add(), CACertStore(), encode(), getFirst(), getNext(), verifyMixCert(), and ~CACertStore().
|
private |
Definition at line 58 of file CACertStore.hpp.
Referenced by CACertStore(), getFirst(), and getNext().