diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 16 | ||||
-rw-r--r-- | src/lib/ffi/info.txt | 2 |
2 files changed, 13 insertions, 5 deletions
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 @@ <defines> -FFI -> 20170327 +FFI -> 20170815 </defines> <header:internal> |