|
VMime
|
#include <X509Certificate.hpp>


Public Types | |
| enum | Format { FORMAT_DER , FORMAT_PEM } |
| enum | DigestAlgorithm { DIGEST_MD5 , DIGEST_SHA1 } |
Public Member Functions | |
| ~X509Certificate () | |
| virtual void | write (utility::outputStream &os, const Format format) const =0 |
| virtual const byteArray | getSerialNumber () const =0 |
| const string | getIssuerString () const |
| virtual bool | checkIssuer (shared_ptr< const X509Certificate > issuer) const =0 |
| virtual bool | verify (shared_ptr< const X509Certificate > caCert) const =0 |
| virtual bool | verifyHostName (const string &hostname, std::vector< std::string > *nonMatchingNames=NULL) const =0 |
| virtual const datetime | getExpirationDate () const =0 |
| virtual const datetime | getActivationDate () const =0 |
| virtual const byteArray | getFingerprint (const DigestAlgorithm algo) const =0 |
| virtual void | checkValidity () |
Public Member Functions inherited from certificate | |
| virtual const byteArray | getEncoded () const =0 |
| virtual const string | getType () const =0 |
| virtual int | getVersion () const =0 |
| virtual bool | equals (shared_ptr< const certificate > other) const =0 |
| virtual void * | getInternalData ()=0 |
Static Public Member Functions | |
| static shared_ptr< X509Certificate > | import (utility::inputStream &is) |
| static shared_ptr< X509Certificate > | import (const byte_t *data, const size_t length) |
Additional Inherited Members | |
Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
Identity certificate based on X.509 standard.
| ~X509Certificate | ( | ) |
|
pure virtual |
Checks if this certificate has the given issuer.
| issuer | certificate of a possible issuer |
|
virtual |
Checks that the certificate is currently valid.
For the certificate to be valid, the current date and time must be in the validity period specified in the certificate.
| certificateExpiredException | if the certificate has expired |
| certificateNotYetValidException | if the certificate is not yet valid |
References vmime::dynamicCast(), X509Certificate::getActivationDate(), X509Certificate::getExpirationDate(), datetime::now(), and certificateException::setCertificate().
Gets the activation date of this certificate.
This is the date at which this certificate will be valid.
Referenced by X509Certificate::checkValidity().
Gets the expiration date of this certificate.
This is the date at which this certificate will not be valid anymore.
Referenced by X509Certificate::checkValidity().
|
pure virtual |
Returns the fingerprint of this certificate.
Returns the distinguished name of the issuer of this certificate.
Eg. "C=US,O=VeriSign\, Inc.,OU=Class 1 Public Primary Certification Authority"
Returns the X.509 certificate's serial number.
This is obtained by the X.509 Certificate 'serialNumber' field. Serial is not always a 32 or 64bit number. Some CAs use large serial numbers, thus it may be wise to handle it as something opaque.
|
static |
Imports a DER or PEM encoded X.509 certificate.
| data | points to raw data |
| length | size of data |
|
static |
Imports a DER or PEM encoded X.509 certificate.
| is | input stream to read data from |
|
pure virtual |
Verifies this certificate against a given trusted one.
| caCert | a certificate that is considered to be trusted one |
|
pure virtual |
Verify certificate's subject name against the given hostname.
| hostname | DNS name of the server |
| nonMatchingNames | if not NULL, will contain the names that do not match the identities in the certificate |
|
pure virtual |
Exports this X.509 certificate to the specified format.
| os | output stream into which write data |
| format | output format |