Botan 3.6.1
Crypto and TLS for C&
|
#include <pkix_types.h>
Public Member Functions | |
void | add_attribute (const OID &oid, const ASN1_String &val) |
void | add_attribute (const OID &oid, std::string_view val) |
void | add_attribute (std::string_view key, std::string_view val) |
std::vector< uint8_t > | BER_encode () const |
std::multimap< std::string, std::string > | contents () const |
size_t | count () const |
void | decode_from (BER_Decoder &) override |
std::vector< uint8_t > | DER_encode () const |
const std::vector< std::pair< OID, ASN1_String > > & | dn_info () const |
bool | empty () const |
void | encode_into (DER_Encoder &) const override |
std::vector< std::string > | get_attribute (std::string_view attr) const |
std::multimap< OID, std::string > | get_attributes () const |
const std::vector< uint8_t > & | get_bits () const |
ASN1_String | get_first_attribute (const OID &oid) const |
std::string | get_first_attribute (std::string_view attr) const |
bool | has_field (const OID &oid) const |
bool | has_field (std::string_view attr) const |
std::string | to_string () const |
X509_DN ()=default | |
X509_DN (const std::multimap< OID, std::string > &args) | |
X509_DN (const std::multimap< std::string, std::string > &args) | |
Static Public Member Functions | |
static std::string | deref_info_field (std::string_view key) |
static size_t | lookup_ub (const OID &oid) |
Distinguished Name
Definition at line 38 of file pkix_types.h.
|
default |
|
inlineexplicit |
Definition at line 42 of file pkix_types.h.
|
inlineexplicit |
Definition at line 48 of file pkix_types.h.
void Botan::X509_DN::add_attribute | ( | const OID & | oid, |
const ASN1_String & | val ) |
Definition at line 100 of file x509_dn.cpp.
References Botan::ASN1_String::empty().
|
inline |
Definition at line 84 of file pkix_types.h.
References add_attribute().
Referenced by add_attribute().
void Botan::X509_DN::add_attribute | ( | std::string_view | key, |
std::string_view | val ) |
Definition at line 93 of file x509_dn.cpp.
References add_attribute(), and Botan::OID::from_string().
Referenced by add_attribute(), decode_from(), and Botan::operator>>().
|
inherited |
Return the encoding of this object. This is a convenience method when just one object needs to be serialized. Use DER_Encoder for complicated encodings.
Definition at line 19 of file asn1_obj.cpp.
References Botan::ASN1_Object::encode_into().
Referenced by Botan::PSS_Params::decode_from(), Botan::Certificate_Store_In_SQL::find_all_certs(), Botan::Certificate_Store_In_SQL::find_cert(), Botan::X509_Certificate::fingerprint(), Botan::Certificate_Store_In_SQL::insert_cert(), Botan::X509_Object::PEM_encode(), and Botan::Certificate_Store_In_SQL::revoke_cert().
std::multimap< std::string, std::string > Botan::X509_DN::contents | ( | ) | const |
Definition at line 124 of file x509_dn.cpp.
|
inline |
Definition at line 69 of file pkix_types.h.
Referenced by Botan::NameConstraints::is_excluded(), and Botan::NameConstraints::is_permitted().
|
overridevirtual |
Decode whatever this object is from from
from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 347 of file x509_dn.cpp.
References add_attribute(), Botan::BER_Decoder::decode(), Botan::BER_Decoder::end_cons(), Botan::BER_Decoder::more_items(), Botan::BER_Decoder::raw_bytes(), Botan::BER_Decoder::start_sequence(), and Botan::BER_Decoder::start_set().
Referenced by Botan::Certificate_Store_In_SQL::all_subjects(), Botan::Certificate_Store_Windows::all_subjects(), and Botan::GeneralName::decode_from().
std::vector< uint8_t > Botan::X509_DN::DER_encode | ( | ) | const |
Definition at line 316 of file x509_dn.cpp.
References encode_into().
|
static |
Definition at line 189 of file x509_dn.cpp.
Referenced by get_attribute(), get_first_attribute(), has_field(), and Botan::operator>>().
|
inline |
Definition at line 73 of file pkix_types.h.
Referenced by Botan::PKIX::check_chain(), and Botan::operator<<().
|
inline |
Definition at line 67 of file pkix_types.h.
Referenced by Botan::OCSP::Response::find_signing_certificate(), Botan::OCSP::Response::Response(), and Botan::OCSP::Response::verify_signature().
|
overridevirtual |
Encode whatever this object is into to
to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 326 of file x509_dn.cpp.
References Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::raw_bytes(), Botan::DER_Encoder::start_sequence(), and Botan::DER_Encoder::start_set().
Referenced by DER_encode().
std::vector< std::string > Botan::X509_DN::get_attribute | ( | std::string_view | attr | ) | const |
Definition at line 172 of file x509_dn.cpp.
References deref_info_field(), and Botan::OID::from_string().
Referenced by Botan::GeneralName::matches().
std::multimap< OID, std::string > Botan::X509_DN::get_attributes | ( | ) | const |
Definition at line 112 of file x509_dn.cpp.
Referenced by Botan::operator<(), and Botan::operator==().
|
inline |
Definition at line 63 of file pkix_types.h.
ASN1_String Botan::X509_DN::get_first_attribute | ( | const OID & | oid | ) | const |
Definition at line 159 of file x509_dn.cpp.
Referenced by get_first_attribute().
std::string Botan::X509_DN::get_first_attribute | ( | std::string_view | attr | ) | const |
Definition at line 154 of file x509_dn.cpp.
References deref_info_field(), Botan::OID::from_string(), get_first_attribute(), and Botan::ASN1_String::value().
bool Botan::X509_DN::has_field | ( | const OID & | oid | ) | const |
Definition at line 144 of file x509_dn.cpp.
Referenced by has_field().
bool Botan::X509_DN::has_field | ( | std::string_view | attr | ) | const |
Definition at line 133 of file x509_dn.cpp.
References deref_info_field(), Botan::OID::from_string(), has_field(), and Botan::OID::has_value().
|
static |
Lookup upper bounds in characters for the length of distinguished name fields as given in RFC 5280, Appendix A.
oid | the oid of the DN to lookup |
Definition at line 48 of file x509_dn_ub.cpp.
Referenced by Botan::PKIX::check_chain().
std::string Botan::X509_DN::to_string | ( | ) | const |
Definition at line 402 of file x509_dn.cpp.
Referenced by Botan::Flatfile_Certificate_Store::Flatfile_Certificate_Store().