|
Botan 3.13.0
Crypto and TLS for C&
|
#include <ber_dec.h>
Public Member Functions | |
| bool | allow_ber_encoding () const |
| bool | allow_standalone_eoc () const |
| size_t | max_nested_indefinite_length () const |
| std::optional< size_t > | max_object_size () const |
| bool | operator== (const Limits &) const =default |
| bool | reject_default_value_encoding () const |
| bool | require_der_encoding () const |
| Limits | with_default_value_encoding_rejected () const |
| Limits | with_max_object_size (std::optional< size_t > max_object_size) const |
| Limits | with_standalone_eoc_allowed () const |
Static Public Member Functions | |
| static Limits | BER (size_t max_nested_indef=16) |
| static Limits | DER () |
Static Public Attributes | |
| static constexpr size_t | DefaultMaxObjectSize = 128 * 1024 * 1024 |
|
inline |
If true, non-canonical BER encodings are accepted
Definition at line 56 of file ber_dec.h.
Referenced by require_der_encoding().
|
inline |
If true, a standalone EOC marker (one that does not terminate an indefinite-length encoding) is skipped rather than rejected. Some BER producers emit trailing EOC markers; accepting them is needed to parse such data (eg CMS signatures in PDFs). Off by default.
Definition at line 74 of file ber_dec.h.
Referenced by operator==().
|
inlinestatic |
Accept non-canonical BER encodings.
| max_nested_indef | maximum number of nested indefinite-length encodings accepted |
Definition at line 49 of file ber_dec.h.
References DefaultMaxObjectSize.
Referenced by Botan::BER_Decoder::BER_Decoder(), and Botan::ASN1_Formatter::print_to_stream().
|
inlinestatic |
Accept only DER encodings
Definition at line 42 of file ber_dec.h.
References DefaultMaxObjectSize.
Referenced by Botan::Certificate_Store_In_SQL::all_subjects(), Botan::TLS::Certificate_Authorities::Certificate_Authorities(), Botan::TLS::Certificate_Request_12::Certificate_Request_12(), Botan::OCSP::SingleResponse::decode_from(), Botan::EC_PrivateKey::EC_PrivateKey(), Botan::Ed25519_PrivateKey::Ed25519_PrivateKey(), Botan::Ed448_PrivateKey::Ed448_PrivateKey(), Botan::GOST_3410_PublicKey::GOST_3410_PublicKey(), Botan::X509_Object::load_data(), Botan::X509::load_key(), Botan::McEliece_PrivateKey::McEliece_PrivateKey(), Botan::McEliece_PublicKey::McEliece_PublicKey(), Botan::pbes2_decrypt(), Botan::ASN1_Formatter::print_to_stream(), Botan::PSS_Params::PSS_Params(), Botan::OCSP::Response::Response(), Botan::RSA_PrivateKey::RSA_PrivateKey(), Botan::RSA_PublicKey::RSA_PublicKey(), Botan::TLS::Session::Session(), and Botan::X25519_PrivateKey::X25519_PrivateKey().
|
inline |
|
inline |
The maximum size in bytes of a single decoded object, or nullopt if no object size limit is enforced.
Definition at line 80 of file ber_dec.h.
Referenced by operator==(), and with_max_object_size().
|
default |
Compare two sets of limits for equality
References allow_standalone_eoc(), max_object_size(), and reject_default_value_encoding().
|
inline |
If true, a DER component that is explicitly encoded with a value equal to its DEFAULT is rejected (such components must be omitted in DER). Only applies in DER mode and only to fields decoded via decode_default(). Off by default, since Botan and many other implementations emit such components. See decode_default().
Definition at line 89 of file ber_dec.h.
Referenced by operator==().
|
inline |
If true, only DER encodings are accepted
Definition at line 61 of file ber_dec.h.
References allow_ber_encoding().
|
inline |
Return a copy of these limits that rejects DER components encoded equal to their DEFAULT value. See reject_default_value_encoding().
Definition at line 116 of file ber_dec.h.
|
inline |
Return a copy of these limits with the given maximum object size. A value of nullopt disables the object size limit. See max_object_size().
Definition at line 106 of file ber_dec.h.
References max_object_size().
|
inline |
Return a copy of these limits that tolerates standalone EOC markers. See allow_standalone_eoc().
Definition at line 95 of file ber_dec.h.
Referenced by Botan::ASN1_Formatter::print_to_stream().
|
staticconstexpr |