Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
CACertificate Class Reference

List of all members.

Public Member Functions

 ~CACertificate ()
CACertificateclone () 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.
SINT32 setSubjectKeyIdentifier (UINT8 *a_value, UINT32 a_valueLen)
 LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the given value.
SINT32 setSubjectKeyIdentifier ()
 LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the hash of the public key.
SINT32 verify (const CACertificate *a_cert) const
bool isValid () const

Static Public Member Functions

static CACertificatedecode (const UINT8 *const buff, UINT32 bufflen, UINT32 type, const char *const passwd=NULL)
 Extracts a certificate from an encoded (DER,XML) form.
static CACertificatedecode (const DOMNode *node, UINT32 type, const char *passwd=NULL)
static UINT8getXmlElementName ()
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.

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 UINT8m_spXmlElementName = 0

Friends

class CASignature
class CAASymCipher
class CASSLContext
class CATLSClientSocket

Constructor & Destructor Documentation

References m_pAKI, m_pCert, and m_pSKI.

References m_pAKI, m_pCert, and m_pSKI.

Referenced by clone(), and decode().

CACertificate::CACertificate ( X509 *  x) [private]

References m_pAKI, m_pCert, and m_pSKI.


Member Function Documentation

CACertificate * CACertificate::decode ( const UINT8 *const  buff,
UINT32  bufflen,
UINT32  type,
const char *const  passwd = NULL 
) [static]
CACertificate * CACertificate::decode ( const DOMNode *  node,
UINT32  type,
const char *  passwd = NULL 
) [static]
static X509* CACertificate::decode ( const UINT8 **  derX509,
UINT32  derX509Len 
) [static, private]
SINT32 CACertificate::encode ( UINT8 buff,
UINT32 bufflen,
UINT32  type 
) const
SINT32 CACertificate::encode ( DOMElement *&  elemRoot,
XERCES_CPP_NAMESPACE::DOMDocument *  doc 
) const
SINT32 CACertificate::getAuthorityKeyIdentifier ( UINT8 r_aki,
UINT32 r_akiLen 
) const

LERNGRUPPE Accessor method for the subjectKeyIdentifier (SKI) extension stored in this certificate.

Returns:
r_ski The SKI as colon-free string
r_skiLen The length of r_ski
Return values:
E_SUCCESSupon successful retrieval
E_UNKNOWNotherwise

References E_SUCCESS, E_UNKNOWN, m_pSKI, CAMsg::printMsg(), removeColons(), and setSubjectKeyIdentifier().

Referenced by CACmdLnOptions::buildDefaultConfig(), CACmdLnOptions::getOperatorSubjectKeyIdentifier(), and CACmdLnOptions::setOwnCertificate().

X509* CACertificate::getX509 ( ) const [private]

References m_pCert.

Referenced by CATLSClientSocket::doTLSConnect().

References m_spXmlElementName.

bool CACertificate::isValid ( ) const

References m_pCert, and CAMsg::printMsg().

Referenced by verify().

SINT32 CACertificate::removeColons ( const UINT8 a_cSkid,
UINT32  a_cSkidLen,
UINT8 *&  r_ski,
UINT32 r_skiLen 
) [static]

LERNGRUPPE Removes the colons from the string representation of the given SKI.

Parameters:
a_cSkidThe string from which the colons should be removed
a_cSkidLenThe length of a_cSkid
r_ski
r_skiLen
Returns:
r_ski The SKI as colon-free string
r_skiLen The length of r_ski
Return values:
E_SUCCESSupon successful removal
E_UNKNOWNotherwise

References E_SUCCESS, E_UNKNOWN, and CAMsg::printMsg().

Referenced by getAuthorityKeyIdentifier(), CAMultiSignature::getSKI(), and getSubjectKeyIdentifier().

SINT32 CACertificate::setSubjectKeyIdentifier ( UINT8 a_value,
UINT32  a_valueLen 
)

LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the given value.

Parameters:
a_valueThe value which should be set as SKI
a_valueLenThe length of a_value
Return values:
E_SUCCESSupon successful removal
E_UNKNOWNotherwise

References E_SUCCESS, E_UNKNOWN, m_pCert, and m_pSKI.

LERNGRUPPE Sets the subjectKeyIdentifier extension for this certificate to the hash of the public key.

Return values:
E_SUCCESSupon successful removal
E_UNKNOWNotherwise

References len, and m_pCert.

Referenced by getRawSubjectKeyIdentifier(), and getSubjectKeyIdentifier().

SINT32 CACertificate::verify ( const CACertificate a_cert) const

Friends And Related Function Documentation

friend class CAASymCipher [friend]
friend class CASignature [friend]
friend class CASSLContext [friend]
friend class CATLSClientSocket [friend]

Member Data Documentation

AUTHORITY_KEYID* CACertificate::m_pAKI [private]
X509* CACertificate::m_pCert [private]
ASN1_OCTET_STRING* CACertificate::m_pSKI [private]
UINT8 * CACertificate::m_spXmlElementName = 0 [static, private]

Referenced by getXmlElementName().