aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_kdf.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-16 15:41:29 -0400
committerJack Lloyd <[email protected]>2018-08-16 15:41:29 -0400
commit15e149ac2dab3b22273c166839cfbf1fb947b2d4 (patch)
treeb70cb82b5561a5d107ac67801d0fa1ecf84849d1 /src/lib/ffi/ffi_kdf.cpp
parent7886721dfcd6b09c187ca624a7d31c8d5f6f62e0 (diff)
Avoid throwing within the FFI layer
No reason given we know the message is going to be thrown away.
Diffstat (limited to 'src/lib/ffi/ffi_kdf.cpp')
-rw-r--r--src/lib/ffi/ffi_kdf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi_kdf.cpp b/src/lib/ffi/ffi_kdf.cpp
index 479bf2140..c63406625 100644
--- a/src/lib/ffi/ffi_kdf.cpp
+++ b/src/lib/ffi/ffi_kdf.cpp
@@ -91,7 +91,7 @@ int botan_bcrypt_generate(uint8_t* out, size_t* out_len,
return BOTAN_FFI_ERROR_BAD_FLAG;
if(wf < 4 || wf > 18)
- throw FFI_Error("Bad bcrypt work factor " + std::to_string(wf), BOTAN_FFI_ERROR_BAD_PARAMETER);
+ return BOTAN_FFI_ERROR_BAD_PARAMETER;
Botan::RandomNumberGenerator& rng = safe_get(rng_obj);
const std::string bcrypt = Botan::generate_bcrypt(pass, rng, static_cast<uint16_t>(wf));