aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
| * Ed25519 FFIJack Lloyd2017-06-082-0/+104
| |
* | Fix compile error in FFI when RSA disabledJack Lloyd2017-06-091-1/+1
| | | | | | | | [ci skip]
* | fix doxygen build: hide method definitions with ifdefs where theZoltan Gyarmati2017-06-081-1/+1
|/ | | | | | | function declaration is already hidden, fix some param names in doxygen comments, fixes #1067 This work was sponsored by Ribose Inc (@riboseinc).
* Add FFI func botan_scrub_memJack Lloyd2017-05-292-0/+12
|
* Add botan_hash_copy_state FFI function.Daniel Wyatt2017-05-252-0/+14
|
* Merge GH #1051 Extensions for PKCSv1.5 signature formattingJack Lloyd2017-05-192-0/+23
|\
| * Add botan_pkcs_hash_id to FFIJack Lloyd2017-05-182-0/+23
| | | | | | | | | | | | Extend EMSA_PKCS1v15_Raw to optionally take a hash function for which the PKCS hash id is prefixed to the message as usual. This allows signing a message using PKCSv1.5 padding where the hash is provided externally.
* | Maintainer mode fixesJack Lloyd2017-05-181-4/+4
|/
* Fix botan_privkey_load_rsa misleading parameter names.Daniel Wyatt2017-05-132-4/+4
| | | | RSA_PrivateKey's constructor take p,q,e,d,n.
* Merge GH #1036 Add FFI botan_hash_block_sizeJack Lloyd2017-05-032-0/+13
|\
| * Add FFI botan_hash_block_size.Daniel Wyatt2017-04-302-0/+13
| |
* | Fix botan_bcrypt_is_valid return code.Daniel Wyatt2017-04-291-2/+1
|/ | | | | Currently it returns 0 on success and BOTAN_FFI_ERROR_EXCEPTION_THROWN otherwise, which is a bit inaccurate and not consistent with the rest of the FFI interface.
* Add explicit return to FFI botan_mp_to_str.Daniel Wyatt2017-04-261-1/+1
| | | | This way we know if the buffer is insufficient.
* Fix Clang warning in ffiJack Lloyd2017-04-191-121/+117
| | | | | | | The do_get_field functions had C linkage but returned BigInt, which is a warning under Clang at least. Move these functions up outside of the extern "C" block, and rename them to not match the FFI function since these are not publically accessible APIs, just helper functions.
* Mark correct variables unused in FFI botan_{pub,priv}key_load_elgamalSimon Warta2017-04-161-7/+2
| | | | Closes #1011
* Improve unused handling in ffi methodsSimon Warta2017-04-161-16/+8
| | | | | Make sure `key` is not touched when method is not implemented. Use one line UNUSED statements
* Merge GH #1006 Fix FFI cipher interface (see also GH #1003)Jack Lloyd2017-04-151-0/+2
|\
| * Fix FFI cipher interfaceJack Lloyd2017-04-141-0/+2
| | | | | | | | | | | | Was totally broken, when not encrypting in one shot. (GH #1003) Enable the test, which had been commented out :(
* | Guard include of ElGamal headerJack Lloyd2017-04-151-1/+4
| |
* | Support for ElGamal in FFI interfaceKrzysztof Kwiatkowski2017-04-142-1/+92
|/ | | | | | * Adds `botan_pubkey_load_elgamal' and `botan_privkey_load_elgamal' functions to FFI interface. * Adds test `ffi_test_elgamal'