Botan 3.12.0
Crypto and TLS for C&
Botan::BER_Decoder::Limits Class Referencefinal

#include <ber_dec.h>

Public Member Functions

bool allow_ber_encoding () const
size_t max_nested_indefinite_length () const
bool operator== (const Limits &) const =default
bool require_der_encoding () const

Static Public Member Functions

static Limits BER (size_t max_nested_indef=16)
static Limits DER ()

Detailed Description

Controls what encoding rules the decoder accepts.

Definition at line 30 of file ber_dec.h.

Member Function Documentation

◆ allow_ber_encoding()

bool Botan::BER_Decoder::Limits::allow_ber_encoding ( ) const
inline

Definition at line 44 of file ber_dec.h.

44{ return m_allow_ber; }

Referenced by require_der_encoding().

◆ BER()

Limits Botan::BER_Decoder::Limits::BER ( size_t max_nested_indef = 16)
inlinestatic

Accept non-canonical BER encodings.

Parameters
max_nested_indefmaximum number of nested indefinite-length encodings accepted

Definition at line 42 of file ber_dec.h.

42{ return Limits(true, max_nested_indef); }

Referenced by Botan::BER_Decoder::BER_Decoder(), and Botan::ASN1_Formatter::print_to_stream().

◆ DER()

◆ max_nested_indefinite_length()

size_t Botan::BER_Decoder::Limits::max_nested_indefinite_length ( ) const
inline

Definition at line 48 of file ber_dec.h.

48{ return m_max_nested_indef; }

◆ operator==()

bool Botan::BER_Decoder::Limits::operator== ( const Limits & ) const
default

◆ require_der_encoding()

bool Botan::BER_Decoder::Limits::require_der_encoding ( ) const
inline

Definition at line 46 of file ber_dec.h.

46{ return !allow_ber_encoding(); }
bool allow_ber_encoding() const
Definition ber_dec.h:44

References allow_ber_encoding().


The documentation for this class was generated from the following file: