aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\ \ | |/ |/|
| * Move declarations above TLS blockKrzysztof Kwiatkowski2017-07-301-11/+11
| |
| * FFI: Add interface for key wrapping with RFC 3394Krzysztof Kwiatkowski2017-06-292-0/+57
| |
* | Add SM2 signature schemeJack Lloyd2017-06-292-0/+65
| | | | | | | | | | | | From https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02 This is a contribution from Ribose Inc (@riboseinc).
* | ffi: Catch exceptions in botan_mp_initDaniel Wyatt2017-06-281-3/+23
|/
* FFI: Comments from code review #1074Krzysztof Kwiatkowski2017-06-121-28/+65
|
* FFI: privkey_load_ec and pubkey_load_ec should be available only if ECDSA or ↵Krzysztof Kwiatkowski2017-06-101-2/+2
| | | | ECDH is compiled
* FFI: ECDSA an ECDH keys loading from mpi. CleanupKrzysztof Kwiatkowski2017-06-101-77/+90
| | | | | * Be more C++ and use templates instead of string comparision * Move private functions to namespace at the top of the file
* FFI: Add functions specific to ECDSA and ECDHKrzysztof Kwiatkowski2017-06-102-13/+74
|
* FFI: Posibility to load EC pubkeyKrzysztof Kwiatkowski2017-06-102-1/+33
|
* FFI: Posibility to load EC privkeyKrzysztof Kwiatkowski2017-06-102-0/+31
|
* Merge GH #1066 Add Ed25519 signature schemeJack Lloyd2017-06-092-0/+114
|\
| * Fix FFI build when Ed25519 disabledJack Lloyd2017-06-091-1/+11
| |
| * Add FFI test and test data from PGP draftJack Lloyd2017-06-081-1/+1
| |