aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* s/as_string/to_string/Jack Lloyd2019-03-011-2/+2
| | | | | A few older APIs use as_string where everywhere else uses to_string. Add to_string's where missing, and deprecate X::as_string.
* Clean up test registration a bitJack Lloyd2019-02-051-0/+10
|
* Run the test suite in multiple threadsJack Lloyd2019-01-311-16/+12
| | | | Refactor areas where data was being shared
* Address a couple of Coverity false positivesJack Lloyd2018-12-191-1/+0
| | | | Add tests for is_power_of_2
* Remove hamming_weight functionJack Lloyd2018-12-061-5/+4
| | | | | Unused outside of the test code and not really useful there either. Header is internal so no API breakage.
* Fix more MSVC warningsJack Lloyd2018-12-041-0/+16
|
* Better debugging output when a test failsJack Lloyd2018-12-021-7/+15
| | | | Printing the output key makes it easier to find the offending test.
* Add VarMap::get_opt_u64Jack Lloyd2018-11-041-8/+23
|
* Correct testJack Lloyd2018-11-021-0/+14
| | | | This was trying to test for issue in #1723 but was incorrect.
* Add VarMap::get_req_bin_listJack Lloyd2018-10-291-2/+28
|
* Improve error message in tests on invalid hex inputJack Lloyd2018-05-311-3/+4
|
* Make the tests VarMap an actual type instead of a hashmap typedef.Jack Lloyd2018-05-291-50/+47
|
* Fix the botan-test --verbose flag, which did nothingJack Lloyd2018-04-111-3/+5
| | | | It used to do something, then I broke it.
* Move mkstemp to Test::temp_file_nameJack Lloyd2018-04-111-0/+32
|
* Add Test_Options classJack Lloyd2018-04-021-78/+17
|
* Add --avoid-undefined optionJack Lloyd2018-03-311-0/+9
| | | | GH #1518
* Add new test option --abort-on-first-failJack Lloyd2018-03-281-0/+8
| | | | | Calls std::abort the first time a test fails. Not for general consumption but sometimes very useful when tracking down a tricky bug.
* Move utils for reading test data files up to Test:: from OCSPJack Lloyd2017-12-291-0/+41
|
* Use a simple PRNG for the testsJack Lloyd2017-10-291-10/+14
| | | | | | | | | | | 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-38/+0
|
* Restart state in Text_Based_Test after test is overJack Lloyd2017-10-061-0/+2
| | | | This allows --test-runs= to work as expected
* Further header cleanupsJack Lloyd2017-09-281-0/+9
|
* Remove some using declarations in test codeJack Lloyd2017-09-221-1/+3
|
* Header file cleanupsJack Lloyd2017-09-211-0/+1
| | | | Some help from include-what-you-use
* Merge GH #1212 Add support for 'raw' PSS signaturesJack Lloyd2017-09-201-4/+4
|\
| * Support PSSR_RawJack Lloyd2017-09-161-4/+4
| | | | | | | | | | | | | | Allows PSS-signing a raw hash while also still specifying the salt length. GH #1211
* | Add basic tests for const time utilsJack Lloyd2017-09-191-0/+5
| | | | | | | | Remove CT::min and CT::max which were unused and it turns out, broken.
* | Merge GH #1205 Support large blocks in OCB modeJack Lloyd2017-09-191-1/+4
|\ \ | |/ |/|
| * Change wide block OCBJack Lloyd2017-09-151-1/+4
| | | | | | | | | | Ted Krovetz confirmed there were bugs in the reference code for blocks > 128 bits so these values should be the correct ones.
* | Merge duplicated logic for clearing CPUID bitsJack Lloyd2017-09-161-40/+1
|/
* Add SHA-256 using ARMv8 instructionsJack Lloyd2017-05-201-6/+13
| | | | Based on patch from Jeffrey Walton in GH #841
* Add support for Intel SHA-1/SHA-2 instructionsJack Lloyd2017-05-191-0/+2
| | | | Based on GH #807 and #808
* Merge GH #1035 Support generating RSA keys with OpenSSLJack Lloyd2017-05-031-5/+5
|\
| * Generate private RSA key with OpenSSL.Alexander Bluhm2017-04-301-5/+5
| | | | | | | | | | 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-33/+103
|/
* In text-based tests clear all data if algo changesJack Lloyd2017-04-271-0/+1
| | | | | | | Curious test failure, HMAC(MD5) failing with "invalid IV length" (HMAC doesn't support an IV), it turned out to be the IV was left around from the previously run GMAC test. Just clear out all vars if a new [algo] header is seen in the file.
* Filter provider in test loops, skip text based without provider.Alexander Bluhm2017-04-211-1/+12
| | | | | | | | 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/+25
| | | | | | | | 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.
* Fix botan-test verbose modeRené Korthaus2017-02-141-1/+1
|
* Add support for NEON in SIMD_4x32Jack Lloyd2017-01-291-0/+7
| | | | Tested on qemu-aarch64
* Avoid blocking tests from running if no RNG enabledJack Lloyd2017-01-221-1/+1
| | | | Instead just let the individual tests that need the RNG fail.
* Add positive DH test vectors from NIST CAVPRené Korthaus2017-01-021-0/+21
|
* 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.
* Add more tests for random prime and DL group generationJack Lloyd2016-12-301-0/+12
|
* Add test option --run-long-testsJack Lloyd2016-12-241-15/+25
| | | | | | 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-17/+5
| | | | | | 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.
* Fix off by one in PKCS #1 v1.5 decryption decodingJack Lloyd2016-12-081-0/+14
| | | | | | | | | | | | 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-1/+11
| | | | | | | 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-0/+9
| | | | Tests touching network are gated by --run-online-tests flag.
* Add missing try/catch blocks.Jack Lloyd2016-10-071-2/+10
| | | | Document that create_*_op is public but not for public consumption.