Mixe for Privacy and Anonymity in the Internet
|
#include <CACertificate.hpp>
Public Member Functions | |
~CACertificate () | |
CACertificate * | clone () const |
SINT32 | encode (UINT8 *buff, UINT32 *bufflen, UINT32 type) const |
SINT32 | encode (DOMElement *&elemRoot, XERCES_CPP_NAMESPACE::DOMDocument *doc) const |
SINT32 | getRawSubjectKeyIdentifier (UINT8 *r_ski, UINT32 *r_skiLen) |
SINT32 | getAuthorityKeyIdentifier (UINT8 *r_aki, UINT32 *r_akiLen) const |
SINT32 | getSubjectKeyIdentifier (UINT8 *r_ski, UINT32 *r_skiLen) |
LERNGRUPPE Accessor method for the subjectKeyIdentifier (SKI) extension stored in this certificate. More... | |
SINT32 | setSubjectKeyIdentifier (UINT8 *a_value, UINT32 a_valueLen) |
LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the given value. More... | |
SINT32 | setSubjectKeyIdentifier () |
LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the hash of the public key. More... | |
SINT32 | verify (const CACertificate *a_cert) const |
bool | isValid () const |
Static Public Member Functions | |
static CACertificate * | decode (const UINT8 *const buff, UINT32 bufflen, UINT32 type, const char *const passwd=NULL) |
Extracts a certificate from an encoded (DER,XML) form. More... | |
static CACertificate * | decode (const DOMNode *node, UINT32 type, const char *passwd=NULL) |
static UINT8 * | getXmlElementName () |
static SINT32 | removeColons (const UINT8 *a_cSki, UINT32 a_cSkiLen, UINT8 *&r_ski, UINT32 *r_skiLen) |
LERNGRUPPE Removes the colons from the string representation of the given SKI. More... | |
Private Member Functions | |
CACertificate () | |
CACertificate (X509 *x) | |
X509 * | getX509 () const |
Static Private Member Functions | |
static X509 * | decode (const UINT8 **derX509, UINT32 derX509Len) |
Private Attributes | |
X509 * | m_pCert |
ASN1_OCTET_STRING * | m_pSKI |
AUTHORITY_KEYID * | m_pAKI |
Static Private Attributes | |
static UINT8 * | m_spXmlElementName =0 |
Friends | |
class | CASignature |
class | CAASymCipher |
class | CASSLContext |
class | CATLSClientSocket |
Definition at line 39 of file CACertificate.hpp.
|
inline |
Definition at line 47 of file CACertificate.hpp.
|
private |
|
private |
Definition at line 45 of file CACertificate.cpp.
|
inline |
Definition at line 53 of file CACertificate.hpp.
References CACertificate(), and m_pCert.
Referenced by CACertStore::add(), CACmdLnOptions::getLogEncryptionKey(), CACmdLnOptions::getNextMixTestCertificate(), CACmdLnOptions::getPrevMixTestCertificate(), CACmdLnOptions::setNextMixTestCertificate(), CACmdLnOptions::setPrevMixTestCertificate(), and CATLSClientSocket::setServerCertificate().
|
static |
Definition at line 85 of file CACertificate.cpp.
References CERT_DER, CERT_PKCS12, CERT_X509CERTIFICATE, decode(), CABase64::decode(), E_SUCCESS, equals(), getDOMElementValue(), and type.
|
static |
Extracts a certificate from an encoded (DER,XML) form.
Definition at line 154 of file CACertificate.cpp.
References CACertificate(), CERT_DER, CERT_PKCS12, CERT_XML_X509CERTIFICATE, CABase64::decode(), E_SUCCESS, equals(), getDOMElementValue(), parseDOMDocument(), and type.
Referenced by CACertStore::decode(), decode(), CACmdLnOptions::setLoggingOptions(), CACmdLnOptions::setNextMix(), CACmdLnOptions::setNextMixCertificate(), CACmdLnOptions::setOwnCertificate(), CACmdLnOptions::setOwnOperatorCertificate(), CACmdLnOptions::setPrevMixCertificate(), and CACmdLnOptions::setTrustedRootCertificates().
SINT32 CACertificate::encode | ( | DOMElement *& | elemRoot, |
XERCES_CPP_NAMESPACE::DOMDocument * | doc | ||
) | const |
Definition at line 259 of file CACertificate.cpp.
References createDOMElement(), E_SUCCESS, CABase64::encode(), m_pCert, and setDOMElementValue().
Definition at line 226 of file CACertificate.cpp.
References CERT_DER, CERT_XML_X509CERTIFICATE, E_SUCCESS, E_UNKNOWN, CABase64::encode(), m_pCert, type, and X509_CERTIFICATE_TAGNAME_LEN.
Referenced by CACmdLnOptions::buildDefaultConfig(), and CACertStore::encode().
Definition at line 488 of file CACertificate.cpp.
References E_SUCCESS, E_UNKNOWN, m_pAKI, and removeColons().
Referenced by CACmdLnOptions::setOwnCertificate().
Definition at line 463 of file CACertificate.cpp.
References E_SUCCESS, E_UNKNOWN, m_pSKI, CAMsg::printMsg(), and setSubjectKeyIdentifier().
Referenced by CACmdLnOptions::setOwnCertificate().
LERNGRUPPE Accessor method for the subjectKeyIdentifier (SKI) extension stored in this certificate.
E_SUCCESS | upon successful retrieval |
E_UNKNOWN | otherwise |
Definition at line 280 of file CACertificate.cpp.
References E_SUCCESS, E_UNKNOWN, m_pSKI, CAMsg::printMsg(), removeColons(), and setSubjectKeyIdentifier().
Referenced by CACmdLnOptions::buildDefaultConfig(), CACmdLnOptions::getOperatorSubjectKeyIdentifier(), and CACmdLnOptions::setOwnCertificate().
|
inlineprivate |
Definition at line 92 of file CACertificate.hpp.
References m_pCert.
Referenced by CATLSClientSocket::doTLSConnect().
|
inlinestatic |
bool CACertificate::isValid | ( | ) | const |
Definition at line 420 of file CACertificate.cpp.
References m_pCert, and CAMsg::printMsg().
Referenced by verify().
|
static |
LERNGRUPPE Removes the colons from the string representation of the given SKI.
a_cSkid | The string from which the colons should be removed |
a_cSkidLen | The length of a_cSkid |
r_ski | |
r_skiLen |
E_SUCCESS | upon successful removal |
E_UNKNOWN | otherwise |
Definition at line 341 of file CACertificate.cpp.
References E_SUCCESS, E_UNKNOWN, and CAMsg::printMsg().
Referenced by getAuthorityKeyIdentifier(), CAMultiSignature::getSKI(), and getSubjectKeyIdentifier().
SINT32 CACertificate::setSubjectKeyIdentifier | ( | ) |
LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the hash of the public key.
E_SUCCESS | upon successful removal |
E_UNKNOWN | otherwise |
Definition at line 321 of file CACertificate.cpp.
Referenced by getRawSubjectKeyIdentifier(), and getSubjectKeyIdentifier().
LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the given value.
a_value | The value which should be set as SKI |
a_valueLen | The length of a_value |
E_SUCCESS | upon successful removal |
E_UNKNOWN | otherwise |
Definition at line 64 of file CACertificate.cpp.
SINT32 CACertificate::verify | ( | const CACertificate * | a_cert | ) | const |
Definition at line 363 of file CACertificate.cpp.
References E_SUCCESS, E_UNKNOWN, isValid(), m_pAKI, m_pCert, m_pSKI, and CAMsg::printMsg().
Referenced by CACmdLnOptions::setOwnCertificate(), and CACertStore::verifyMixCert().
|
friend |
Definition at line 42 of file CACertificate.hpp.
|
friend |
Definition at line 41 of file CACertificate.hpp.
|
friend |
Definition at line 43 of file CACertificate.hpp.
|
friend |
Definition at line 44 of file CACertificate.hpp.
|
private |
Definition at line 98 of file CACertificate.hpp.
Referenced by CACertificate(), getAuthorityKeyIdentifier(), verify(), and ~CACertificate().
|
private |
Definition at line 96 of file CACertificate.hpp.
Referenced by CACertificate(), clone(), encode(), CASignature::getSignKey(), getX509(), isValid(), CAASymCipher::setPublicKey(), setSubjectKeyIdentifier(), CASignature::setVerifyKey(), verify(), and ~CACertificate().
|
private |
Definition at line 97 of file CACertificate.hpp.
Referenced by CACertificate(), getRawSubjectKeyIdentifier(), getSubjectKeyIdentifier(), setSubjectKeyIdentifier(), verify(), and ~CACertificate().
|
staticprivate |
Definition at line 99 of file CACertificate.hpp.
Referenced by getXmlElementName().