A wrapper for an X509 certificate.
More...
#include <certificate.h>
|
| Certificate (std::string) |
|
| Certificate (X509 *) |
|
| Certificate (Certificate const &) |
|
Certificate & | operator= (Certificate const &) |
|
std::string | read_string (std::string) |
|
std::string | certificate (bool with_begin_end=false) const |
|
std::string | serial () const |
|
std::string | issuer () const |
|
std::string | subject () const |
|
std::string | subject_common_name () const |
|
std::string | subject_organization_name () const |
|
std::string | subject_organizational_unit_name () const |
|
LocalTime | not_before () const |
|
LocalTime | not_after () const |
|
X509 * | x509 () const |
|
RSA * | public_key () const |
|
std::string | thumbprint () const |
|
bool | has_utf8_strings () const |
|
|
static std::string | name_for_xml (X509_NAME *) |
|
static std::string | asn_to_utf8 (ASN1_STRING *) |
|
static std::string | get_name_part (X509_NAME *, int) |
|
|
X509 * | _certificate = nullptr |
|
RSA * | _public_key = nullptr |
|
A wrapper for an X509 certificate.
This class can take a Certificate from a string or an OpenSSL X509 object
Definition at line 65 of file certificate.h.
◆ Certificate() [1/2]
Certificate::Certificate |
( |
std::string |
cert | ) |
|
|
explicit |
Load an X509 certificate from a string
- Parameters
-
Definition at line 75 of file certificate.cc.
◆ Certificate() [2/2]
Certificate::Certificate |
( |
X509 * |
c | ) |
|
|
explicit |
- Parameters
-
c | X509 certificate, which this object will take ownership of |
Definition at line 68 of file certificate.cc.
◆ certificate()
string Certificate::certificate |
( |
bool |
with_begin_end = false | ) |
const |
Return the certificate as a string
- Parameters
-
with_begin_end | true to include the --—BEGIN CERTIFICATE— / --—END CERTIFICATE--— markers |
- Returns
- Certificate string
Definition at line 211 of file certificate.cc.
◆ issuer()
string Certificate::issuer |
( |
| ) |
const |
- Returns
- Certificate's issuer, in the form dnqualifier=<dnQualififer>,CN=<commonName>,OU=<organizationalUnitName>,O=<organizationName> and with + signs escaped to +
Definition at line 241 of file certificate.cc.
◆ public_key()
RSA * Certificate::public_key |
( |
| ) |
const |
◆ read_string()
string Certificate::read_string |
( |
std::string |
cert | ) |
|
Read a certificate from a string.
- Parameters
-
- Returns
- remaining part of the input string after the certificate which was read.
Definition at line 93 of file certificate.cc.
◆ thumbprint()
string Certificate::thumbprint |
( |
| ) |
const |
- Returns
- thumbprint of the to-be-signed portion of this certificate
Definition at line 393 of file certificate.cc.
The documentation for this class was generated from the following files: