Botan 3.6.1
Crypto and TLS for C&
|
#include <x509self.h>
Public Member Functions | |
void | add_constraints (Key_Constraints constr) |
void | add_ex_constraint (const OID &oid) |
void | add_ex_constraint (std::string_view name) |
void | CA_key (size_t limit=1) |
void | not_after (std::string_view time) |
void | not_before (std::string_view time) |
void | set_padding_scheme (std::string_view scheme) |
X509_Cert_Options (std::string_view opts="", uint32_t expire_time=365 *24 *60 *60) | |
Public Attributes | |
std::string | challenge |
std::string | common_name |
Key_Constraints | constraints |
std::string | country |
std::string | dns |
std::string | |
X509_Time | end |
std::vector< OID > | ex_constraints |
Extensions | extensions |
std::string | ip |
bool | is_CA |
std::string | locality |
std::vector< std::string > | more_dns |
std::vector< std::string > | more_org_units |
std::string | org_unit |
std::string | organization |
std::string | padding_scheme |
size_t | path_limit |
std::string | serial_number |
X509_Time | start |
std::string | state |
std::string | uri |
std::string | xmpp |
Options for X.509 certificates.
Definition at line 23 of file x509self.h.
Botan::X509_Cert_Options::X509_Cert_Options | ( | std::string_view | opts = "", |
uint32_t | expire_time = 365 * 24 * 60 * 60 ) |
Construct a new options object
opts | define the common name of this object. An example for this parameter would be "common_name/country/organization/organizational_unit". |
expire_time | the expiration time (from the current clock in seconds) |
Definition at line 65 of file x509opt.cpp.
References common_name, country, end, is_CA, org_unit, organization, padding_scheme, path_limit, Botan::split_on(), and start.
void Botan::X509_Cert_Options::add_constraints | ( | Key_Constraints | constr | ) |
Add the key constraints of the KeyUsage extension.
constr | the constraints to set |
Definition at line 32 of file x509opt.cpp.
References constraints.
void Botan::X509_Cert_Options::add_ex_constraint | ( | const OID & | oid | ) |
Add constraints to the ExtendedKeyUsage extension.
oid | the oid to add |
Definition at line 39 of file x509opt.cpp.
References ex_constraints.
void Botan::X509_Cert_Options::add_ex_constraint | ( | std::string_view | name | ) |
Add constraints to the ExtendedKeyUsage extension.
name | the name to look up the oid to add |
Definition at line 46 of file x509opt.cpp.
References ex_constraints, and Botan::OID::from_string().
void Botan::X509_Cert_Options::CA_key | ( | size_t | limit = 1 | ) |
Mark the certificate as a CA certificate and set the path limit.
limit | the path limit to be set in the BasicConstraints extension. |
Definition at line 53 of file x509opt.cpp.
References is_CA, and path_limit.
void Botan::X509_Cert_Options::not_after | ( | std::string_view | time | ) |
Set the notAfter of the certificate.
time | the notAfter value of the certificate |
Definition at line 25 of file x509opt.cpp.
References end.
void Botan::X509_Cert_Options::not_before | ( | std::string_view | time | ) |
Set the notBefore of the certificate.
time | the notBefore value of the certificate |
Definition at line 18 of file x509opt.cpp.
References start.
void Botan::X509_Cert_Options::set_padding_scheme | ( | std::string_view | scheme | ) |
Choose a padding scheme different from the default for the key used.
Definition at line 58 of file x509opt.cpp.
References padding_scheme.
std::string Botan::X509_Cert_Options::challenge |
the subject challenge password
Definition at line 98 of file x509self.h.
Referenced by Botan::X509::create_cert_req().
std::string Botan::X509_Cert_Options::common_name |
the subject common name
Definition at line 28 of file x509self.h.
Referenced by X509_Cert_Options().
Key_Constraints Botan::X509_Cert_Options::constraints |
The key constraints for the subject public key
Definition at line 124 of file x509self.h.
Referenced by add_constraints(), Botan::X509::create_cert_req(), and Botan::X509::create_self_signed_cert().
std::string Botan::X509_Cert_Options::country |
std::string Botan::X509_Cert_Options::dns |
the subject DNS
Definition at line 83 of file x509self.h.
std::string Botan::X509_Cert_Options::email |
the subject email adress
Definition at line 68 of file x509self.h.
X509_Time Botan::X509_Cert_Options::end |
the subject notAfter
Definition at line 107 of file x509self.h.
Referenced by Botan::X509::create_self_signed_cert(), not_after(), and X509_Cert_Options().
std::vector<OID> Botan::X509_Cert_Options::ex_constraints |
The key extended constraints for the subject public key
Definition at line 129 of file x509self.h.
Referenced by add_ex_constraint(), add_ex_constraint(), and Botan::X509::create_self_signed_cert().
Extensions Botan::X509_Cert_Options::extensions |
Additional X.509 extensions
Definition at line 134 of file x509self.h.
Referenced by Botan::X509::create_cert_req(), and Botan::X509::create_self_signed_cert().
std::string Botan::X509_Cert_Options::ip |
the subject IPv4 address
Definition at line 78 of file x509self.h.
bool Botan::X509_Cert_Options::is_CA |
Indicates whether the certificate request
Definition at line 112 of file x509self.h.
Referenced by CA_key(), Botan::X509::create_cert_req(), Botan::X509::create_self_signed_cert(), and X509_Cert_Options().
std::string Botan::X509_Cert_Options::locality |
the subject locality
Definition at line 53 of file x509self.h.
std::vector<std::string> Botan::X509_Cert_Options::more_dns |
additional subject DNS entries.
Definition at line 88 of file x509self.h.
std::vector<std::string> Botan::X509_Cert_Options::more_org_units |
additional subject organizational units.
Definition at line 48 of file x509self.h.
std::string Botan::X509_Cert_Options::org_unit |
the subject organizational unit
Definition at line 43 of file x509self.h.
Referenced by X509_Cert_Options().
std::string Botan::X509_Cert_Options::organization |
the subject organization
Definition at line 38 of file x509self.h.
Referenced by X509_Cert_Options().
std::string Botan::X509_Cert_Options::padding_scheme |
Definition at line 119 of file x509self.h.
Referenced by Botan::X509::create_cert_req(), Botan::X509::create_self_signed_cert(), set_padding_scheme(), and X509_Cert_Options().
size_t Botan::X509_Cert_Options::path_limit |
Indicates the BasicConstraints path limit
Definition at line 117 of file x509self.h.
Referenced by CA_key(), Botan::X509::create_cert_req(), Botan::X509::create_self_signed_cert(), and X509_Cert_Options().
std::string Botan::X509_Cert_Options::serial_number |
the subject serial number
Definition at line 63 of file x509self.h.
X509_Time Botan::X509_Cert_Options::start |
the subject notBefore
Definition at line 103 of file x509self.h.
Referenced by Botan::X509::create_self_signed_cert(), not_before(), and X509_Cert_Options().
std::string Botan::X509_Cert_Options::state |
the subject state
Definition at line 58 of file x509self.h.
std::string Botan::X509_Cert_Options::uri |
the subject URI
Definition at line 73 of file x509self.h.
std::string Botan::X509_Cert_Options::xmpp |
the subject XMPP
Definition at line 93 of file x509self.h.