aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-15 16:11:19 -0400
committerJack Lloyd <[email protected]>2017-08-15 16:11:19 -0400
commitba75558b723ae0c8b1e3b8718d972ef2fa567dfd (patch)
tree486940da765345d4128841a23ad8a9bbc29226fd /src/lib
parentc917ab6ebdd2f4661eb7045887e3945078f62082 (diff)
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.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffi/ffi.cpp16
-rw-r--r--src/lib/ffi/info.txt2
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>