aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/tests.h
Commit message (Collapse)AuthorAgeFilesLines
* Add proper SRP6 testsJack Lloyd2019-04-301-1/+1
| | | | Fixes GH #1917
* Using preprocessor for the testsDavid Carlier2019-04-121-15/+2
|
* Clean up test registration a bitJack Lloyd2019-02-051-24/+21
|
* Add a simple Thread_Pool testJack Lloyd2019-01-311-0/+32
| | | | And allow registering one-off functions as tests
* Run the test suite in multiple threadsJack Lloyd2019-01-311-9/+22
| | | | Refactor areas where data was being shared
* Add ability to skip a few named testsJack Lloyd2018-12-311-1/+8
| | | | This is sometimes useful when debugging
* Fix more MSVC warningsJack Lloyd2018-12-041-0/+4
|
* Make exceptions easier to translate to error codesJack Lloyd2018-11-231-0/+1
| | | | | | | | | | | Avoid throwing base Botan::Exception type, as it is difficult to determine what the error is in that case. Add Exception::error_code and Exception::error_type which allows (for error code) more information about the error and (for error type) allows knowing the error type without requiring a sequence of catches. See GH #1742
* Add VarMap::get_opt_u64Jack Lloyd2018-11-041-0/+2
|
* Correct testJack Lloyd2018-11-021-0/+1
| | | | This was trying to test for issue in #1723 but was incorrect.
* Add VarMap::get_req_bin_listJack Lloyd2018-10-291-0/+2
|
* Make the tests VarMap an actual type instead of a hashmap typedef.Jack Lloyd2018-05-291-20/+38
|
* Fix the botan-test --verbose flag, which did nothingJack Lloyd2018-04-111-14/+18
| | | | It used to do something, then I broke it.
* Move mkstemp to Test::temp_file_nameJack Lloyd2018-04-111-0/+2
|
* Avoid a warning when building under Clang [ci skip]Jack Lloyd2018-04-071-0/+1
|
* Moves UBSAN macros from test files to Test_OptionsMatthias Gierlings2018-04-071-1/+8
| | | | | | | | | | | | To keep the code more readable change the behavior of `Test_Options::no_avoid_undefined_behavior()`, instead of the conditionals inside the tests. `Test_Options::no_avoid_undefined_behavior()` will always return `true` if UBSAN is inactive. This way all tests, including those that cause undefined behaviour, will run. Once botan is compiled with UBSAN those tests will be automatically skipped unless the `--no-avoid-undefined` is passed to the test-bench.
* Make tests pass by default in UBSAN modeMatthias Gierlings2018-04-061-5/+5
| | | | | | | | - Adds macros to check if botan was compiled with a certain sanitizers. - Automatically excludes the tests that are intended to provoke undefined behaviour from the test bench, when botan is compiled with UBSAN. - Changes option `--avoid-undefined` to `--no-avoid-undefined` so the failing tests can be explicitly activated when needed.
* Add Test_Options classJack Lloyd2018-04-021-26/+70
|
* Add --avoid-undefined optionJack Lloyd2018-03-311-0/+3
| | | | GH #1518
* Add new test option --abort-on-first-failJack Lloyd2018-03-281-1/+5
| | | | | Calls std::abort the first time a test fails. Not for general consumption but sometimes very useful when tracking down a tricky bug.
* Add test for non-null pointerJack Lloyd2018-01-301-0/+9
|
* Remove BOTAN_FORCE_SEMICOLON macroJack Lloyd2017-12-301-2/+1
| | | | | | Only needed in two headers (cli.h and test.h) not in the main library. Just change those two uses to not use anonymous namespaces.
* Move utils for reading test data files up to Test:: from OCSPJack Lloyd2017-12-291-0/+3
|
* Use a simple PRNG for the testsJack Lloyd2017-10-291-9/+11
| | | | | | | | | | | Not cryptographically secure, but fast! Cuts several seconds off the test suite even on a very fast machine. Probably even more effective for 32-bit systems since the default for HMAC_DRBG is SHA-384. Also it means deterministic tests are used regardless of build configuration which is nice. Improve output for --test-runs which was useful for me when debugging SM2 encryption issue.
* Inline Test::run_test into only callerJack Lloyd2017-10-241-3/+1
|
* Avoid empty methods, use =default or add a commentJack Lloyd2017-10-031-1/+0
| | | | Sonar
* Further header cleanupsJack Lloyd2017-09-281-11/+14
|
* Additional finalsJack Lloyd2017-09-221-3/+3
|
* Add final annotations as appropriate in the test codeJack Lloyd2017-09-221-1/+1
|
* Remove some using declarations in test codeJack Lloyd2017-09-221-3/+3
|
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add basic tests for const time utilsJack Lloyd2017-09-191-0/+1
| | | | Remove CT::min and CT::max which were unused and it turns out, broken.
* Merge GH #1035 Support generating RSA keys with OpenSSLJack Lloyd2017-05-031-1/+1
|\
| * Generate private RSA key with OpenSSL.Alexander Bluhm2017-04-301-1/+1
| | | | | | | | | | Implement RSA private key generation with RSA_generate_key_ex(). Make PK_Key_Generation_Test iterate over all providers.
* | Reformat code with astyle + fix code styleTomasz Frydrych2017-05-011-13/+37
|/
* Filter provider in test loops, skip text based without provider.Alexander Bluhm2017-04-211-1/+1
| | | | | | | | The tests for block, hash, stream, pubkey, and mac loop over all possible crypto providers. If a specific provider is given on the botan-test command line, use only this one. If the provider to be tested is restricted, skip text based tests that do not have a possible provider.
* Run tests for a specific provider.Alexander Bluhm2017-04-211-0/+13
| | | | | | | | Currently botan runs the tests for all crypto providers it can find. Add a --provider option for botan-test to specify exactly one provider. This allows to see which parts of a specific implementation have been tested. Pass down the given provider to a specific test class.
* Content:Tomasz Frydrych2017-04-031-2/+2
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Fix botan-test verbose modeRené Korthaus2017-02-141-1/+1
|
* Add support for NEON in SIMD_4x32Jack Lloyd2017-01-291-0/+6
| | | | Tested on qemu-aarch64
* Add positive DH test vectors from NIST CAVPRené Korthaus2017-01-021-0/+1
|
* Improve filter testsJack Lloyd2016-12-311-1/+1
| | | | | | | Fix a bug in Pipe::check_available that must date back 15 years... Add destructors to compression filter so unique_ptr destructor runs without user having to include an extra header for the owned type.
* Missing addJack Lloyd2016-12-311-0/+1
|
* Add test option --run-long-testsJack Lloyd2016-12-241-5/+10
| | | | | | Previously longer tests were hidden behind higher 'soak levels' but these arbitrary cutoffs are confusing compared to a simple short tests/long tests split.
* Minor refactoring of Text_Based_TestJack Lloyd2016-12-191-10/+2
| | | | | | Turns out astyle has some bugs wrt C++11 initialize lists. Rather than having astyle mangle all of the tests, convert to using a string which is split once at the start instead of a vector of keys.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-4/+2
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Fix off by one in PKCS #1 v1.5 decryption decodingJack Lloyd2016-12-081-0/+2
| | | | | | | | | | | | When the code was changed in b8966d0f89e, the offset was not changed, so it would reject ciphertexts with exactly 8 bytes of random padding (the required minimum). Found by pkcs1 fuzzer which also had problems due to not having been updated at the same time. Add a test suite for decoding of PK decryption padding to cover the problem cases.
* Add test for various functions previously missed (T::clone, PBKDF::name, ↵Jack Lloyd2016-11-261-0/+2
| | | | | | | AEAD::output_length) Fix a bug in CCM, GCM, and OCB decryption which caused `output_length(tag_size())` to fail even though empty plaintexts are certainly defined for all three modes.
* Better OCSP tests including online testsJack Lloyd2016-11-231-1/+3
| | | | Tests touching network are gated by --run-online-tests flag.
* This range check was in the wrong directionJack Lloyd2016-11-171-1/+1
|