diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ffi/ffi_pkey_algs.cpp | 12 | ||||
-rw-r--r-- | src/tests/test_pubkey.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_pubkey.h | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/ffi/ffi_pkey_algs.cpp b/src/lib/ffi/ffi_pkey_algs.cpp index 8cb9b785e..c2ebad80c 100644 --- a/src/lib/ffi/ffi_pkey_algs.cpp +++ b/src/lib/ffi/ffi_pkey_algs.cpp @@ -648,10 +648,10 @@ int botan_privkey_ed25519_get_privkey(botan_privkey_t key, return BOTAN_FFI_DO(Botan::Private_Key, key, k, { if(Botan::Ed25519_PrivateKey* ed = dynamic_cast<Botan::Ed25519_PrivateKey*>(&k)) { - const Botan::secure_vector<uint8_t>& key = ed->get_private_key(); - if(key.size() != 64) + const Botan::secure_vector<uint8_t>& ed_key = ed->get_private_key(); + if(ed_key.size() != 64) return BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE; - Botan::copy_mem(output, key.data(), key.size()); + Botan::copy_mem(output, ed_key.data(), ed_key.size()); return BOTAN_FFI_SUCCESS; } else @@ -672,10 +672,10 @@ int botan_pubkey_ed25519_get_pubkey(botan_pubkey_t key, return BOTAN_FFI_DO(Botan::Public_Key, key, k, { if(Botan::Ed25519_PublicKey* ed = dynamic_cast<Botan::Ed25519_PublicKey*>(&k)) { - const std::vector<uint8_t>& key = ed->get_public_key(); - if(key.size() != 32) + const std::vector<uint8_t>& ed_key = ed->get_public_key(); + if(ed_key.size() != 32) return BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE; - Botan::copy_mem(output, key.data(), key.size()); + Botan::copy_mem(output, ed_key.data(), ed_key.size()); return BOTAN_FFI_SUCCESS; } else diff --git a/src/tests/test_pubkey.cpp b/src/tests/test_pubkey.cpp index d25bf8d68..fb423bc35 100644 --- a/src/tests/test_pubkey.cpp +++ b/src/tests/test_pubkey.cpp @@ -82,7 +82,7 @@ void check_invalid_ciphertexts(Test::Result& result, " invalid ciphertexts, rejected " + std::to_string(ciphertext_rejected)); } -std::vector<std::string> PK_Test::possible_providers(const std::string& params) +std::vector<std::string> PK_Test::possible_providers(const std::string& /*params*/) { return Test::provider_filter({ "base", "bearssl", "openssl", "tpm" }); } diff --git a/src/tests/test_pubkey.h b/src/tests/test_pubkey.h index 4a2ca6866..5d1b2cd99 100644 --- a/src/tests/test_pubkey.h +++ b/src/tests/test_pubkey.h @@ -32,7 +32,7 @@ class PK_Test : public Text_Based_Test } protected: - std::vector<std::string> possible_providers(const std::string&) override; + std::vector<std::string> possible_providers(const std::string& params) override; private: std::string m_algo; @@ -172,7 +172,7 @@ class PK_Key_Generation_Test : public Test virtual std::string algo_name() const = 0; - std::vector<std::string> possible_providers(const std::string&) override; + std::vector<std::string> possible_providers(const std::string& params) override; }; void check_invalid_signatures(Test::Result& result, |