aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ffi.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove tab charsJack Lloyd2019-07-101-5/+5
| | | | Death to \t
* More Python API enhancements.Jack Lloyd2019-04-271-0/+2
| | | | Deprecate various redundant FFI functions
* Fix feature macro checks.Jack Lloyd2019-04-261-3/+3
| | | | Add a checker script.
* Fix some build/test problems with minimized buildsJack Lloyd2019-04-261-7/+13
|
* Using preprocessor for the testsDavid Carlier2019-04-121-8/+7
|
* Fixes memory leak in FFI testsMatthias Gierlings2019-04-081-0/+1
|
* Fixes for minimized buildsJack Lloyd2019-02-161-1/+7
| | | | Various configurations would fail build or test, fix that.
* Remove trailing whitespaceJack Lloyd2019-01-131-2/+1
|
* Fix some MSVC warningsJack Lloyd2018-12-101-2/+2
|
* Fix a FFI test when threads are disabledJack Lloyd2018-12-031-1/+9
|
* Make exceptions easier to translate to error codesJack Lloyd2018-11-231-2/+2
| | | | | | | | | | | 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
* Avoid null pointer write in FFIJack Lloyd2018-09-281-0/+3
| | | | | | | | If a function returning variable length output was called with a null output buffer but a non-zero output buffer length, FFI layer would call memset(nullptr, 0, buffer_len) and crash. Caught by Coverity.
* Merge GH #1670 New password hashing interfaceJack Lloyd2018-09-131-3/+29
|\
| * Test Scrypt private key encryptionJack Lloyd2018-09-101-3/+18
| |
| * Add testsJack Lloyd2018-09-101-0/+11
| | | | | | | | This is a contribution of Ribose Inc (@riboseinc)
* | Add FFI functions for creating and getting X25519 dataJack Lloyd2018-09-101-0/+58
|/ | | | See GH #1680
* Add botan_cipher_reset to FFIJack Lloyd2018-08-171-0/+5
|
* Add args for botan FFI cert verification for hostname and timeJack Lloyd2018-08-161-4/+4
|
* Add botan_x509_cert_dupJack Lloyd2018-08-161-0/+6
|
* Fix bug introduced in 15e149acJack Lloyd2018-08-161-0/+10
| | | | | This caused get_field, when called with a non-existing field, to return success and set the field to a small negative integer.
* Add TOTP to FFIJack Lloyd2018-08-161-1/+36
|
* Expose HOTP to FFIJack Lloyd2018-08-151-1/+36
|
* More FFI testsJack Lloyd2018-08-151-0/+54
|
* Remove support for 8 or 16 bit BigInt wordsJack Lloyd2018-08-151-2/+4
| | | | | | | | | | It turned out 8 bit was very broken (failed to compile, due to overload problems with functions taking uint8_t vs word). 16 bit words work aside from a test failure, but is really slow. Practically speaking we are not in a position to support 16-bit CPUs very well. And being able to assume sizeof(word) >= sizeof(uint32_t) allows simplifying some code.
* Cleanup of BigInt encoding/decoding functionsJack Lloyd2018-08-141-4/+16
| | | | | | | | | | | | | Instigated by finding a bug where BigInt::encode with decimal output would often have a leading '0' char. Which is papered over in the IO operator, but was exposed by botan_mp_to_str which called BigInt::encode directly. Split BigInt::encode/decode into two versions, one taking the Base argument and the other using the (previously default) binary base. With a view of eventually deprecating the versions taking a base. Add BigInt::to_dec_string() and BigInt::to_hex_string()
* Add some additional null pointer arg checks to FFIJack Lloyd2018-08-141-2/+5
|
* Merge GH #1647 Add X.509 path validation to FFIJack Lloyd2018-08-141-1/+59
|\
| * Add path validation to FFIJack Lloyd2018-08-131-1/+59
| |
* | Expose RDRAND RNG through FFIJack Lloyd2018-08-131-39/+56
|/
* Add botan_cipher_get_keyspecJack Lloyd2018-08-111-8/+14
| | | | | | | botan_cipher_query_keylen doesn't return the modulus. Renames (recently added/unreleased) botan_{block_cipher,mac}_query_keylen to x_get_keyspec so the names are consistent.
* Add some useful FFI functionsJack Lloyd2018-08-101-7/+40
|
* Fix FFI testJack Lloyd2018-08-101-1/+3
| | | | This could fail if the random plaintext was of zero length
* Add a function to query output length of symmetric cipherJack Lloyd2018-08-101-3/+10
|
* Add functions to get size of PK ciphertext,plaintextJack Lloyd2018-08-101-13/+25
| | | | Needed for https://github.com/strongswan/strongswan/pull/109
* Merge GH #1641 Add functions to get expected length of PK signatureJack Lloyd2018-08-101-11/+25
|\
| * Add FFI function to get signature output lengthJack Lloyd2018-08-101-11/+25
| |
* | Add a "user-threadsafe" option to botan_rng_initJack Lloyd2018-08-101-0/+7
| |
* | Allow x509 module to be optional for FFIJack Lloyd2018-08-101-4/+22
|/
* Combine SM2 key types for signatures and encryptionJack Lloyd2018-08-011-2/+2
| | | | | | It seems in practice the same key may be end up used for both operations, so maintaining a distinction at the type level just complicates things.
* Only print FFI exceptions to stdout if an env var is setJack Lloyd2018-07-241-0/+3
| | | | So debugging is possible but default is silent.
* Add botan_mac_query_keylenJack Lloyd2018-07-241-0/+10
|
* Add botan_block_cipher_query_keylen plus some new FFI error codesJack Lloyd2018-07-241-0/+10
|
* Add FFI funcs to get algo name from cipher, MAC and hash objsJack Lloyd2018-07-191-15/+49
|
* Bump the FFI versionJack Lloyd2018-07-131-0/+7
| | | | New FFI features added in #1621 and #1625
* Add FPE1 to C APIJack Lloyd2018-07-131-0/+41
| | | | GH #1612
* Add RSA PKCS#1 key load and export functions to ffiRené Korthaus2018-07-041-0/+17
|
* Prohibit empty nonces with GCMJack Lloyd2018-06-271-2/+4
| | | | | This is mostly harmless but not allowed by the specification. See for example SP800-38D section 5.2.1.1
* Fix the botan-test --verbose flag, which did nothingJack Lloyd2018-04-111-1/+1
| | | | It used to do something, then I broke it.
* Moves UBSAN macros from test files to Test_OptionsMatthias Gierlings2018-04-071-4/+0
| | | | | | | | | | | | 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-1/+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.