diff options
author | lloyd <[email protected]> | 2013-03-13 14:33:04 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-03-13 14:33:04 +0000 |
commit | 35c5cbed2ebe0eb72e2ff665b78a9027d17c19ec (patch) | |
tree | 46b89bdc0bb85231b0dd465e5a208615d1503ce7 /src | |
parent | 33c0c05989f9c024ab46d176c2cc1177c3c9d6ec (diff) |
Move assert.h from internal to very public (included in types.h)
This reduces friction to writing an assert, so hopefully there will be
more of them as a result. And we can use asserts in public headers
now, very useful for templates.
Diffstat (limited to 'src')
-rw-r--r-- | src/alloc/locking_allocator/locking_allocator.cpp | 1 | ||||
-rw-r--r-- | src/codec/base64/base64.cpp | 1 | ||||
-rw-r--r-- | src/filters/modes/mode_pad/mode_pad.cpp | 1 | ||||
-rw-r--r-- | src/filters/out_buf.cpp | 1 | ||||
-rw-r--r-- | src/kdf/prf_ssl3/prf_ssl3.cpp | 1 | ||||
-rw-r--r-- | src/pbkdf/pbkdf.cpp | 1 | ||||
-rw-r--r-- | src/pubkey/dl_group/dl_group.cpp | 1 | ||||
-rw-r--r-- | src/pubkey/ecc_key/ecc_key.cpp | 1 | ||||
-rw-r--r-- | src/pubkey/ecdh/ecdh.cpp | 1 | ||||
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.cpp | 1 | ||||
-rw-r--r-- | src/pubkey/pubkey.cpp | 1 | ||||
-rw-r--r-- | src/pubkey/rsa/rsa.cpp | 1 | ||||
-rw-r--r-- | src/tls/msg_cert_verify.cpp | 1 | ||||
-rw-r--r-- | src/tls/msg_client_kex.cpp | 1 | ||||
-rw-r--r-- | src/tls/msg_server_kex.cpp | 1 | ||||
-rw-r--r-- | src/tls/tls_blocking.cpp | 1 | ||||
-rw-r--r-- | src/tls/tls_channel.cpp | 1 | ||||
-rw-r--r-- | src/tls/tls_client.cpp | 1 | ||||
-rw-r--r-- | src/tls/tls_handshake_state.cpp | 1 | ||||
-rw-r--r-- | src/tls/tls_record.cpp | 1 | ||||
-rw-r--r-- | src/tls/tls_server.cpp | 1 | ||||
-rw-r--r-- | src/utils/assert.cpp | 1 | ||||
-rw-r--r-- | src/utils/assert.h | 12 | ||||
-rw-r--r-- | src/utils/info.txt | 2 | ||||
-rw-r--r-- | src/utils/sqlite3/sqlite3.cpp | 1 | ||||
-rw-r--r-- | src/utils/types.h | 1 |
26 files changed, 9 insertions, 29 deletions
diff --git a/src/alloc/locking_allocator/locking_allocator.cpp b/src/alloc/locking_allocator/locking_allocator.cpp index d1a1b9c72..5d01eafb1 100644 --- a/src/alloc/locking_allocator/locking_allocator.cpp +++ b/src/alloc/locking_allocator/locking_allocator.cpp @@ -6,7 +6,6 @@ */ #include <botan/locking_allocator.h> -#include <botan/internal/assert.h> #include <botan/mem_ops.h> #include <algorithm> #include <sys/mman.h> diff --git a/src/codec/base64/base64.cpp b/src/codec/base64/base64.cpp index b66c4f207..b66478d2b 100644 --- a/src/codec/base64/base64.cpp +++ b/src/codec/base64/base64.cpp @@ -8,7 +8,6 @@ #include <botan/base64.h> #include <botan/mem_ops.h> #include <botan/internal/rounding.h> -#include <botan/internal/assert.h> #include <stdexcept> namespace Botan { diff --git a/src/filters/modes/mode_pad/mode_pad.cpp b/src/filters/modes/mode_pad/mode_pad.cpp index 03de987e9..728aba540 100644 --- a/src/filters/modes/mode_pad/mode_pad.cpp +++ b/src/filters/modes/mode_pad/mode_pad.cpp @@ -7,7 +7,6 @@ #include <botan/mode_pad.h> #include <botan/exceptn.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/filters/out_buf.cpp b/src/filters/out_buf.cpp index fa94e92e3..323b20e1d 100644 --- a/src/filters/out_buf.cpp +++ b/src/filters/out_buf.cpp @@ -8,7 +8,6 @@ #include <botan/internal/out_buf.h> #include <botan/secqueue.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/kdf/prf_ssl3/prf_ssl3.cpp b/src/kdf/prf_ssl3/prf_ssl3.cpp index 984bd1176..93901416f 100644 --- a/src/kdf/prf_ssl3/prf_ssl3.cpp +++ b/src/kdf/prf_ssl3/prf_ssl3.cpp @@ -10,7 +10,6 @@ #include <botan/exceptn.h> #include <botan/sha160.h> #include <botan/md5.h> -#include <botan/internal/assert.h> #include <memory> namespace Botan { diff --git a/src/pbkdf/pbkdf.cpp b/src/pbkdf/pbkdf.cpp index 95633d3fd..ccd203dbd 100644 --- a/src/pbkdf/pbkdf.cpp +++ b/src/pbkdf/pbkdf.cpp @@ -6,7 +6,6 @@ */ #include <botan/pbkdf.h> -#include <botan/internal/assert.h> #include <stdexcept> namespace Botan { diff --git a/src/pubkey/dl_group/dl_group.cpp b/src/pubkey/dl_group/dl_group.cpp index 837d4ea82..fda86c298 100644 --- a/src/pubkey/dl_group/dl_group.cpp +++ b/src/pubkey/dl_group/dl_group.cpp @@ -14,7 +14,6 @@ #include <botan/pipe.h> #include <botan/pem.h> #include <botan/internal/workfactor.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp index 22bc41249..c9d4d62fe 100644 --- a/src/pubkey/ecc_key/ecc_key.cpp +++ b/src/pubkey/ecc_key/ecc_key.cpp @@ -14,7 +14,6 @@ #include <botan/ber_dec.h> #include <botan/secmem.h> #include <botan/point_gfp.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/pubkey/ecdh/ecdh.cpp b/src/pubkey/ecdh/ecdh.cpp index 5a42f4a49..0f93a0f97 100644 --- a/src/pubkey/ecdh/ecdh.cpp +++ b/src/pubkey/ecdh/ecdh.cpp @@ -8,7 +8,6 @@ */ #include <botan/ecdh.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index 19287d2cf..9a1e6d85b 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -10,7 +10,6 @@ #include <botan/gost_3410.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/pubkey/pubkey.cpp b/src/pubkey/pubkey.cpp index 8430e2c7b..26a144843 100644 --- a/src/pubkey/pubkey.cpp +++ b/src/pubkey/pubkey.cpp @@ -14,7 +14,6 @@ #include <botan/engine.h> #include <botan/lookup.h> #include <botan/internal/bit_ops.h> -#include <botan/internal/assert.h> #include <memory> namespace Botan { diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp index 6719a9960..adb7768b3 100644 --- a/src/pubkey/rsa/rsa.cpp +++ b/src/pubkey/rsa/rsa.cpp @@ -10,7 +10,6 @@ #include <botan/parsing.h> #include <botan/numthry.h> #include <botan/keypair.h> -#include <botan/internal/assert.h> #include <future> namespace Botan { diff --git a/src/tls/msg_cert_verify.cpp b/src/tls/msg_cert_verify.cpp index 8cdadfe7d..436b84c24 100644 --- a/src/tls/msg_cert_verify.cpp +++ b/src/tls/msg_cert_verify.cpp @@ -9,7 +9,6 @@ #include <botan/internal/tls_reader.h> #include <botan/internal/tls_extensions.h> #include <botan/internal/tls_handshake_io.h> -#include <botan/internal/assert.h> #include <memory> namespace Botan { diff --git a/src/tls/msg_client_kex.cpp b/src/tls/msg_client_kex.cpp index 10b439aaf..ae8b82fd4 100644 --- a/src/tls/msg_client_kex.cpp +++ b/src/tls/msg_client_kex.cpp @@ -9,7 +9,6 @@ #include <botan/internal/tls_reader.h> #include <botan/internal/tls_extensions.h> #include <botan/internal/tls_handshake_io.h> -#include <botan/internal/assert.h> #include <botan/credentials_manager.h> #include <botan/pubkey.h> #include <botan/dh.h> diff --git a/src/tls/msg_server_kex.cpp b/src/tls/msg_server_kex.cpp index de50080ec..b8293d3e8 100644 --- a/src/tls/msg_server_kex.cpp +++ b/src/tls/msg_server_kex.cpp @@ -9,7 +9,6 @@ #include <botan/internal/tls_reader.h> #include <botan/internal/tls_extensions.h> #include <botan/internal/tls_handshake_io.h> -#include <botan/internal/assert.h> #include <botan/credentials_manager.h> #include <botan/loadstor.h> #include <botan/pubkey.h> diff --git a/src/tls/tls_blocking.cpp b/src/tls/tls_blocking.cpp index 7b773cd81..aa213518d 100644 --- a/src/tls/tls_blocking.cpp +++ b/src/tls/tls_blocking.cpp @@ -6,7 +6,6 @@ */ #include <botan/tls_blocking.h> -#include <botan/internal/assert.h> namespace Botan { diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp index 18715e61d..f3623cf99 100644 --- a/src/tls/tls_channel.cpp +++ b/src/tls/tls_channel.cpp @@ -11,7 +11,6 @@ #include <botan/internal/tls_heartbeats.h> #include <botan/internal/tls_record.h> #include <botan/internal/tls_seq_numbers.h> -#include <botan/internal/assert.h> #include <botan/internal/rounding.h> #include <botan/internal/stl_util.h> #include <botan/loadstor.h> diff --git a/src/tls/tls_client.cpp b/src/tls/tls_client.cpp index b0724b03c..15e3ab56b 100644 --- a/src/tls/tls_client.cpp +++ b/src/tls/tls_client.cpp @@ -9,7 +9,6 @@ #include <botan/internal/tls_handshake_state.h> #include <botan/internal/tls_messages.h> #include <botan/internal/stl_util.h> -#include <botan/internal/assert.h> #include <memory> namespace Botan { diff --git a/src/tls/tls_handshake_state.cpp b/src/tls/tls_handshake_state.cpp index 8ff0fb585..57078a6d7 100644 --- a/src/tls/tls_handshake_state.cpp +++ b/src/tls/tls_handshake_state.cpp @@ -8,7 +8,6 @@ #include <botan/internal/tls_handshake_state.h> #include <botan/internal/tls_messages.h> #include <botan/internal/tls_record.h> -#include <botan/internal/assert.h> #include <botan/lookup.h> namespace Botan { diff --git a/src/tls/tls_record.cpp b/src/tls/tls_record.cpp index e65aa2322..855eca10f 100644 --- a/src/tls/tls_record.cpp +++ b/src/tls/tls_record.cpp @@ -13,7 +13,6 @@ #include <botan/internal/tls_seq_numbers.h> #include <botan/internal/tls_session_key.h> #include <botan/internal/rounding.h> -#include <botan/internal/assert.h> #include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp index 380d3d5b1..2c393b32d 100644 --- a/src/tls/tls_server.cpp +++ b/src/tls/tls_server.cpp @@ -9,7 +9,6 @@ #include <botan/internal/tls_handshake_state.h> #include <botan/internal/tls_messages.h> #include <botan/internal/stl_util.h> -#include <botan/internal/assert.h> #include <memory> namespace Botan { diff --git a/src/utils/assert.cpp b/src/utils/assert.cpp index 91356f15b..0c6ba38b5 100644 --- a/src/utils/assert.cpp +++ b/src/utils/assert.cpp @@ -5,7 +5,6 @@ * Distributed under the terms of the Botan license */ -#include <botan/internal/assert.h> #include <botan/exceptn.h> #include <sstream> diff --git a/src/utils/assert.h b/src/utils/assert.h index 04b8ce4ed..9265be450 100644 --- a/src/utils/assert.h +++ b/src/utils/assert.h @@ -8,16 +8,18 @@ #ifndef BOTAN_ASSERTION_CHECKING_H__ #define BOTAN_ASSERTION_CHECKING_H__ +#include <botan/build.h> + namespace Botan { /** * Called when an assertion fails */ -void assertion_failure(const char* expr_str, - const char* assertion_made, - const char* func, - const char* file, - int line); +void BOTAN_DLL assertion_failure(const char* expr_str, + const char* assertion_made, + const char* func, + const char* file, + int line); /** * Make an assertion diff --git a/src/utils/info.txt b/src/utils/info.txt index f8202c626..b8e72f42e 100644 --- a/src/utils/info.txt +++ b/src/utils/info.txt @@ -14,7 +14,6 @@ zero_mem.cpp </source> <header:internal> -assert.h bit_ops.h prefetch.h rounding.h @@ -24,6 +23,7 @@ xor_buf.h </header:internal> <header:public> +assert.h bswap.h calendar.h charset.h diff --git a/src/utils/sqlite3/sqlite3.cpp b/src/utils/sqlite3/sqlite3.cpp index 94b55a555..519be9133 100644 --- a/src/utils/sqlite3/sqlite3.cpp +++ b/src/utils/sqlite3/sqlite3.cpp @@ -6,7 +6,6 @@ */ #include <botan/internal/sqlite3.h> -#include <botan/internal/assert.h> #include <stdexcept> #include <sqlite3.h> diff --git a/src/utils/types.h b/src/utils/types.h index 255311580..5d746072c 100644 --- a/src/utils/types.h +++ b/src/utils/types.h @@ -9,6 +9,7 @@ #define BOTAN_TYPES_H__ #include <botan/build.h> +#include <botan/assert.h> #include <stddef.h> /** |