aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffi/ffi.h2
-rw-r--r--src/lib/ffi/ffi_kdf.cpp2
-rw-r--r--src/lib/ffi/ffi_pk_op.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h
index 565d5ce7b..fecb10978 100644
--- a/src/lib/ffi/ffi.h
+++ b/src/lib/ffi/ffi.h
@@ -136,6 +136,8 @@ doesn't exactly work well either!
*/
#define BOTAN_FFI_SUCCESS (0)
+#define BOTAN_FFI_INVALID_VERIFIER (1)
+
#define BOTAN_FFI_ERROR_INVALID_INPUT (-1)
#define BOTAN_FFI_ERROR_BAD_MAC (-2)
diff --git a/src/lib/ffi/ffi_kdf.cpp b/src/lib/ffi/ffi_kdf.cpp
index 1a4c40893..7aaf2dbe8 100644
--- a/src/lib/ffi/ffi_kdf.cpp
+++ b/src/lib/ffi/ffi_kdf.cpp
@@ -88,7 +88,7 @@ int botan_bcrypt_is_valid(const char* pass, const char* hash)
{
#if defined(BOTAN_HAS_BCRYPT)
return ffi_guard_thunk(BOTAN_CURRENT_FUNCTION, [=]() {
- return Botan::check_bcrypt(pass, hash) ? 0 : 1;
+ return Botan::check_bcrypt(pass, hash) ? BOTAN_FFI_SUCCESS : BOTAN_FFI_INVALID_VERIFIER;
});
#else
return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
diff --git a/src/lib/ffi/ffi_pk_op.cpp b/src/lib/ffi/ffi_pk_op.cpp
index d0ac8e3c7..fa3b32725 100644
--- a/src/lib/ffi/ffi_pk_op.cpp
+++ b/src/lib/ffi/ffi_pk_op.cpp
@@ -164,7 +164,7 @@ int botan_pk_op_verify_finish(botan_pk_op_verify_t op, const uint8_t sig[], size
if(legit)
return BOTAN_FFI_SUCCESS;
else
- return BOTAN_FFI_ERROR_INVALID_INPUT;
+ return BOTAN_FFI_INVALID_VERIFIER;
});
}