aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
Commit message (Collapse)AuthorAgeFilesLines
* Add RAII versions of get_cipher_mode and get_aeadJack Lloyd2018-04-071-1/+1
| | | | See also #1526
* Ensure exception types are exported from DLLJack Lloyd2018-03-061-1/+1
| | | | GH #983
* One comment fix and one formatting fix [ci skip]René Korthaus2018-02-281-3/+4
|
* Add functions to EC_Group for getting base point coordinatesJack Lloyd2018-02-251-2/+2
|
* Make FFI errors an enum, and add a function to translate to stringsJack Lloyd2018-02-072-54/+71
|
* Use shared representation of EC_GroupJack Lloyd2018-01-311-4/+4
| | | | Hide CurveGFp with an eye for eventual removal
* Add botan_x509_cert_hostname_matchJack Lloyd2018-01-302-0/+15
|
* Comments from code reviewKrzysztof Kwiatkowski2018-01-222-6/+71
|
* FFI function for Elgamal key generationKrzysztof Kwiatkowski2018-01-212-0/+19
| | | | | Adds function for Elgamal key generation that allows usage of 'p' chosen by the caller.
* FFI function for DSA key generationKrzysztof Kwiatkowski2018-01-212-0/+19
| | | | | Adds function for DSA key generation that allows usage of 'p' and 'q' chosen by the caller.
* Make stream, block, hash and cipher mode base classes optionalJack Lloyd2018-01-121-0/+3
|
* Add explicit int return type declarations on FFI lambdas.Jack Lloyd2017-12-2813-53/+53
| | | | | | Sun Studio gives a strange warning about this. This probably doesn't help actually compile under Sun Studio. But it doesn't hurt to be explicit.
* Avoid deprecated functions in FFIJack Lloyd2017-11-141-3/+3
|
* Simplify ffi call overheadJack Lloyd2017-10-115-45/+22
| | | | Notable reductions in code size, stack size and function call overhead.
* Add static_cast to avoid conversion warningJack Lloyd2017-10-031-1/+2
| | | | | I guess we're in trouble if we add any block ciphers with size >= 2^31 Probably fine.
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-032-5/+6
| | | | | | | Generally speaking reinterpret_cast is sketchy stuff. But the special case of char*/uint8_t* is both common and safe. By isolating those, the remaining (likely sketchy) cases are easier to grep for.
* Remove various unused variablesJack Lloyd2017-10-021-1/+0
| | | | Sonar finds
* Avoid using namespace in FFI headersJack Lloyd2017-10-025-7/+3
| | | | Internal only headers but Sonar doesn't know that
* Another FFI struct vs class fixJack Lloyd2017-09-301-1/+1
|
* FFI objects have to be structs because we expose them to CJack Lloyd2017-09-302-5/+4
|
* Use class instead of struct for objects with member functionsJack Lloyd2017-09-302-5/+6
| | | | Flagged by Sonar and quite reasonable
* Further header cleanupsJack Lloyd2017-09-281-1/+2
|
* Apply final annotations to the library alsoJack Lloyd2017-09-222-3/+3
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* More include header cleanupsJack Lloyd2017-09-211-0/+1
|
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-205-10/+10
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Complete the final annotation changesJack Lloyd2017-09-191-47/+47
|
* More annotationsJack Lloyd2017-09-191-275/+298
|
* Use constant_time_compare instead of same_memJack Lloyd2017-09-162-1/+11
| | | | New name, same great operation
* Fix loading of plaintext PKCS#8 private keysRené Korthaus2017-09-081-5/+10
| | | | | We fixed this in the C++ API in GH #381, but apparently not in ffi. Also adds the missing tests.
* Fix invalid comparison, potential segfault on invalid typeJack Lloyd2017-09-071-1/+2
| | | | Found by Coverity
* Merge GH #1189 Correct return value of botan_pk_op_verify_finishJack Lloyd2017-09-073-2/+4
|\
| * Correct return value of botan_pk_op_verify_finishJack Lloyd2017-09-063-2/+4
| | | | | | | | | | | | | | This function changed behavior in 0d403a3 see also GH #1187 Add new return code BOTAN_FFI_INVALID_VERIFIER and use it for both signature and bcrypt verification functions.
* | Add support for computing SM2 ZA field to FFIJack Lloyd2017-09-062-0/+42
|/ | | | This is a contribution from Ribose Inc.
* More MSVC warnings fixesJack Lloyd2017-08-311-1/+1
|
* Fix various MSVC warningsJack Lloyd2017-08-312-2/+2
| | | | Based on VC2017 output
* Simplify botan_privkey_create_XXXJack Lloyd2017-08-221-87/+16
| | | | All of these can just forward to botan_privkey_create
* Add dh functions in ffiKonstantinos Kolelis2017-08-222-0/+96
|
* Change type of botan_scrub_mem from uint8_t* to void*Jack Lloyd2017-08-172-2/+2
| | | | | The underlying function already takes void* and it makes sense to pass non-byte buffers to this function.
* Update FFI versionJack Lloyd2017-08-152-5/+13
| | | | | | | Also fix botan_ffi_supports_api to return true for any supported version (2.0, 2.1/2.2, and 2.3). Really 2.2 should have had its own FFI version code since there were already many FFI API additions in that release.
* Add botan_hex_decode, botan_base64_encode, botan_base64_decode FFI funcsJack Lloyd2017-08-152-3/+52
|
* Add SM2 encryption to FFIJack Lloyd2017-08-042-0/+50
| | | | Also add hooks for keygen, etc
* Add virtual destructor to FFI botan_structJack Lloyd2017-08-031-1/+1
| | | | | | As we do inherit from it, and delete through the base pointer. Found by Coverity scanner.
* Fix some maintainer mode warningsJack Lloyd2017-08-031-6/+6
|
* Add test for FFI keywrap, and constify argsJack Lloyd2017-07-312-9/+9
|
* Split up ffi.cpp into several filesJack Lloyd2017-07-3119-2314/+2552
| | | | | It was getting pretty big and would get worse over time, eg whenver I get around to adding TLS support.
* Merge GH #1128 Improve FFI exception safetyJack Lloyd2017-07-312-701/+355
|\
| * Add missing return in ffi_delete_objectJack Lloyd2017-07-251-4/+5
| | | | | | | | | | Somehow this still passed all the tests, downside of 0 as the success return I suppose.
| * In FFI, check the object magic before deletingJack Lloyd2017-07-251-30/+42
| | | | | | | | | | Previously any X_destroy function would just delete its arg regardless of whatever the application passed in.
| * Better exception guarding in FFIJack Lloyd2017-07-252-671/+312
| | | | | | | | | | Based on PR #1097 but I wanted to decrease the verbosity of the resulting code.
* | Merge GH #1135 Add RFC 3394 keywrap to FFIJack Lloyd2017-07-312-0/+57
|\ \ | |/ |/|