diff options
author | Jack Lloyd <[email protected]> | 2019-12-06 11:02:59 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-12-06 11:11:55 -0500 |
commit | ecb092d18aa6c87814bb63748d104910f4c27d6c (patch) | |
tree | 7eba92e6d0f3bd6fd834bab3a52e0d7f67ecfa7c /src/lib/ffi/ffi_pkey.cpp | |
parent | 74a8685830775c1463e3eb484e2faf824e6862cd (diff) |
Avoid MSVC warnings about dead code in FFI layer
Also fix warning about "insecure" getenv
Diffstat (limited to 'src/lib/ffi/ffi_pkey.cpp')
-rw-r--r-- | src/lib/ffi/ffi_pkey.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/ffi/ffi_pkey.cpp b/src/lib/ffi/ffi_pkey.cpp index e0ba2380a..2fb3d338e 100644 --- a/src/lib/ffi/ffi_pkey.cpp +++ b/src/lib/ffi/ffi_pkey.cpp @@ -137,15 +137,17 @@ int botan_pubkey_check_key(botan_pubkey_t key, botan_rng_t rng, uint32_t flags) { const bool strong = (flags & BOTAN_CHECK_KEY_EXPENSIVE_TESTS); - return BOTAN_FFI_DO(Botan::Public_Key, key, k, - { return (k.check_key(safe_get(rng), strong) == true) ? 0 : BOTAN_FFI_ERROR_INVALID_INPUT; }); + return BOTAN_FFI_RETURNING(Botan::Public_Key, key, k, { + return (k.check_key(safe_get(rng), strong) == true) ? 0 : BOTAN_FFI_ERROR_INVALID_INPUT; + }); } int botan_privkey_check_key(botan_privkey_t key, botan_rng_t rng, uint32_t flags) { const bool strong = (flags & BOTAN_CHECK_KEY_EXPENSIVE_TESTS); - return BOTAN_FFI_DO(Botan::Private_Key, key, k, - { return (k.check_key(safe_get(rng), strong) == true) ? 0 : BOTAN_FFI_ERROR_INVALID_INPUT; }); + return BOTAN_FFI_RETURNING(Botan::Private_Key, key, k, { + return (k.check_key(safe_get(rng), strong) == true) ? 0 : BOTAN_FFI_ERROR_INVALID_INPUT; + }); } int botan_pubkey_export(botan_pubkey_t key, uint8_t out[], size_t* out_len, uint32_t flags) |