|
Botan 3.13.0
Crypto and TLS for C&
|
#include <ber_dec.h>
Classes | |
| class | Limits |
|
inline |
Set up to BER decode the data in buf of length len
Definition at line 150 of file ber_dec.h.
References BER_Decoder(), and limits().
Referenced by BER_Decoder(), BER_Decoder(), BER_Decoder(), BER_Decoder(), BER_Decoder(), decode(), decode(), decode(), decode(), decode(), decode(), decode(), decode(), decode(), decode(), decode_and_check(), decode_bitstring(), decode_default(), decode_implicit(), decode_implicit(), decode_integer_type(), decode_integer_type(), decode_list(), decode_named_bitstring(), decode_null(), decode_octet_aligned_bitstring(), decode_octet_string_bigint(), decode_optional(), decode_optional(), decode_optional_field(), decode_optional_implicit(), decode_optional_octet_aligned_bitstring(), decode_optional_octet_aligned_bitstring(), decode_optional_string(), decode_optional_string(), discard_remaining(), end_cons(), get_next(), get_next_value(), operator=(), operator=(), raw_bytes(), start_cons(), start_context_specific(), start_explicit_context_specific(), start_sequence(), start_set(), verify_end(), verify_end(), and ~BER_Decoder().
|
explicit |
Set up to BER decode the data in buf
Definition at line 659 of file ber_dec.cpp.
References limits().
|
explicit |
Set up to BER decode the data in src
Definition at line 654 of file ber_dec.cpp.
References limits().
|
inline |
Set up to BER decode the data in obj
Definition at line 166 of file ber_dec.h.
References Botan::BER_Decoder::Limits::BER(), BER_Decoder(), BOTAN_FUTURE_EXPLICIT, and limits().
|
inline |
Set up to BER decode the data in obj TODO(Botan4) remove this?
Definition at line 173 of file ber_dec.h.
References BER_Decoder(), and BOTAN_FUTURE_EXPLICIT.
| Botan::BER_Decoder::BER_Decoder | ( | BER_Object && | obj, |
| Limits | limits ) |
Set up to BER decode the data in obj, taking ownership of its contents
Definition at line 646 of file ber_dec.cpp.
References limits().
|
delete |
References BER_Decoder().
|
defaultnoexcept |
Move constructor
References BER_Decoder().
|
default |
References BER_Decoder(), and get_next_value().
| BER_Decoder & Botan::BER_Decoder::decode | ( | ASN1_Object & | obj, |
| ASN1_Type | type_tag = ASN1_Type::NoObject, | ||
| ASN1_Class | class_tag = ASN1_Class::NoObject ) |
Request an object decode itself from this stream
| obj | the object to decode into |
| type_tag | must be NoObject; implicit tagging is not supported here |
| class_tag | must be NoObject; implicit tagging is not supported here |
Definition at line 671 of file ber_dec.cpp.
References BER_Decoder(), decode(), and Botan::NoObject.
|
inline |
Decode a BER encoded INTEGER
Definition at line 368 of file ber_dec.h.
References BER_Decoder(), decode(), Botan::Integer, and Botan::Universal.
Referenced by decode().
| BER_Decoder & Botan::BER_Decoder::decode | ( | BigInt & | v, |
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag = ASN1_Class::ContextSpecific ) |
Decode an INTEGER with an IMPLICIT tagging
| v | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 775 of file ber_dec.cpp.
References Botan::BER_Object::assert_is_a(), BER_Decoder(), Botan::BER_Object::bits(), Botan::BER_Object::data(), get_next_object(), Botan::ASN1::integer_from_contents(), and Botan::BER_Object::length().
|
inline |
Decode a BER encoded BOOLEAN
Definition at line 358 of file ber_dec.h.
References BER_Decoder(), Botan::Boolean, decode(), and Botan::Universal.
Referenced by decode(), decode(), decode(), decode(), decode_and_check(), decode_constrained_integer(), Botan::AlgorithmIdentifier::decode_from(), Botan::AlternativeName::decode_from(), Botan::Attribute::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdOrRange::decode_from(), Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressFamily::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::CRL_Entry::decode_from(), Botan::Extensions::decode_from(), Botan::GeneralSubtree::decode_from(), Botan::OCSP::CertID::decode_from(), Botan::OCSP::SingleResponse::decode_from(), Botan::X509_DN::decode_from(), Botan::X509_Object::decode_from(), Botan::X509_Serial_Number::decode_from(), decode_implicit(), decode_list(), decode_octet_string_bigint(), decode_optional(), decode_optional_string(), Botan::Ed25519_PrivateKey::Ed25519_PrivateKey(), Botan::Ed448_PrivateKey::Ed448_PrivateKey(), get_next_octet_string(), Botan::GOST_3410_PublicKey::GOST_3410_PublicKey(), Botan::X509::load_key(), Botan::McEliece_PrivateKey::McEliece_PrivateKey(), Botan::McEliece_PublicKey::McEliece_PublicKey(), Botan::pbes2_decrypt(), Botan::PKCS12::PKCS12(), Botan::pkcs12_pbe_decrypt(), Botan::OCSP::Response::Response(), Botan::RSA_PublicKey::RSA_PublicKey(), Botan::TLS::Session::Session(), and Botan::X25519_PrivateKey::X25519_PrivateKey().
| BER_Decoder & Botan::BER_Decoder::decode | ( | bool & | v, |
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag = ASN1_Class::ContextSpecific ) |
Decode a BOOLEAN with an IMPLICIT tagging
| v | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 702 of file ber_dec.cpp.
References Botan::BER_Object::assert_is_a(), BER_Decoder(), Botan::BER_Object::bits(), get_next_object(), and Botan::BER_Object::length().
| BER_Decoder & Botan::BER_Decoder::decode | ( | secure_vector< uint8_t > & | v, |
| ASN1_Type | real_type, | ||
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag = ASN1_Class::ContextSpecific ) |
Decode a BIT STRING or OCTET STRING with an IMPLICIT tagging
| v | where the contents are written |
| real_type | either ASN1_Type::OctetString or ASN1_Type::BitString |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 1018 of file ber_dec.cpp.
References BER_Decoder(), Botan::BitString, get_next_object(), and Botan::OctetString.
|
inline |
Decode a small BER encoded INTEGER
Definition at line 363 of file ber_dec.h.
References BER_Decoder(), decode(), Botan::Integer, and Botan::Universal.
Referenced by decode().
| BER_Decoder & Botan::BER_Decoder::decode | ( | size_t & | v, |
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag = ASN1_Class::ContextSpecific ) |
Decode a small INTEGER with an IMPLICIT tagging
| v | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 725 of file ber_dec.cpp.
References BER_Decoder(), Botan::BigInt::bits(), Botan::BigInt::byte_at(), decode(), and Botan::BigInt::signum().
| BER_Decoder & Botan::BER_Decoder::decode | ( | std::vector< uint8_t > & | v, |
| ASN1_Type | real_type, | ||
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag = ASN1_Class::ContextSpecific ) |
Decode a BIT STRING or OCTET STRING with an IMPLICIT tagging
| v | where the contents are written |
| real_type | either ASN1_Type::OctetString or ASN1_Type::BitString |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 1030 of file ber_dec.cpp.
References BER_Decoder(), Botan::BitString, get_next_object(), and Botan::OctetString.
|
inline |
BER decode a BIT STRING or OCTET STRING
| out | where the contents are written |
| real_type | either ASN1_Type::OctetString or ASN1_Type::BitString |
Definition at line 386 of file ber_dec.h.
References BER_Decoder(), decode(), and Botan::Universal.
|
inline |
Decode a value and throw unless it equals the expected value
| expected | the value the encoding must have |
| error_msg | the message of the exception thrown on a mismatch |
Definition at line 701 of file ber_dec.h.
References BER_Decoder(), and decode().
Referenced by Botan::EC_PrivateKey::EC_PrivateKey(), Botan::OCSP::Response::Response(), Botan::RSA_PrivateKey::RSA_PrivateKey(), and Botan::TLS::Session::Session().
| BER_Decoder & Botan::BER_Decoder::decode_bitstring | ( | ASN1_BitString & | out, |
| ASN1_Type | type_tag = ASN1_Type::BitString, | ||
| ASN1_Class | class_tag = ASN1_Class::Universal ) |
Decode a BIT STRING, retaining the count of unused bits
| out | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 1042 of file ber_dec.cpp.
References Botan::BER_Object::assert_is_a(), BER_Decoder(), Botan::BER_Object::bits(), Botan::BER_Object::class_tag(), Botan::Constructed, get_next_object(), and Botan::BER_Object::length().
Referenced by Botan::Cert_Extension::IPAddressBlocks::IPAddressOrRange< V >::decode_from(), decode_named_bitstring(), and decode_octet_aligned_bitstring().
| uint64_t Botan::BER_Decoder::decode_constrained_integer | ( | ASN1_Type | type_tag, |
| ASN1_Class | class_tag, | ||
| size_t | T_bytes ) |
Decode a non-negative INTEGER that fits in at most T_bytes bytes
Throws BER_Decoding_Error if the value is negative or too large.
| type_tag | the expected type tag |
| class_tag | the expected class tag |
| T_bytes | the maximum size of the value in bytes, at most 8 |
Definition at line 748 of file ber_dec.cpp.
References Botan::BigInt::bits(), Botan::BigInt::byte_at(), decode(), and Botan::BigInt::is_negative().
Referenced by decode_integer_type().
|
inline |
Decode a field carrying an ASN.1 DEFAULT value: if the field is absent out is set to default_value. Unlike decode_optional this is only for fields with a DEFAULT (not bare OPTIONAL fields): when the decoder is configured with Limits::with_default_value_encoding_rejected() and is in DER mode, a field that is present but equal to default_value is rejected, since DER requires such components to be omitted.
Definition at line 569 of file ber_dec.h.
References BER_Decoder(), and decode_optional().
|
inline |
Decode an already-extracted BER_Object as if its tag were real_type/real_class. Used to consume IMPLICIT-tagged values whose body matches a different universal type (e.g. a context-specific [8] body that should be parsed as an OID).
Definition at line 640 of file ber_dec.h.
References BER_Decoder(), decode(), and push_back().
Referenced by Botan::AlternativeName::decode_from(), Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from(), Botan::Cert_Extension::DistributionPointName::decode_from(), decode_implicit(), and decode_optional_implicit().
|
inline |
Read the next object, requiring it be tagged type_tag/class_tag, and decode it as if its tag were real_type/real_class.
| out | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
| real_type | the type tag the contents should be parsed as |
| real_class | the class tag the contents should be parsed as |
Definition at line 662 of file ber_dec.h.
References Botan::BER_Object::assert_is_a(), BER_Decoder(), decode_implicit(), and get_next_object().
|
inline |
Decode an INTEGER into an integral type, throwing if it does not fit
| out | where the value is written |
Definition at line 526 of file ber_dec.h.
References BER_Decoder(), decode_integer_type(), Botan::Integer, and Botan::Universal.
Referenced by decode_integer_type(), and Botan::TLS::Session::Session().
|
inline |
Decode an INTEGER with an IMPLICIT tagging into an integral type, throwing if it does not fit
| out | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 539 of file ber_dec.h.
References BER_Decoder(), Botan::ContextSpecific, and decode_constrained_integer().
| BER_Decoder & Botan::BER_Decoder::decode_list | ( | std::vector< T > & | vec, |
| ASN1_Type | type_tag = ASN1_Type::Sequence, | ||
| ASN1_Class | class_tag = ASN1_Class::Universal ) |
Decode a constructed object containing a list of homogeneously typed values
| vec | where the values are appended |
| type_tag | the expected type tag of the constructed object |
| class_tag | the expected class tag of the constructed object |
Decode a list of homogeneously typed values
Definition at line 880 of file ber_dec.h.
References BER_Decoder(), decode(), end_cons(), more_items(), push_back(), and start_cons().
Referenced by Botan::Cert_Extension::ASBlocks::ASIdentifierChoice::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressChoice< V >::decode_from(), decode_optional_list(), Botan::OCSP::Response::Response(), and Botan::TLS::Session::Session().
| BER_Decoder & Botan::BER_Decoder::decode_named_bitstring | ( | uint64_t & | bits, |
| size_t | width, | ||
| ASN1_Type | type_tag = ASN1_Type::BitString, | ||
| ASN1_Class | class_tag = ASN1_Class::Universal ) |
Decode a BIT STRING that is actually a bit set, such as X.509 KeyUsage
The first bit of the encoding becomes the most significant of the width bits of bits. Throws if more than width bits are encoded, or in DER mode if the encoding is not minimal (ie the final bit is unset).
| bits | where the bit set is written |
| width | the number of named bits, at most 64 |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 1068 of file ber_dec.cpp.
References BER_Decoder(), Botan::ASN1_BitString::bit_at(), Botan::ASN1_BitString::bit_length(), and decode_bitstring().
| BER_Decoder & Botan::BER_Decoder::decode_null | ( | ) |
Decode a BER encoded NULL, throwing if the next object is anything else
Definition at line 683 of file ber_dec.cpp.
References Botan::BER_Object::assert_is_a(), BER_Decoder(), get_next_object(), Botan::BER_Object::length(), Botan::Null, and Botan::Universal.
Referenced by Botan::Cert_Extension::ASBlocks::ASIdentifierChoice::decode_from(), and Botan::Cert_Extension::IPAddressBlocks::IPAddressChoice< V >::decode_from().
|
inline |
Decode a BIT STRING, throwing unless it has no unused bits
| out | where the bits are written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 462 of file ber_dec.h.
References BER_Decoder(), Botan::BitString, Botan::ASN1_BitString::bytes(), decode_bitstring(), Botan::Universal, and Botan::ASN1_BitString::unused_bits().
Referenced by Botan::X509_Object::decode_from(), decode_optional_octet_aligned_bitstring(), Botan::X509::load_key(), and Botan::OCSP::Response::Response().
| BER_Decoder & Botan::BER_Decoder::decode_octet_string_bigint | ( | BigInt & | b | ) |
Decode an integer value which is typed as an octet string
Definition at line 692 of file ber_dec.cpp.
References BER_Decoder(), decode(), Botan::BigInt::from_bytes(), and Botan::OctetString.
| BER_Decoder & Botan::BER_Decoder::decode_optional | ( | std::optional< T > & | optval, |
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag ) |
Decode an OPTIONAL field, setting optval to nullopt if absent
| optval | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Decode an OPTIONAL or DEFAULT element
Definition at line 827 of file ber_dec.h.
References BER_Decoder(), decode(), Botan::ExplicitContextSpecific, get_next_object(), Botan::BER_Object::is_a(), and push_back().
|
inline |
Decode an OPTIONAL field, setting out to default_value if absent
| out | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
| default_value | the value used if the field is not present |
Definition at line 553 of file ber_dec.h.
References BER_Decoder(), and decode_optional().
Referenced by decode_default(), Botan::Extensions::decode_from(), Botan::GeneralSubtree::decode_from(), Botan::OCSP::SingleResponse::decode_from(), decode_optional(), and Botan::OCSP::Response::Response().
|
inline |
Decode an OPTIONAL field identified by a context-specific tag number.
If the next object is tagged [tag_no] with class class_tag, fn is invoked to decode it (fn must consume exactly that object). Otherwise the stream is left unchanged and fn is not called.
For a SEQUENCE of optional tagged fields that (per DER) appear at most once and in increasing tag order: call this once per field in tag order, then end_cons(), which rejects any unconsumed object (i.e. a duplicate, out-of-order, or unknown-tag field).
Definition at line 626 of file ber_dec.h.
References BER_Decoder(), and peek_next_object().
Referenced by Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from().
| BER_Decoder & Botan::BER_Decoder::decode_optional_implicit | ( | T & | out, |
| ASN1_Type | type_tag, | ||
| ASN1_Class | class_tag, | ||
| ASN1_Type | real_type, | ||
| ASN1_Class | real_class, | ||
| const T & | default_value = T() ) |
Decode an OPTIONAL IMPLICIT tagged field, setting out to default_value if absent
| out | where the value is written |
| type_tag | the expected type tag |
| class_tag | the expected class tag |
| real_type | the type tag the contents should be parsed as |
| real_class | the class tag the contents should be parsed as |
| default_value | the value used if the field is not present |
Decode an OPTIONAL or DEFAULT element with an IMPLICIT tagging
Definition at line 857 of file ber_dec.h.
References BER_Decoder(), decode_implicit(), get_next_object(), Botan::BER_Object::is_a(), and push_back().
| bool Botan::BER_Decoder::decode_optional_list | ( | std::vector< T > & | vec, |
| ASN1_Type | type_tag = ASN1_Type::Sequence, | ||
| ASN1_Class | class_tag = ASN1_Class::Universal ) |
Decode a list of homogeneously typed values if one is present
| vec | where the values are appended |
| type_tag | the expected type tag of the constructed object |
| class_tag | the expected class tag of the constructed object |
Decode an optional list of homogeneously typed values
Definition at line 898 of file ber_dec.h.
References decode_list(), and peek_next_object().
|
inline |
Decode an OPTIONAL BIT STRING with no unused bits, clearing out if it is absent
| out | where the bits are written |
| expected_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 800 of file ber_dec.h.
References BER_Decoder(), Botan::ContextSpecific, and decode_optional_octet_aligned_bitstring().
|
inline |
Decode an OPTIONAL BIT STRING with no unused bits, clearing out if it is absent
| out | where the bits are written |
| expected_tag | the expected tag number |
| class_tag | the expected class tag |
Definition at line 769 of file ber_dec.h.
References BER_Decoder(), Botan::ContextSpecific, decode_octet_aligned_bitstring(), Botan::ExplicitContextSpecific, get_next_object(), Botan::BER_Object::is_a(), and push_back().
Referenced by decode_optional_octet_aligned_bitstring().
|
inline |
Decode an OPTIONAL string type, clearing out if it is absent
| out | where the contents are written |
| real_type | the type tag the contents should be parsed as |
| expected_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 753 of file ber_dec.h.
References BER_Decoder(), Botan::ContextSpecific, and decode_optional_string().
|
inline |
Decode an OPTIONAL string type, clearing out if it is absent
| out | where the contents are written |
| real_type | the type tag the contents should be parsed as |
| expected_tag | the expected tag number |
| class_tag | the expected class tag |
Definition at line 721 of file ber_dec.h.
References BER_Decoder(), Botan::ContextSpecific, decode(), Botan::ExplicitContextSpecific, get_next_object(), Botan::BER_Object::is_a(), and push_back().
Referenced by decode_optional_string(), and Botan::OCSP::Response::Response().
| BER_Decoder & Botan::BER_Decoder::discard_remaining | ( | ) |
Discard any data that remains unread Returns (*this)
Definition at line 488 of file ber_dec.cpp.
References BER_Decoder().
Referenced by Botan::Ed25519_PrivateKey::Ed25519_PrivateKey(), and Botan::X25519_PrivateKey::X25519_PrivateKey().
| BER_Decoder & Botan::BER_Decoder::end_cons | ( | ) |
Finish decoding a constructed data, throws if any data remains. Returns the parent of *this (ie the object on which start_cons was called).
Definition at line 630 of file ber_dec.cpp.
References BER_Decoder().
Referenced by Botan::AlgorithmIdentifier::decode_from(), Botan::Attribute::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdOrRange::decode_from(), Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressFamily::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressOrRange< V >::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::CRL_Entry::decode_from(), Botan::Extensions::decode_from(), Botan::GeneralSubtree::decode_from(), Botan::OCSP::CertID::decode_from(), Botan::OCSP::SingleResponse::decode_from(), Botan::X509_DN::decode_from(), Botan::X509_Object::decode_from(), decode_list(), Botan::X509::load_key(), Botan::McEliece_PrivateKey::McEliece_PrivateKey(), Botan::McEliece_PublicKey::McEliece_PublicKey(), Botan::pbes2_decrypt(), Botan::PKCS12::PKCS12(), Botan::pkcs12_pbe_decrypt(), Botan::OCSP::Response::Response(), and Botan::RSA_PublicKey::RSA_PublicKey().
|
inline |
Get the next object in the data stream, storing it in ber
If EOF, ber is set to an object with type NO_OBJECT.
Definition at line 210 of file ber_dec.h.
References BER_Decoder(), and get_next_object().
Referenced by Botan::OCSP::SingleResponse::decode_from().
| BER_Object Botan::BER_Decoder::get_next_object | ( | ) |
Get the next object in the data stream. If EOF, returns an object with type NO_OBJECT.
Definition at line 516 of file ber_dec.cpp.
References Botan::Eoc, Botan::BER_Object::is_set(), Botan::NoObject, Botan::BER_Object::tagging(), and Botan::Universal.
Referenced by decode(), decode(), decode(), decode(), decode_bitstring(), Botan::AlternativeName::decode_from(), Botan::ASN1_String::decode_from(), Botan::ASN1_Time::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::GeneralName::decode_from(), Botan::OID::decode_from(), decode_implicit(), decode_null(), decode_optional(), decode_optional_implicit(), decode_optional_octet_aligned_bitstring(), decode_optional_string(), get_next(), peek_next_object(), Botan::OCSP::Response::Response(), and start_cons().
|
inline |
Decode the next object as an OCTET STRING and return its contents
Definition at line 373 of file ber_dec.h.
References decode(), and Botan::OctetString.
Referenced by Botan::OCSP::Response::Response().
|
inline |
Get next object and copy value to POD type Asserts value length is equal to POD type sizeof. Asserts Type tag and optional Class tag according to parameters. Copy value to POD type (struct, union, C-style array, std::array, etc.).
| out | POD type reference where to copy object value |
| type_tag | ASN1_Type enum to assert type on object read |
| class_tag | ASN1_Type enum to assert class on object read (default: CONTEXT_SPECIFIC) |
Definition at line 322 of file ber_dec.h.
References BER_Decoder(), Botan::BER_Object::bits(), Botan::ContextSpecific, get_next_value(), and Botan::BER_Object::length().
Referenced by get_next_value(), and ~BER_Decoder().
|
inline |
Returns the limits currently applied to this decoder
Definition at line 197 of file ber_dec.h.
References limits().
Referenced by BER_Decoder(), BER_Decoder(), BER_Decoder(), BER_Decoder(), BER_Decoder(), Botan::AlternativeName::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::GeneralName::decode_from(), Botan::X509_DN::decode_from(), and limits().
| bool Botan::BER_Decoder::more_items | ( | ) | const |
Return true if there is at least one more item remaining
Definition at line 461 of file ber_dec.cpp.
Referenced by Botan::AlternativeName::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::CRL_Entry::decode_from(), Botan::Extensions::decode_from(), Botan::X509_DN::decode_from(), decode_list(), Botan::PKCS12::PKCS12(), and Botan::OCSP::Response::Response().
|
defaultnoexcept |
Move assignment
References BER_Decoder().
|
delete |
References BER_Decoder().
| const BER_Object & Botan::BER_Decoder::peek_next_object | ( | ) |
Peek at the next object without removing it from the stream
If an object has been pushed, then it returns that object. Otherwise it reads the next object and pushes it. Thus, a you call peek_next_object followed by push_back without a subsequent read, it will fail.
Definition at line 505 of file ber_dec.cpp.
References get_next_object().
Referenced by Botan::Cert_Extension::ASBlocks::ASIdentifierChoice::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdOrRange::decode_from(), Botan::Cert_Extension::DistributionPointName::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::OCSP::SingleResponse::decode_from(), decode_optional_field(), and decode_optional_list().
| void Botan::BER_Decoder::push_back | ( | BER_Object && | obj | ) |
Push an object back onto the stream. Throws if another object was previously pushed and has not been subsequently read out.
Definition at line 607 of file ber_dec.cpp.
| void Botan::BER_Decoder::push_back | ( | const BER_Object & | obj | ) |
Push an object back onto the stream. Throws if another object was previously pushed and has not been subsequently read out.
Definition at line 600 of file ber_dec.cpp.
Referenced by decode_implicit(), decode_list(), decode_optional(), decode_optional_implicit(), decode_optional_octet_aligned_bitstring(), decode_optional_string(), Botan::GOST_3410_PublicKey::GOST_3410_PublicKey(), and Botan::McEliece_PrivateKey::McEliece_PrivateKey().
|
inline |
Save all the bytes remaining in the source
| out | where the remaining bytes are written |
Definition at line 338 of file ber_dec.h.
References BER_Decoder().
Referenced by Botan::AlgorithmIdentifier::decode_from(), Botan::Attribute::decode_from(), Botan::X509_DN::decode_from(), Botan::X509_Object::decode_from(), and Botan::OCSP::Response::Response().
| BER_Decoder Botan::BER_Decoder::start_cons | ( | ASN1_Type | type_tag, |
| ASN1_Class | class_tag ) |
Start decoding a constructed object, returning a decoder for its contents. The returned decoder must be closed with end_cons().
| type_tag | the expected type tag |
| class_tag | the expected class tag |
Definition at line 614 of file ber_dec.cpp.
References Botan::BER_Object::assert_is_a(), BER_Decoder(), Botan::BER_Object::bits(), Botan::Constructed, get_next_object(), Botan::BER_Object::length(), Botan::Set, and Botan::Universal.
Referenced by decode_list(), start_context_specific(), start_explicit_context_specific(), start_sequence(), and start_set().
|
inline |
Start decoding an IMPLICIT context specific constructed object, returning a decoder for its contents. The returned decoder must be closed with end_cons().
| tag | the expected context specific tag number |
Definition at line 290 of file ber_dec.h.
References BER_Decoder(), Botan::ContextSpecific, and start_cons().
Referenced by Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from(), Botan::OCSP::SingleResponse::decode_from(), Botan::PKCS12::PKCS12(), and Botan::OCSP::Response::Response().
|
inline |
Start decoding an EXPLICIT context specific constructed object, returning a decoder for its contents. The returned decoder must be closed with end_cons().
| tag | the expected context specific tag number |
Definition at line 301 of file ber_dec.h.
References BER_Decoder(), Botan::ExplicitContextSpecific, and start_cons().
|
inline |
Start decoding a SEQUENCE, returning a decoder for its contents. The returned decoder must be closed with end_cons().
Definition at line 275 of file ber_dec.h.
References BER_Decoder(), Botan::Sequence, start_cons(), and Botan::Universal.
Referenced by Botan::AlgorithmIdentifier::decode_from(), Botan::AlternativeName::decode_from(), Botan::Attribute::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdOrRange::decode_from(), Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressFamily::decode_from(), Botan::Cert_Extension::IPAddressBlocks::IPAddressOrRange< V >::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::CRL_Entry::decode_from(), Botan::Extensions::decode_from(), Botan::GeneralSubtree::decode_from(), Botan::OCSP::CertID::decode_from(), Botan::OCSP::SingleResponse::decode_from(), Botan::X509_DN::decode_from(), Botan::X509_Object::decode_from(), Botan::EC_PrivateKey::EC_PrivateKey(), Botan::X509::load_key(), Botan::McEliece_PrivateKey::McEliece_PrivateKey(), Botan::McEliece_PublicKey::McEliece_PublicKey(), Botan::pbes2_decrypt(), Botan::PKCS12::PKCS12(), Botan::pkcs12_pbe_decrypt(), Botan::OCSP::Response::Response(), Botan::RSA_PrivateKey::RSA_PrivateKey(), Botan::RSA_PublicKey::RSA_PublicKey(), and Botan::TLS::Session::Session().
|
inline |
Start decoding a SET, returning a decoder for its contents. The returned decoder must be closed with end_cons().
Definition at line 281 of file ber_dec.h.
References BER_Decoder(), Botan::Set, start_cons(), and Botan::Universal.
Referenced by Botan::Attribute::decode_from(), and Botan::X509_DN::decode_from().
| BER_Decoder & Botan::BER_Decoder::verify_end | ( | ) |
Verify the stream is concluded, throws otherwise. Returns (*this)
Definition at line 471 of file ber_dec.cpp.
References BER_Decoder(), and verify_end().
Referenced by Botan::AlternativeName::decode_from(), Botan::Cert_Extension::ASBlocks::ASIdentifiers::decode_from(), Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from(), Botan::Cert_Extension::TNAuthList::Entry::decode_from(), Botan::Extensions::decode_from(), Botan::GeneralName::decode_from(), Botan::OCSP::SingleResponse::decode_from(), Botan::Ed448_PrivateKey::Ed448_PrivateKey(), Botan::GOST_3410_PublicKey::GOST_3410_PublicKey(), Botan::X509::load_key(), Botan::McEliece_PrivateKey::McEliece_PrivateKey(), Botan::McEliece_PublicKey::McEliece_PublicKey(), Botan::pbes2_decrypt(), Botan::PKCS12::PKCS12(), Botan::pkcs12_pbe_decrypt(), Botan::PSS_Params::PSS_Params(), Botan::OCSP::Response::Response(), Botan::RSA_PublicKey::RSA_PublicKey(), and verify_end().
| BER_Decoder & Botan::BER_Decoder::verify_end | ( | std::string_view | err_msg | ) |
Verify the stream is concluded, throws otherwise. Returns (*this)
Definition at line 478 of file ber_dec.cpp.
References BER_Decoder().