|
Botan
2.13.0
Crypto and TLS for C++11
|
#include <x509_dn.h>
Public Member Functions | |
| void | add_attribute (const std::string &key, const std::string &val) |
| void | add_attribute (const OID &oid, const std::string &val) |
| void | add_attribute (const OID &oid, const ASN1_String &val) |
| std::vector< uint8_t > | BER_encode () const |
| std::multimap< std::string, std::string > | contents () const |
| void | decode_from (class BER_Decoder &) override |
| const std::vector< std::pair< OID, ASN1_String > > & | dn_info () const |
| bool | empty () const |
| void | encode_into (class DER_Encoder &) const override |
| std::vector< std::string > | get_attribute (const std::string &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 (const std::string &attr) const |
| bool | has_field (const OID &oid) const |
| bool | has_field (const std::string &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 (const std::string &key) |
| static size_t | lookup_ub (const OID &oid) |
|
default |
|
inlineexplicit |
Definition at line 29 of file x509_dn.h.
|
inlineexplicit |
Definition at line 35 of file x509_dn.h.
| void Botan::X509_DN::add_attribute | ( | const std::string & | key, |
| const std::string & | val | ||
| ) |
Definition at line 23 of file x509_dn.cpp.
References Botan::OID::from_string().
Referenced by Botan::create_dn(), decode_from(), and Botan::operator>>().
|
inline |
Definition at line 67 of file x509_dn.h.
| void Botan::X509_DN::add_attribute | ( | const OID & | oid, |
| const ASN1_String & | val | ||
| ) |
Definition at line 32 of file x509_dn.cpp.
References Botan::ASN1_String::empty().
|
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 16 of file asn1_obj.cpp.
References Botan::ASN1_Object::encode_into().
Referenced by Botan::PSSR::config_for_x509(), 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 56 of file x509_dn.cpp.
References Botan::multimap_insert().
|
overridevirtual |
Decode whatever this object is from from
| from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 272 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::SEQUENCE, Botan::SET, Botan::BER_Decoder::start_cons(), and Botan::BER_Decoder::verify_end().
Referenced by Botan::Certificate_Store_In_SQL::all_subjects(), and Botan::GeneralName::decode_from().
|
static |
Definition at line 129 of file x509_dn.cpp.
Referenced by get_attribute(), get_first_attribute(), has_field(), and Botan::operator>>().
|
inline |
|
inline |
Definition at line 52 of file x509_dn.h.
Referenced by Botan::OCSP::Response::check_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 241 of file x509_dn.cpp.
References Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::raw_bytes(), Botan::SEQUENCE, Botan::SET, and Botan::DER_Encoder::start_cons().
| std::vector< std::string > Botan::X509_DN::get_attribute | ( | const std::string & | attr | ) | const |
Definition at line 109 of file x509_dn.cpp.
References deref_info_field(), and Botan::OID::from_string().
Referenced by Botan::X509_Certificate::issuer_info(), Botan::GeneralName::matches(), and Botan::X509_Certificate::subject_info().
| std::multimap< OID, std::string > Botan::X509_DN::get_attributes | ( | ) | const |
Definition at line 44 of file x509_dn.cpp.
References Botan::multimap_insert().
Referenced by Botan::operator<(), and Botan::operator==().
|
inline |
| ASN1_String Botan::X509_DN::get_first_attribute | ( | const OID & | oid | ) | const |
Definition at line 93 of file x509_dn.cpp.
Referenced by get_first_attribute().
| std::string Botan::X509_DN::get_first_attribute | ( | const std::string & | attr | ) | const |
Definition at line 87 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 76 of file x509_dn.cpp.
Referenced by has_field().
| bool Botan::X509_DN::has_field | ( | const std::string & | attr | ) | const |
Definition at line 67 of file x509_dn.cpp.
References deref_info_field(), has_field(), Botan::OID::has_value(), and Botan::OIDS::str2oid_or_empty().
|
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 47 of file x509_dn_ub.cpp.
Referenced by Botan::PKIX::check_chain().
| std::string Botan::X509_DN::to_string | ( | ) | const |
Definition at line 326 of file x509_dn.cpp.
1.8.9.1