Botan 3.9.0
Crypto and TLS for C&
|
#include <asn1_obj.h>
Public Member Functions | |
ASN1_String (std::string_view utf8, ASN1_Type tag) | |
ASN1_String (std::string_view utf8="") | |
std::vector< uint8_t > | BER_encode () const |
void | decode_from (BER_Decoder &from) override |
bool | empty () const |
void | encode_into (DER_Encoder &to) const override |
bool | operator== (const ASN1_String &other) const |
size_t | size () const |
ASN1_Type | tagging () const |
const std::string & | value () const |
Static Public Member Functions | |
static bool | is_string_type (ASN1_Type tag) |
Friends | |
bool | operator< (const ASN1_String &a, const ASN1_String &b) |
ASN.1 string type This class normalizes all inputs to a UTF-8 std::string
Definition at line 430 of file asn1_obj.h.
|
explicit |
Definition at line 70 of file asn1_str.cpp.
References ASN1_String().
Referenced by ASN1_String(), operator<, and operator==().
Botan::ASN1_String::ASN1_String | ( | std::string_view | utf8, |
ASN1_Type | tag ) |
Definition at line 64 of file asn1_str.cpp.
|
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 encode_into().
Referenced by 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(), Botan::PSS_Params::PSS_Params(), and Botan::Certificate_Store_In_SQL::revoke_cert().
|
overridevirtual |
Decode whatever this object is from from
from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 88 of file asn1_str.cpp.
References Botan::BER_Object::bits(), Botan::BmpString, Botan::fmt(), Botan::BER_Decoder::get_next_object(), Botan::latin1_to_utf8(), Botan::BER_Object::length(), Botan::TeletexString, Botan::ASN1::to_string(), Botan::BER_Object::type(), Botan::ucs2_to_utf8(), Botan::ucs4_to_utf8(), and Botan::UniversalString.
|
inline |
Definition at line 441 of file asn1_obj.h.
Referenced by Botan::X509_DN::add_attribute().
|
overridevirtual |
Encode whatever this object is into to
to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 75 of file asn1_str.cpp.
References Botan::DER_Encoder::add_object(), BOTAN_ASSERT_NOMSG, tagging(), and Botan::Universal.
|
static |
Return true iff this is a tag for a known string type we can handle.
Definition at line 60 of file asn1_str.cpp.
Referenced by Botan::AlternativeName::decode_from().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 437 of file asn1_obj.h.
Referenced by Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::AlternativeName::encode_into(), Botan::X509_DN::get_first_attribute(), operator<, operator==(), Botan::TLS::Session::Session(), and size().
|
friend |
Definition at line 450 of file asn1_obj.h.
References ASN1_String(), and value().