libfilezilla
|
Represents all relevant information of a X.509 certificate as used by TLS. More...
#include <tls_info.hpp>
Classes | |
class | subject_name |
A subject name, typically a DNS hostname. More... | |
Public Member Functions | |
x509_certificate (x509_certificate const &)=default | |
x509_certificate (x509_certificate &&) noexcept=default | |
x509_certificate & | operator= (x509_certificate const &)=default |
x509_certificate & | operator= (x509_certificate &&) noexcept=default |
x509_certificate (std::vector< uint8_t > const &rawData, fz::datetime const &activation_time, fz::datetime const &expiration_time, std::string const &serial, std::string const &pkalgoname, unsigned int bits, std::string const &signalgoname, std::string const &fingerprint_sha256, std::string const &fingerprint_sha1, std::string const &issuer, std::string const &subject, std::vector< subject_name > const &alt_subject_names, bool const self_signed) | |
x509_certificate (std::vector< uint8_t > &&rawdata, fz::datetime const &activation_time, fz::datetime const &expiration_time, std::string const &serial, std::string const &pkalgoname, unsigned int bits, std::string const &signalgoname, std::string const &fingerprint_sha256, std::string const &fingerprint_sha1, std::string const &issuer, std::string const &subject, std::vector< subject_name > &&alt_subject_names, bool const self_Signed) | |
std::vector< uint8_t > | get_raw_data () const |
The raw, DER-encoded X.509 certificate. | |
fz::datetime const & | get_activation_time () const |
fz::datetime const & | get_expiration_time () const |
std::string const & | get_serial () const |
std::string const & | get_pubkey_algorithm () const |
The public key algorithm used by the certificate. | |
unsigned int | get_pubkey_bits () const |
The number of bits of the public key algorithm. | |
std::string const & | get_signature_algorithm () const |
The algorithm used for signing, typically the public key algorithm combined with a hash. | |
std::string const & | get_fingerprint_sha256 () const |
Gets fingerprint as hex-encoded sha256. | |
std::string const & | get_fingerprint_sha1 () const |
Gets fingerprint as hex-encoded sha1. | |
std::string const & | get_subject () const |
Gets the subject of the certificate as RDN as described in RFC4514. More... | |
std::string const & | get_issuer () const |
Gets the issuer of the certificate as RDN as described in RFC4514. | |
std::vector< subject_name > const & | get_alt_subject_names () const |
Gets the alternative subject names (SANSs) of the certificated, usually hostnames. | |
operator bool () const | |
bool | self_signed () const |
Indicates whether the certificate is self-signed. | |
Represents all relevant information of a X.509 certificate as used by TLS.
|
inline |
Gets the subject of the certificate as RDN as described in RFC4514.
Never use the CN field to compare it against a hostname, that's what the SANs are for.