aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-03-14 09:56:23 +0100
committerTobias Brunner <tobias@strongswan.org>2014-03-20 15:49:05 +0100
commit510c9004793adea388a7e70ff1d36e7ae9266060 (patch)
treee7e63e1e32201b0cc7430818461336a6a330bbf3 /src
parent5dd638f45c374eb69b4d644e9de28cb3d34d1e42 (diff)
downloadstrongswan-510c9004793adea388a7e70ff1d36e7ae9266060.tar.bz2
strongswan-510c9004793adea388a7e70ff1d36e7ae9266060.tar.xz
crypto-tester: Don't fail if key size is not supported
The Blowfish and Twofish implementations provided by the gcrypt plugin only support specific key lengths, which we don't know when testing against vectors (either during unit tests or during algorithm registration). The on_create test with a specific key length will be skipped anyway, so there is no point in treating this failure differently.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/crypto/crypto_tester.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstrongswan/crypto/crypto_tester.c b/src/libstrongswan/crypto/crypto_tester.c
index 30724b16d..40c4fd362 100644
--- a/src/libstrongswan/crypto/crypto_tester.c
+++ b/src/libstrongswan/crypto/crypto_tester.c
@@ -204,16 +204,13 @@ METHOD(crypto_tester_t, test_crypter, bool,
continue;
}
- tested++;
- failed = TRUE;
crypter = create(alg, vector->key_size);
if (!crypter)
- {
- DBG1(DBG_LIB, "%N[%s]: %u bit key size not supported",
- encryption_algorithm_names, alg, plugin_name,
- BITS_PER_BYTE * vector->key_size);
+ { /* key size not supported */
continue;
}
+ tested++;
+ failed = TRUE;
key = chunk_create(vector->key, crypter->get_key_size(crypter));
if (!crypter->set_key(crypter, key))