diff options
author | Jack Lloyd <[email protected]> | 2018-07-13 18:54:34 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-07-13 18:57:58 -0400 |
commit | 228bb3ff6789681d14eb66efe000f3f9c93baa44 (patch) | |
tree | 50f262c6ca23f1e41c4f8a4de91d43e45d9d09fd /src | |
parent | 049d99b70aeedfc1d34b9317c6836d70aa2661c9 (diff) |
Bump the FFI version
New FFI features added in #1621 and #1625
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 6 | ||||
-rw-r--r-- | src/lib/ffi/info.txt | 2 | ||||
-rw-r--r-- | src/tests/test_ffi.cpp | 7 |
3 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index ecc8d2899..b540a9b8e 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -86,7 +86,11 @@ int botan_ffi_supports_api(uint32_t api_version) // Older versions that are still supported - // This is the 2.1/2.2 API + // This is the API introduced in 2.3 + if(api_version == 20170815) + return BOTAN_FFI_SUCCESS; + + // This is the API introduced in 2.1 if(api_version == 20170327) return BOTAN_FFI_SUCCESS; diff --git a/src/lib/ffi/info.txt b/src/lib/ffi/info.txt index e064d5f24..508ad0091 100644 --- a/src/lib/ffi/info.txt +++ b/src/lib/ffi/info.txt @@ -1,5 +1,5 @@ <defines> -FFI -> 20170815 +FFI -> 20180713 </defines> <header:internal> diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp index e0828f588..916388778 100644 --- a/src/tests/test_ffi.cpp +++ b/src/tests/test_ffi.cpp @@ -145,6 +145,13 @@ class FFI_Unit_Tests final : public Test result.test_is_eq("Botan version datestamp", botan_version_datestamp(), Botan::version_datestamp()); result.test_is_eq("FFI supports its own version", botan_ffi_supports_api(botan_ffi_api_version()), 0); + result.test_is_eq("FFI supports 2.0 version", botan_ffi_supports_api(20150515), 0); + result.test_is_eq("FFI supports 2.1 version", botan_ffi_supports_api(20170327), 0); + result.test_is_eq("FFI supports 2.3 version", botan_ffi_supports_api(20170815), 0); + result.test_is_eq("FFI supports 2.8 version", botan_ffi_supports_api(20180713), 0); + + result.test_is_eq("FFI doesn't support bogus version", botan_ffi_supports_api(20160229), -1); + const std::vector<uint8_t> mem1 = { 0xFF, 0xAA, 0xFF }; const std::vector<uint8_t> mem2 = mem1; const std::vector<uint8_t> mem3 = { 0xFF, 0xA9, 0xFF }; |