From e1af6da15409e775d7d1eb6c12e6c2ee031df3b6 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 16 May 2011 15:39:23 +0000 Subject: Fixes for maintainer mode warnings --- checks/dolook.cpp | 4 ++++ checks/ecdsa.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/checks/dolook.cpp b/checks/dolook.cpp index 1015f4240..a8e08a96b 100644 --- a/checks/dolook.cpp +++ b/checks/dolook.cpp @@ -55,6 +55,8 @@ using namespace Botan; #include "common.h" +namespace { + /* A weird little hack to fit PBKDF algorithms into the validation * suite You probably wouldn't ever want to actually use the PBKDF * algorithms like this, the raw PBKDF interface is more convenient @@ -279,6 +281,8 @@ Filter* lookup_encoder(const std::string& algname) return 0; } +} + Filter* lookup(const std::string& algname, const std::vector& params) { diff --git a/checks/ecdsa.cpp b/checks/ecdsa.cpp index 58f76c9ba..5cf353e58 100644 --- a/checks/ecdsa.cpp +++ b/checks/ecdsa.cpp @@ -172,12 +172,12 @@ bool test_ec_sign(RandomNumberGenerator& rng) PK_Signer signer(priv_key, "EMSA1(SHA-224)"); PK_Verifier verifier(priv_key, "EMSA1(SHA-224)"); - for(u32bit i = 0; i != 256; ++i) - signer.update((byte)i); + for(size_t i = 0; i != 256; ++i) + signer.update(static_cast(i)); SecureVector sig = signer.signature(rng); for(u32bit i = 0; i != 256; ++i) - verifier.update((byte)i); + verifier.update(static_cast(i)); if(!verifier.check_signature(sig)) { std::cout << "ECDSA self-test failed!"; @@ -186,7 +186,7 @@ bool test_ec_sign(RandomNumberGenerator& rng) // now check valid signature, different input for(u32bit i = 1; i != 256; ++i) //starting from 1 - verifier.update((byte)i); + verifier.update(static_cast(i)); if(verifier.check_signature(sig)) { @@ -198,7 +198,7 @@ bool test_ec_sign(RandomNumberGenerator& rng) sig[sig.size()/2]++; for(u32bit i = 0; i != 256; ++i) - verifier.update((byte)i); + verifier.update(static_cast(i)); if(verifier.check_signature(sig)) { -- cgit v1.2.3