aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-05-16 15:39:23 +0000
committerlloyd <[email protected]>2011-05-16 15:39:23 +0000
commite1af6da15409e775d7d1eb6c12e6c2ee031df3b6 (patch)
treefc947d509b2e9f5e8e0499ba74a3c913f6689419 /checks
parent3ead4139654e745f3b86db5f49dde8636909e511 (diff)
Fixes for maintainer mode warnings
Diffstat (limited to 'checks')
-rw-r--r--checks/dolook.cpp4
-rw-r--r--checks/ecdsa.cpp10
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<std::string>& 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<byte>(i));
SecureVector<byte> sig = signer.signature(rng);
for(u32bit i = 0; i != 256; ++i)
- verifier.update((byte)i);
+ verifier.update(static_cast<byte>(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<byte>(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<byte>(i));
if(verifier.check_signature(sig))
{