|
Botan 3.13.0
Crypto and TLS for C&
|
#include <asn1_obj.h>
Public Member Functions | |
| void | assert_is_a (ASN1_Type type_tag, ASN1_Class class_tag, std::string_view descr="object") const |
| BER_Object ()=default | |
| BER_Object (BER_Object &&other)=default | |
| BER_Object (const BER_Object &other)=default | |
| const uint8_t * | bits () const |
| ASN1_Class | class_tag () const |
| std::span< const uint8_t > | data () const |
| ASN1_Class | get_class () const |
| bool | is_a (ASN1_Type type_tag, ASN1_Class class_tag) const |
| bool | is_a (int type_tag, ASN1_Class class_tag) const |
| bool | is_set () const |
| size_t | length () const |
| BER_Object & | operator= (BER_Object &&other)=default |
| BER_Object & | operator= (const BER_Object &other)=default |
| uint32_t | tagging () const |
| ASN1_Type | type () const |
| ASN1_Type | type_tag () const |
| ~BER_Object () | |
Friends | |
| class | BER_Decoder |
BER Encoded Object
Definition at line 234 of file asn1_obj.h.
|
default |
Create an unset BER_Object
Referenced by BER_Object(), BER_Object(), operator=(), and operator=().
|
default |
Copy constructor
References BER_Object().
|
default |
Move constructor
References BER_Object().
| Botan::BER_Object::~BER_Object | ( | ) |
Definition at line 58 of file asn1_obj.cpp.
References Botan::secure_scrub_memory().
| void Botan::BER_Object::assert_is_a | ( | ASN1_Type | type_tag, |
| ASN1_Class | class_tag, | ||
| std::string_view | descr = "object" ) const |
Throw BER_Decoding_Error unless this object has the expected tagging
| type_tag | the expected type tag |
| class_tag | the expected class tag |
| descr | a description of the object, used in the exception message |
Definition at line 65 of file asn1_obj.cpp.
References Botan::asn1_class_to_string(), Botan::asn1_tag_to_string(), Botan::Constructed, is_a(), Botan::NoObject, and Botan::Universal.
Referenced by Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode_bitstring(), Botan::BER_Decoder::decode_implicit(), Botan::BER_Decoder::decode_null(), and Botan::BER_Decoder::start_cons().
|
inline |
Return a pointer to the contents of this object, excluding the tag and length header
Definition at line 298 of file asn1_obj.h.
Referenced by Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode_bitstring(), Botan::AlternativeName::decode_from(), Botan::ASN1_String::decode_from(), Botan::GeneralName::decode_from(), Botan::BER_Decoder::get_next_value(), and Botan::BER_Decoder::start_cons().
|
inline |
Return the class tag of this object
Definition at line 282 of file asn1_obj.h.
Referenced by BER_Decoder, Botan::BER_Decoder::decode_bitstring(), Botan::AlternativeName::decode_from(), and tagging().
|
inline |
Return the contents of this object, excluding the tag and length header
Definition at line 308 of file asn1_obj.h.
Referenced by Botan::BER_Decoder::decode(), Botan::AlternativeName::decode_from(), Botan::OID::decode_from(), and Botan::ASN1::to_string().
|
inline |
Return the class tag of this object, an alias for class_tag()
Definition at line 292 of file asn1_obj.h.
Referenced by Botan::AlternativeName::decode_from(), Botan::ASN1_String::decode_from(), Botan::ASN1_Time::decode_from(), and Botan::Cert_Extension::TNAuthList::Entry::decode_from().
| bool Botan::BER_Object::is_a | ( | ASN1_Type | type_tag, |
| ASN1_Class | class_tag ) const |
Return true if this object has the given tagging
Definition at line 97 of file asn1_obj.cpp.
Referenced by assert_is_a(), Botan::AlternativeName::decode_from(), Botan::Cert_Extension::DistributionPointName::decode_from(), Botan::GeneralName::decode_from(), Botan::OCSP::SingleResponse::decode_from(), Botan::BER_Decoder::decode_optional(), Botan::BER_Decoder::decode_optional_implicit(), Botan::BER_Decoder::decode_optional_octet_aligned_bitstring(), Botan::BER_Decoder::decode_optional_string(), is_a(), and Botan::OCSP::Response::Response().
| bool Botan::BER_Object::is_a | ( | int | type_tag, |
| ASN1_Class | class_tag ) const |
Return true if this object has the given tagging
| type_tag | the expected type tag, typically a context specific tag number |
| class_tag | the expected class tag |
Definition at line 101 of file asn1_obj.cpp.
References is_a().
|
inline |
Return true if this object holds a value, ie if it was not read past the end of the input
Definition at line 267 of file asn1_obj.h.
References Botan::NoObject.
Referenced by Botan::BER_Decoder::get_next_object().
|
inline |
Return the length in bytes of the contents of this object
Definition at line 303 of file asn1_obj.h.
Referenced by BER_Decoder, Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode_bitstring(), Botan::AlternativeName::decode_from(), Botan::ASN1_String::decode_from(), Botan::GeneralName::decode_from(), Botan::OID::decode_from(), Botan::BER_Decoder::decode_null(), Botan::BER_Decoder::get_next_value(), and Botan::BER_Decoder::start_cons().
|
default |
Move assignment
References BER_Object().
|
default |
Copy assignment
References BER_Object().
|
inline |
Return the type and class tags combined into a single value
Definition at line 272 of file asn1_obj.h.
References class_tag(), and type_tag().
Referenced by Botan::OID::decode_from(), and Botan::BER_Decoder::get_next_object().
|
inline |
Return the type tag of this object, an alias for type_tag()
Definition at line 287 of file asn1_obj.h.
Referenced by Botan::AlternativeName::decode_from(), Botan::ASN1_String::decode_from(), and Botan::ASN1_Time::decode_from().
|
inline |
Return the type tag of this object
Definition at line 277 of file asn1_obj.h.
Referenced by BER_Decoder, Botan::AlternativeName::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifierChoice::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdOrRange::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressChoice< V >::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressFamily::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressOrRange< V >::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), and tagging().
|
friend |
Definition at line 340 of file asn1_obj.h.
References BER_Decoder, class_tag(), length(), and type_tag().
Referenced by BER_Decoder.