From 228bb3ff6789681d14eb66efe000f3f9c93baa44 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 13 Jul 2018 18:54:34 -0400 Subject: Bump the FFI version New FFI features added in #1621 and #1625 --- src/lib/ffi/ffi.cpp | 6 +++++- src/lib/ffi/info.txt | 2 +- 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 @@ -FFI -> 20170815 +FFI -> 20180713 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 mem1 = { 0xFF, 0xAA, 0xFF }; const std::vector mem2 = mem1; const std::vector mem3 = { 0xFF, 0xA9, 0xFF }; -- cgit v1.2.3