aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-05-03 10:13:30 -0400
committerJack Lloyd <[email protected]>2017-05-03 10:13:30 -0400
commita6d9a805e2a4664610fc8c0ed1031fc80c23d82a (patch)
tree5e8ad6f85f68d283a9f8925c63ac616e38f1cff9 /src/lib
parent7f4f579db4408253c60c52b8f5bbe2b64aa88f1d (diff)
parent84efea7c27d0f541bac3dbe47377b65cca23f55c (diff)
Merge GH #1033 Fix FFI botan_bcrypt_is_valid return code
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffi/ffi.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index 42b01be62..930bf60d9 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -1213,8 +1213,7 @@ int botan_bcrypt_is_valid(const char* pass, const char* hash)
try
{
#if defined(BOTAN_HAS_BCRYPT)
- if(Botan::check_bcrypt(pass, hash))
- return 0; // success
+ return Botan::check_bcrypt(pass, hash) ? 0 : 1;
#else
return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
#endif