| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes GH #1917
|
| |
|
| |
|
|
|
|
| |
And allow registering one-off functions as tests
|
|
|
|
| |
Refactor areas where data was being shared
|
|
|
|
| |
This is sometimes useful when debugging
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
This was trying to test for issue in #1723 but was incorrect.
|
| |
|
| |
|
|
|
|
| |
It used to do something, then I broke it.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
| |
GH #1518
|
|
|
|
|
| |
Calls std::abort the first time a test fails. Not for general
consumption but sometimes very useful when tracking down a tricky bug.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Sonar
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
ISO C++ reserves names with double underscores in them
Closes #512
|
|
|
|
| |
Remove CT::min and CT::max which were unused and it turns out, broken.
|
|\ |
|
| |
| |
| |
| |
| | |
Implement RSA private key generation with RSA_generate_key_ex().
Make PK_Key_Generation_Test iterate over all providers.
|
|/ |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
Tested on qemu-aarch64
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Previously longer tests were hidden behind higher 'soak levels'
but these arbitrary cutoffs are confusing compared to a simple
short tests/long tests split.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Tests touching network are gated by --run-online-tests flag.
|
| |
|