libcryptosec
Public Member Functions | Protected Attributes | List of all members
Certificate Class Reference

#include <Certificate.h>

Public Member Functions

 Certificate (X509 *cert)
 
 Certificate (std::string pemEncoded) throw (EncodeException)
 
 Certificate (ByteArray &derEncoded) throw (EncodeException)
 
 Certificate (const Certificate &cert)
 
virtual ~Certificate ()
 
std::string getPemEncoded () const throw (EncodeException)
 
ByteArray getDerEncoded () const throw (EncodeException)
 
std::string getXmlEncoded ()
 
std::string getXmlEncoded (std::string tab)
 
virtual std::string toXml (std::string tab="")
 
long getSerialNumber () throw (CertificationException)
 
BigInteger getSerialNumberBigInt () throw (CertificationException)
 
MessageDigest::Algorithm getMessageDigestAlgorithm () throw (MessageDigestException)
 
PublicKeygetPublicKey () throw (CertificationException, AsymmetricKeyException)
 
ByteArray getPublicKeyInfo () throw (CertificationException)
 
long getVersion () throw (CertificationException)
 
DateTime getNotBefore ()
 
DateTime getNotAfter ()
 
RDNSequence getIssuer ()
 
RDNSequence getSubject ()
 
std::vector< Extension * > getExtension (Extension::Name extensionName)
 
std::vector< Extension * > getExtensions ()
 
std::vector< Extension * > getUnknownExtensions ()
 
ByteArray getFingerPrint (MessageDigest::Algorithm algorithm) const throw (CertificationException, EncodeException, MessageDigestException)
 
bool verify (PublicKey &publicKey)
 
X509 * getX509 () const
 
CertificateRequest getNewCertificateRequest (PrivateKey &privateKey, MessageDigest::Algorithm algorithm) throw (CertificationException)
 
Certificateoperator= (const Certificate &value)
 
bool operator== (const Certificate &value)
 
bool operator!= (const Certificate &value)
 

Protected Attributes

X509 * cert
 

Constructor & Destructor Documentation

◆ Certificate() [1/4]

Certificate::Certificate ( X509 *  cert)

◆ Certificate() [2/4]

Certificate::Certificate ( std::string  pemEncoded)
throw (EncodeException
)

◆ Certificate() [3/4]

Certificate::Certificate ( ByteArray derEncoded)
throw (EncodeException
)

◆ Certificate() [4/4]

Certificate::Certificate ( const Certificate cert)

◆ ~Certificate()

Certificate::~Certificate ( )
virtual

Member Function Documentation

◆ getDerEncoded()

ByteArray Certificate::getDerEncoded ( ) const
throw (EncodeException
)

◆ getExtension()

std::vector< Extension * > Certificate::getExtension ( Extension::Name  extensionName)

◆ getExtensions()

std::vector< Extension * > Certificate::getExtensions ( )

◆ getFingerPrint()

ByteArray Certificate::getFingerPrint ( MessageDigest::Algorithm  algorithm) const
throw (CertificationException,
EncodeException,
MessageDigestException
)

◆ getIssuer()

RDNSequence Certificate::getIssuer ( )

◆ getMessageDigestAlgorithm()

MessageDigest::Algorithm Certificate::getMessageDigestAlgorithm ( )
throw (MessageDigestException
)

◆ getNewCertificateRequest()

CertificateRequest Certificate::getNewCertificateRequest ( PrivateKey privateKey,
MessageDigest::Algorithm  algorithm 
)
throw (CertificationException
)

create a new certificate request using the data from this certificate

Parameters
privateKeycertificate request signing key
algorithmmessage digest algorithm
Exceptions
CertificationExceptionerror on conversion of x509 to x509 req

◆ getNotAfter()

DateTime Certificate::getNotAfter ( )

◆ getNotBefore()

DateTime Certificate::getNotBefore ( )

◆ getPemEncoded()

std::string Certificate::getPemEncoded ( ) const
throw (EncodeException
)

◆ getPublicKey()

PublicKey * Certificate::getPublicKey ( )
throw (CertificationException,
AsymmetricKeyException
)

◆ getPublicKeyInfo()

ByteArray Certificate::getPublicKeyInfo ( )
throw (CertificationException
)

◆ getSerialNumber()

long int Certificate::getSerialNumber ( )
throw (CertificationException
)

◆ getSerialNumberBigInt()

BigInteger Certificate::getSerialNumberBigInt ( )
throw (CertificationException
)

◆ getSubject()

RDNSequence Certificate::getSubject ( )

◆ getUnknownExtensions()

std::vector< Extension * > Certificate::getUnknownExtensions ( )

◆ getVersion()

long Certificate::getVersion ( )
throw (CertificationException
)

◆ getX509()

X509 * Certificate::getX509 ( ) const

◆ getXmlEncoded() [1/2]

std::string Certificate::getXmlEncoded ( )
Deprecated:
Retorna o conteudo da extensão em formato XML. Esta função será substituida por toXml().

◆ getXmlEncoded() [2/2]

std::string Certificate::getXmlEncoded ( std::string  tab)

◆ operator!=()

bool Certificate::operator!= ( const Certificate value)

◆ operator=()

Certificate & Certificate::operator= ( const Certificate value)

◆ operator==()

bool Certificate::operator== ( const Certificate value)

◆ toXml()

std::string Certificate::toXml ( std::string  tab = "")
virtual

◆ verify()

bool Certificate::verify ( PublicKey publicKey)

Member Data Documentation

◆ cert

X509* Certificate::cert
protected

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