aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ffi.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add --avoid-undefined optionJack Lloyd2018-03-311-5/+8
| | | | GH #1518
* Add functions to EC_Group for getting base point coordinatesJack Lloyd2018-02-251-6/+6
|
* Move FFI tests to sub-functionsJack Lloyd2018-01-301-235/+292
| | | | Add a test for hostname match function
* Comments from code reviewKrzysztof Kwiatkowski2018-01-221-1/+2
|
* FFI function for Elgamal key generationKrzysztof Kwiatkowski2018-01-211-48/+62
| | | | | Adds function for Elgamal key generation that allows usage of 'p' chosen by the caller.
* FFI function for DSA key generationKrzysztof Kwiatkowski2018-01-211-7/+16
| | | | | Adds function for DSA key generation that allows usage of 'p' and 'q' chosen by the caller.
* Add a test of EAX via FFIJack Lloyd2018-01-041-3/+89
| | | | Fixes #1377
* Move all the various X509 test data files under src/tests/data/x509Jack Lloyd2017-11-161-1/+1
|
* Update test for new error returnJack Lloyd2017-10-111-1/+1
|
* Fix test error if mceies disabledJack Lloyd2017-09-291-3/+5
| | | | [ci skip]
* Further header cleanupsJack Lloyd2017-09-281-0/+1
|