From ba75558b723ae0c8b1e3b8718d972ef2fa567dfd Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 15 Aug 2017 16:11:19 -0400 Subject: Update FFI version 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. --- src/lib/ffi/ffi.cpp | 16 ++++++++++++---- src/lib/ffi/info.txt | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index 1cd8e4b90..044b03335 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -36,12 +36,20 @@ uint32_t botan_ffi_api_version() int botan_ffi_supports_api(uint32_t api_version) { - /* - * In the future if multiple versions are supported, this - * function would accept any of them. - */ + // Current API version if(api_version == BOTAN_HAS_FFI) return BOTAN_FFI_SUCCESS; + + // Older versions that are still supported + + // This is the 2.1/2.2 API + if(api_version == 20170327) + return BOTAN_FFI_SUCCESS; + + // This is the 2.0 API + if(api_version == 20150515) + return BOTAN_FFI_SUCCESS; + return -1; } diff --git a/src/lib/ffi/info.txt b/src/lib/ffi/info.txt index a28df11b0..d85faee0e 100644 --- a/src/lib/ffi/info.txt +++ b/src/lib/ffi/info.txt @@ -1,5 +1,5 @@ -FFI -> 20170327 +FFI -> 20170815 -- cgit v1.2.3