Botan
2.19.1
Crypto and TLS for C++11
|
#include <botan/build.h>
#include <botan/compiler.h>
Go to the source code of this file.
Namespaces | |
Botan | |
Macros | |
#define | _BOTAN_UNUSED_GET_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, _9, IMPL_NAME, ...) IMPL_NAME |
#define | _BOTAN_UNUSED_IMPL1(a) static_cast<void>(a) |
#define | _BOTAN_UNUSED_IMPL2(a, b) static_cast<void>(a); _BOTAN_UNUSED_IMPL1(b) |
#define | _BOTAN_UNUSED_IMPL3(a, b, c) static_cast<void>(a); _BOTAN_UNUSED_IMPL2(b, c) |
#define | _BOTAN_UNUSED_IMPL4(a, b, c, d) static_cast<void>(a); _BOTAN_UNUSED_IMPL3(b, c, d) |
#define | _BOTAN_UNUSED_IMPL5(a, b, c, d, e) static_cast<void>(a); _BOTAN_UNUSED_IMPL4(b, c, d, e) |
#define | _BOTAN_UNUSED_IMPL6(a, b, c, d, e, f) static_cast<void>(a); _BOTAN_UNUSED_IMPL5(b, c, d, e, f) |
#define | _BOTAN_UNUSED_IMPL7(a, b, c, d, e, f, g) static_cast<void>(a); _BOTAN_UNUSED_IMPL6(b, c, d, e, f, g) |
#define | _BOTAN_UNUSED_IMPL8(a, b, c, d, e, f, g, h) static_cast<void>(a); _BOTAN_UNUSED_IMPL7(b, c, d, e, f, g, h) |
#define | _BOTAN_UNUSED_IMPL9(a, b, c, d, e, f, g, h, i) static_cast<void>(a); _BOTAN_UNUSED_IMPL8(b, c, d, e, f, g, h, i) |
#define | BOTAN_ARG_CHECK(expr, msg) do { if(!(expr)) Botan::throw_invalid_argument(msg, __func__, __FILE__); } while(0) |
#define | BOTAN_ASSERT(expr, assertion_made) |
#define | BOTAN_ASSERT_EQUAL(expr1, expr2, assertion_made) |
#define | BOTAN_ASSERT_IMPLICATION(expr1, expr2, msg) |
#define | BOTAN_ASSERT_NOMSG(expr) |
#define | BOTAN_ASSERT_NONNULL(ptr) |
#define | BOTAN_DEBUG_ASSERT(expr) do {} while(0) |
#define | BOTAN_STATE_CHECK(expr) do { if(!(expr)) Botan::throw_invalid_state(#expr, __func__, __FILE__); } while(0) |
#define | BOTAN_UNUSED(...) |
Functions | |
void | Botan::assertion_failure (const char *expr_str, const char *assertion_made, const char *func, const char *file, int line) |
void | Botan::throw_invalid_argument (const char *message, const char *func, const char *file) |
void | Botan::throw_invalid_state (const char *expr, const char *func, const char *file) |
#define _BOTAN_UNUSED_GET_IMPL | ( | _1, | |
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7, | |||
_8, | |||
_9, | |||
IMPL_NAME, | |||
... | |||
) | IMPL_NAME |
#define _BOTAN_UNUSED_IMPL1 | ( | a | ) | static_cast<void>(a) |
Mark variable as unused. Takes between 1 and 9 arguments and marks all as unused, e.g. BOTAN_UNUSED(a); or BOTAN_UNUSED(x, y, z);
#define _BOTAN_UNUSED_IMPL2 | ( | a, | |
b | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL1(b) |
#define _BOTAN_UNUSED_IMPL3 | ( | a, | |
b, | |||
c | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL2(b, c) |
#define _BOTAN_UNUSED_IMPL4 | ( | a, | |
b, | |||
c, | |||
d | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL3(b, c, d) |
#define _BOTAN_UNUSED_IMPL5 | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL4(b, c, d, e) |
#define _BOTAN_UNUSED_IMPL6 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL5(b, c, d, e, f) |
#define _BOTAN_UNUSED_IMPL7 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL6(b, c, d, e, f, g) |
#define _BOTAN_UNUSED_IMPL8 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL7(b, c, d, e, f, g, h) |
#define _BOTAN_UNUSED_IMPL9 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i | |||
) | static_cast<void>(a); _BOTAN_UNUSED_IMPL8(b, c, d, e, f, g, h, i) |
#define BOTAN_ARG_CHECK | ( | expr, | |
msg | |||
) | do { if(!(expr)) Botan::throw_invalid_argument(msg, __func__, __FILE__); } while(0) |
Definition at line 37 of file assert.h.
Referenced by Botan::argon2(), Botan::bcrypt_pbkdf(), Botan::bigint_monty_redc(), Botan::ChaCha::ChaCha(), Botan::CTR_BE::CTR_BE(), Botan::ASN1_Time::encode_into(), Botan::SHA_3::expand(), Botan::GHASH::final(), Botan::SHA_3::finish(), Botan::GCM_Encryption::finish(), Botan::CCM_Encryption::finish(), Botan::GCM_Decryption::finish(), Botan::CCM_Decryption::finish(), Botan::generate_passhash9(), Botan::hkdf_expand_label(), Botan::HMAC::HMAC(), Botan::HOTP::HOTP(), Botan::BigInt::mod_add(), Botan::BigInt::mod_mul(), Botan::OCB_Mode::OCB_Mode(), Botan::operator*(), Botan::GCM_Encryption::process(), Botan::GCM_Decryption::process(), Botan::rfc3394_keyunwrap(), Botan::rfc3394_keywrap(), Botan::round_up(), Botan::Blowfish::salted_set_key(), Botan::CCM_Mode::set_associated_data(), Botan::Threefish_512::set_tweak(), Botan::GHASH::start(), and Botan::TOTP::TOTP().
#define BOTAN_ASSERT | ( | expr, | |
assertion_made | |||
) |
Make an assertion
Definition at line 55 of file assert.h.
Referenced by Botan::Output_Buffers::add(), Botan::TLS::TLS_CBC_HMAC_AEAD_Mode::assoc_data_with_len(), Botan::bigint_add2_nc(), Botan::bigint_cnd_add(), Botan::bigint_cnd_sub(), Botan::bigint_sqr(), Botan::bigint_sub2(), Botan::bigint_sub2_rev(), Botan::bigint_sub3(), botan_cipher_update(), Botan::Cascade_Cipher::Cascade_Cipher(), Botan::TLS::Channel::change_cipher_spec_reader(), Botan::TLS::Channel::change_cipher_spec_writer(), Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::BigInt::const_time_lookup(), Botan::PK_Decryptor::decrypt_or_random(), Botan::EC_PrivateKey::EC_PrivateKey(), Botan::polyn_gf2m::eea_with_coefficients(), Botan::OID::encode_into(), Botan::XTS_Encryption::finish(), Botan::CBC_Encryption::finish(), Botan::XTS_Decryption::finish(), Botan::SIV_Encryption::finish(), Botan::ChaCha20Poly1305_Decryption::finish(), Botan::CTS_Encryption::finish(), Botan::OCB_Encryption::finish(), Botan::EAX_Decryption::finish(), Botan::SIV_Decryption::finish(), Botan::CCM_Decryption::finish(), Botan::CBC_Decryption::finish(), Botan::OCB_Decryption::finish(), Botan::CTS_Decryption::finish(), Botan::Stream_Compression::finish(), Botan::XMSS_WOTS_PrivateKey::generate_public_key(), Botan::XMSS_Address::get_chain_address(), Botan::XMSS_Address::get_hash_address(), Botan::XMSS_Address::get_ltree_address(), Botan::XMSS_Address::get_ots_address(), Botan::XMSS_Address::get_tree_height(), Botan::XMSS_Address::get_tree_index(), Botan::GOST_3410_PublicKey::GOST_3410_PublicKey(), Botan::SP800_108_Counter::kdf(), Botan::SP800_108_Feedback::kdf(), Botan::SP800_108_Pipeline::kdf(), Botan::mceies_encrypt(), Botan::PointGFp_Base_Point_Precompute::mul(), Botan::TLS::Datagram_Sequence_Numbers::next_write_sequence(), Botan::GHASH::nonce_hash(), Botan::ChaCha20Poly1305_Decryption::output_length(), Botan::GCM_Decryption::output_length(), Botan::EAX_Decryption::output_length(), Botan::SIV_Decryption::output_length(), Botan::CCM_Decryption::output_length(), Botan::OCB_Decryption::output_length(), Botan::XTS_Encryption::process(), Botan::CBC_Encryption::process(), Botan::XTS_Decryption::process(), Botan::OCB_Encryption::process(), Botan::CBC_Decryption::process(), Botan::OCB_Decryption::process(), Botan::XMSS_Common_Ops::randomize_tree_hash(), Botan::TLS::Channel::received_data(), Botan::redc_p192(), Botan::redc_p224(), Botan::redc_p256(), Botan::redc_p384(), Botan::Stateful_RNG::reseed_check(), Botan::TLS::Signature_Algorithms::serialize(), Botan::TLS::Server_Key_Exchange::Server_Key_Exchange(), Botan::XMSS_Address::set_chain_address(), Botan::XMSS_Address::set_hash_address(), Botan::XMSS_Address::set_key_mask_mode(), Botan::XMSS_Address::set_layer_addr(), Botan::XMSS_Address::set_ltree_address(), Botan::XMSS_Address::set_ots_address(), Botan::XMSS_Address::set_tree_addr(), Botan::XMSS_Address::set_tree_height(), Botan::XMSS_Address::set_tree_index(), Botan::TLS::Compat_Callbacks::tls_alert(), Botan::TLS::Compat_Callbacks::tls_emit_data(), Botan::TLS::Compat_Callbacks::tls_record_received(), Botan::TLS::Compat_Callbacks::tls_session_established(), Botan::XMSS_PrivateKey::tree_hash(), Botan::Cipher_Mode::update(), Botan::Stream_Compression::update(), Botan::TLS::write_record(), Botan::XMSS_Address::XMSS_Address(), Botan::XMSS_Hash::XMSS_Hash(), and Botan::XMSS_WOTS_Parameters::XMSS_WOTS_Parameters().
#define BOTAN_ASSERT_EQUAL | ( | expr1, | |
expr2, | |||
assertion_made | |||
) |
Assert that value1 == value2
Definition at line 81 of file assert.h.
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::base_encode_to_string(), Botan::CBC_Encryption::finish(), Botan::ASN1::maybe_BER(), Botan::PBKDF::pbkdf_iterations(), and Botan::redc_p521().
#define BOTAN_ASSERT_IMPLICATION | ( | expr1, | |
expr2, | |||
msg | |||
) |
Assert that expr1 (if true) implies expr2 is also true
Definition at line 94 of file assert.h.
Referenced by Botan::copy_mem(), Botan::TLS::Blocking_Client::read(), and Botan::TLS::Channel::received_data().
#define BOTAN_ASSERT_NOMSG | ( | expr | ) |
Make an assertion
Definition at line 68 of file assert.h.
Referenced by Botan::PointGFp::add(), Botan::PointGFp::add_affine(), Botan::TLS::Connection_Cipher_State::aead_nonce(), Botan::Memory_Pool::allocate(), Botan::buffer_insert(), Botan::PK_Verifier::check_signature(), Botan::TLS::Connection_Cipher_State::Connection_Cipher_State(), Botan::X509::create_self_signed_cert(), Botan::ZFEC::decode_shares(), Botan::CCM_Mode::encode_length(), Botan::TLS::Session::encrypt(), Botan::EAX_Encryption::finish(), Botan::TLS::TLS_CBC_HMAC_AEAD_Decryption::finish(), Botan::gcd(), Botan::inverse_mod(), Botan::is_miller_rabin_probable_prime(), Botan::Montgomery_Int::Montgomery_Int(), Botan::operator<(), Botan::passes_miller_rabin_test(), Botan::pbkdf2(), Botan::redc_p192(), Botan::redc_p224(), Botan::redc_p256(), Botan::redc_p384(), Botan::TLS::Channel::reset_active_association_state(), Botan::Salsa20::salsa_core(), Botan::Filter::send(), Botan::TLS::Record_Header::sequence(), Botan::TLS::Supported_Versions::serialize(), Botan::XMSS_PrivateKey::tree_hash(), Botan::TLS::Record_Header::type(), Botan::vartime_divide(), Botan::TLS::Record_Header::version(), and Botan::MDx_HashFunction::write_count().
#define BOTAN_ASSERT_NONNULL | ( | ptr | ) |
Assert that a pointer is not null
Definition at line 107 of file assert.h.
Referenced by Botan::TLS::Connection_Cipher_State::aead(), Botan::TLS::Certificate_Verify::Certificate_Verify(), Botan::PKIX::check_crl(), Botan::DLIES_Decryptor::DLIES_Decryptor(), Botan::DLIES_Encryptor::DLIES_Encryptor(), Botan::HMAC_DRBG::HMAC_DRBG(), Botan::TLS::TLS_CBC_HMAC_AEAD_Mode::mac(), Botan::CBC_Mode::padding(), and Botan::TLS::Server_Key_Exchange::server_kex_key().
#define BOTAN_DEBUG_ASSERT | ( | expr | ) | do {} while(0) |
Definition at line 123 of file assert.h.
Referenced by Botan::PointGFp::add_affine(), Botan::PKCS7_Padding::add_padding(), Botan::ANSI_X923_Padding::add_padding(), Botan::OneAndZeros_Padding::add_padding(), Botan::ESP_Padding::add_padding(), Botan::bigint_cmp(), Botan::bigint_mod_sub(), Botan::bigint_mod_sub_n(), Botan::CurveGFp_Repr::curve_mul(), Botan::CurveGFp_Repr::curve_sqr(), Botan::TLS::TLS_CBC_HMAC_AEAD_Encryption::finish(), Botan::BigInt::mod_add(), Botan::BigInt::mod_mul(), Botan::BigInt::mod_sub(), Botan::PointGFp_Base_Point_Precompute::mul(), Botan::PointGFp_Var_Point_Precompute::mul(), Botan::Montgomery_Params::mul(), Botan::Montgomery_Params::mul_by(), Botan::operator*(), Botan::operator<(), Botan::redc_p192(), Botan::redc_p224(), Botan::redc_p256(), Botan::redc_p384(), Botan::Montgomery_Params::sqr(), Botan::Montgomery_Params::square_this(), and Botan::vartime_divide().
#define BOTAN_STATE_CHECK | ( | expr | ) | do { if(!(expr)) Botan::throw_invalid_state(#expr, __func__, __FILE__); } while(0) |
Definition at line 49 of file assert.h.
Referenced by Botan::CBC_Encryption::finish(), Botan::CTS_Encryption::finish(), Botan::CBC_Decryption::finish(), Botan::CTS_Decryption::finish(), Botan::CCM_Mode::process(), Botan::XTS_Encryption::process(), Botan::CFB_Encryption::process(), Botan::CBC_Encryption::process(), Botan::EAX_Encryption::process(), Botan::XTS_Decryption::process(), Botan::CFB_Decryption::process(), Botan::EAX_Decryption::process(), and Botan::CBC_Decryption::process().
#define BOTAN_UNUSED | ( | ... | ) |
Definition at line 142 of file assert.h.
Referenced by Botan::OS::allocate_locked_pages(), Botan::PKCS8::BER_encode(), Botan::PKCS8::BER_encode_encrypted_pbkdf_iter(), Botan::PKCS8::BER_encode_encrypted_pbkdf_msec(), Botan::bigint_mod_sub(), Botan::bigint_mod_sub_n(), Botan::CPUID::bit_from_string(), Botan::Blinded_Point_Multiply::Blinded_Point_Multiply(), botan_hotp_check(), botan_hotp_destroy(), botan_hotp_generate(), botan_hotp_init(), botan_privkey_create_dsa(), botan_privkey_create_elgamal(), botan_privkey_ed25519_get_privkey(), botan_privkey_load(), botan_privkey_load_dh(), botan_privkey_load_dsa(), botan_privkey_load_ecdh(), botan_privkey_load_ecdsa(), botan_privkey_load_ed25519(), botan_privkey_load_elgamal(), botan_privkey_load_rsa(), botan_privkey_load_rsa_pkcs1(), botan_privkey_load_sm2(), botan_privkey_load_x25519(), botan_privkey_rsa_get_privkey(), botan_privkey_x25519_get_privkey(), botan_pubkey_ed25519_get_pubkey(), botan_pubkey_load_dh(), botan_pubkey_load_dsa(), botan_pubkey_load_ecdh(), botan_pubkey_load_ecdsa(), botan_pubkey_load_ed25519(), botan_pubkey_load_elgamal(), botan_pubkey_load_rsa(), botan_pubkey_load_sm2(), botan_pubkey_load_x25519(), botan_pubkey_x25519_get_pubkey(), botan_totp_check(), botan_totp_destroy(), botan_totp_generate(), botan_totp_init(), botan_x509_cert_allowed_usage(), botan_x509_cert_destroy(), botan_x509_cert_dup(), botan_x509_cert_get_authority_key_id(), botan_x509_cert_get_fingerprint(), botan_x509_cert_get_issuer_dn(), botan_x509_cert_get_public_key(), botan_x509_cert_get_public_key_bits(), botan_x509_cert_get_serial_number(), botan_x509_cert_get_subject_dn(), botan_x509_cert_get_subject_key_id(), botan_x509_cert_get_time_expires(), botan_x509_cert_get_time_starts(), botan_x509_cert_hostname_match(), botan_x509_cert_load(), botan_x509_cert_not_after(), botan_x509_cert_not_before(), botan_x509_cert_to_string(), botan_x509_cert_verify(), botan_x509_cert_verify_with_crl(), botan_x509_crl_destroy(), botan_x509_crl_load(), botan_x509_is_revoked(), Botan::TLS::Connection_Cipher_State::Connection_Cipher_State(), Botan::PKCS8::copy_key(), Botan::AEAD_Mode::create(), Botan::BlockCipher::create(), Botan::MessageAuthenticationCode::create(), Botan::KDF::create(), Botan::Entropy_Source::create(), Botan::PBKDF::create(), Botan::StreamCipher::create(), Botan::PasswordHashFamily::create(), Botan::create_private_key(), Botan::Sodium::crypto_aead_chacha20poly1305_decrypt(), Botan::Sodium::crypto_aead_chacha20poly1305_decrypt_detached(), Botan::Sodium::crypto_aead_chacha20poly1305_encrypt(), Botan::Sodium::crypto_aead_chacha20poly1305_encrypt_detached(), Botan::Sodium::crypto_aead_chacha20poly1305_ietf_decrypt(), Botan::Sodium::crypto_aead_chacha20poly1305_ietf_decrypt_detached(), Botan::Sodium::crypto_aead_chacha20poly1305_ietf_encrypt(), Botan::Sodium::crypto_aead_chacha20poly1305_ietf_encrypt_detached(), Botan::Sodium::crypto_aead_xchacha20poly1305_ietf_decrypt(), Botan::Sodium::crypto_aead_xchacha20poly1305_ietf_decrypt_detached(), Botan::Sodium::crypto_aead_xchacha20poly1305_ietf_encrypt(), Botan::Sodium::crypto_aead_xchacha20poly1305_ietf_encrypt_detached(), Botan::Certificate_Store_Windows::find_cert_by_raw_subject_dn_sha256(), Botan::Certificate_Store_MacOS::find_cert_by_raw_subject_dn_sha256(), Botan::Certificate_Store_Windows::find_crl_for(), Botan::Flatfile_Certificate_Store::find_crl_for(), Botan::Certificate_Store_MacOS::find_crl_for(), Botan::OS::get_auxval(), Botan::get_files_recursive(), Botan::SP800_56A_Hash::kdf(), Botan::PKCS8::load_key(), Botan::make_compressor(), Botan::make_decompressor(), Botan::OS::open_socket(), Botan::OS::open_socket_udp(), Botan::OS::page_allow_access(), Botan::OS::page_prohibit_access(), Botan::parse_asn1_oid(), Botan::CT::poison(), Botan::probe_provider_private_key(), Botan::redc_p192(), Botan::redc_p224(), Botan::redc_p256(), Botan::redc_p384(), Botan::OS::run_cpu_instruction_probe(), Botan::TLS::Stream< StreamLayer, ChannelT >::set_verify_callback(), Botan::TLS::Stream< StreamLayer, ChannelT >::set_verify_depth(), Botan::TLS::Stream< StreamLayer, ChannelT >::set_verify_mode(), Botan::MessageAuthenticationCode::start_msg(), Botan::OS::system_page_size(), Botan::TLS::Callbacks::tls_log_debug(), Botan::TLS::Callbacks::tls_log_debug_bin(), Botan::TLS::Callbacks::tls_log_error(), Botan::TLS::Callbacks::tls_provide_cert_status(), Botan::Scrypt_Family::tune(), Botan::CT::unpoison(), Botan::TLS::Certificate_Verify::verify(), and Botan::TLS::Server_Key_Exchange::verify().