diff options
author | Daniel Wyatt <[email protected]> | 2017-04-29 13:20:28 -0400 |
---|---|---|
committer | Daniel Wyatt <[email protected]> | 2017-04-29 13:20:28 -0400 |
commit | 84efea7c27d0f541bac3dbe47377b65cca23f55c (patch) | |
tree | c3e697bd99f16b2d5b5ea9101c3aaf2ec0e0d597 /src/lib/ffi | |
parent | 29cc6bebe132a34f882d450b35a69bf71bb3e27b (diff) |
Fix botan_bcrypt_is_valid return code.
Currently it returns 0 on success and BOTAN_FFI_ERROR_EXCEPTION_THROWN otherwise,
which is a bit inaccurate and not consistent with the rest of the FFI interface.
Diffstat (limited to 'src/lib/ffi')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 3 |
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 |