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.
This commit is contained in:
1 parent
5dd638f45c
commit
510c900479
1 file changed
+3
-6
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user