Ice 3.7 C++11 API Reference
|
Encapsulates an OpenSSL X.509 certificate. More...
#include <IceSSL/IceSSL.h>
Public Member Functions | |
virtual x509_st * | getCert () const =0 |
Retrieve the native X509 certificate value wrapped by this object. More... | |
Public Member Functions inherited from IceSSL::Certificate | |
virtual bool | checkValidity () const =0 |
Checks that the certificate is currently valid, that is, the current date falls between the validity period given in the certificate. More... | |
virtual bool | checkValidity (const std::chrono::system_clock::time_point &t) const =0 |
Checks that the certificate is valid at the given time. More... | |
virtual std::string | encode () const =0 |
Obtains a string encoding of the certificate in PEM format. More... | |
virtual std::vector< Ice::Byte > | getAuthorityKeyIdentifier () const =0 |
Obtains the authority key identifier. More... | |
unsigned int | getExtendedKeyUsage () const |
Returns the value of the extended key usage extension. More... | |
virtual std::vector< std::pair< int, std::string > > | getIssuerAlternativeNames () const =0 |
Obtains the values in the issuer's alternative names extension. More... | |
virtual DistinguishedName | getIssuerDN () const =0 |
Obtains the issuer's distinguished name (DN). More... | |
unsigned int | getKeyUsage () const |
Returns the value of the key usage extension. More... | |
virtual std::chrono::system_clock::time_point | getNotAfter () const =0 |
Obtains the not-after validity time. More... | |
virtual std::chrono::system_clock::time_point | getNotBefore () const =0 |
Obtains the not-before validity time. More... | |
virtual std::string | getSerialNumber () const =0 |
Obtains the serial number. More... | |
virtual std::vector< std::pair< int, std::string > > | getSubjectAlternativeNames () const =0 |
See the comment for Plugin::getIssuerAlternativeNames. More... | |
virtual DistinguishedName | getSubjectDN () const =0 |
Obtains the subject's distinguished name (DN). More... | |
virtual std::vector< Ice::Byte > | getSubjectKeyIdentifier () const =0 |
Obtains the subject key identifier. More... | |
virtual int | getVersion () const =0 |
Obtains the certificate version number. More... | |
virtual X509ExtensionPtr | getX509Extension (const std::string &oid) const =0 |
Obtains the extension with the given OID. More... | |
virtual std::vector< X509ExtensionPtr > | getX509Extensions () const =0 |
Obtains a list of the X509v3 extensions contained in the certificate. More... | |
virtual bool | operator!= (const Certificate &) const =0 |
Compares the certificates for equality using the native certificate comparison method. More... | |
virtual bool | operator== (const Certificate &) const =0 |
Compares the certificates for equality using the native certificate comparison method. More... | |
virtual std::string | toString () const =0 |
Stringifies the certificate. More... | |
virtual bool | verify (const CertificatePtr &cert) const =0 |
Verifies that this certificate was signed by the given certificate public key. More... | |
Static Public Member Functions | |
static CertificatePtr | create (x509_st *cert) |
Construct a certificate using a native certificate. More... | |
static CertificatePtr | decode (const std::string &cert) |
Decode a certificate from a string that uses the PEM encoding format. More... | |
static CertificatePtr | load (const std::string &file) |
Load the certificate from a file. More... | |
Static Public Member Functions inherited from IceSSL::Certificate | |
static CertificatePtr | decode (const std::string &str) |
Decodes a certificate from a string that uses the PEM encoding format. More... | |
static CertificatePtr | load (const std::string &file) |
Loads the certificate from a file. More... | |
Encapsulates an OpenSSL X.509 certificate.
|
static |
Construct a certificate using a native certificate.
The Certificate class assumes ownership of the given native certificate.
cert | The native certificate. |
|
static |
Decode a certificate from a string that uses the PEM encoding format.
cert | A string containing the PEM-encoded certificate. |
CertificateEncodingException | if an error occurs. |
|
pure virtual |
Retrieve the native X509 certificate value wrapped by this object.
|
static |
Load the certificate from a file.
The certificate must use the PEM encoding format.
file | The certificate file. |
CertificateReadException | if the file cannot be read. |