aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make poly_dbl.h a submodule of utilsJack Lloyd2017-09-271-1/+8
| | | | | Only required by a few modules and if none of them are in use then the whole thing can just be skipped from the build.
* Add final annotations as appropriate in the test codeJack Lloyd2017-09-221-6/+6
|
* Add basic tests for const time utilsJack Lloyd2017-09-191-0/+35
| | | | Remove CT::min and CT::max which were unused and it turns out, broken.
* Improve polynomial doubling code, move to utilJack Lloyd2017-08-151-0/+22
| | | | | | | | | Now does 64-bits at a time instead of 8 bits, and avoids conditional timing channel on the XOR carry. Confirmed that at least GCC 7 and Clang 4 on x86-64 compile the functions without conditional jumps. Also removes CMAC as a dependency of OCB, which only needed it in order to call CMAC::poly_double
* Reformat code with astyle + fix code styleTomasz Frydrych2017-05-011-15/+13
|
* Complete wildcard handling for X.509 certificatesRené Korthaus2017-04-201-0/+28
| | | | | | | | | | | | Hostname validation is used to make sure the certificate hostname matches the hostname of the connected host. RFC 6125 allows one wildcard in the left-most label of a hostname. Up to now, we only supported only the wildcard as the left-most label, e.g., www.example.com would match *.example.com, but www.example.com would not match www*.example.com, although it is permitted. Also adds test vectors from RFC 6125 as well as the OpenSSL test suite.
* Fix some compiler warnings.Jack Lloyd2017-03-221-1/+1
|
* Fix #917: calendar_point::to_std_timepoint() does not support years after 2037Daniel Neus2017-03-211-2/+3
| | | | Only throw on systems where 32 bit std::time_t is used.
* Add a test of calendar_point::to_stringJack Lloyd2017-01-221-0/+8
|
* Minor refactoring of Text_Based_TestJack Lloyd2016-12-191-10/+4
| | | | | | 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-13/+13
| | | | | | 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 source file encoding ANSI -> UTF-8Daniel Neus2016-08-171-2/+2
| | | | | | | | | should fix: ``` WARN: Invalid character encountered in file /home/travis/build/randombit/botan/src/tests/test_utils.cpp at line 381 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'. WARN: Invalid character encountered in file /home/travis/build/randombit/botan/src/lib/pubkey/ecies/ecies.cpp at line 311 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'. ```
* add copyrightDaniel Neus2016-07-251-0/+1
|
* add some basic charset testsDaniel Neus2016-07-251-0/+124
| | | | | | - UCS-2 to ISO 8859-1 - UTF-8 to ISO 8859-1 - ISO 8859-1 to UTF-8
* some trivial compiler/PVS-Studio warning fixesDaniel Neus2015-12-221-1/+1
|
* Add --data-dir option to test commandJack Lloyd2015-12-201-4/+4
| | | | | | | Understand using '-' on the command line to mean stdin Fix last few unit tests that wanted to write to the filesystem; removes outdata directory.
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-2/+2
| | | | | | | | As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
* Convert const char* arguments on Test:: to std::stringsJack Lloyd2015-11-281-4/+4
| | | | unless they are actually optional
* Update and consolidate the test framework.Jack Lloyd2015-11-111-0/+331
The tests previously had used 4 to 6 different schemes internally (the vec file reader framework, Catch, the old InSiTo Boost.Test tests, the PK/BigInt tests which escaped the rewrite in 1.11.7, plus a number of one-offs). Converge on a design that works everywhere, and update all the things. Fix also a few bugs found by the test changes: SHA-512-256 name incorrect, OpenSSL RC4 name incorrect, signature of FFI function botan_pubkey_destroy was wrong.