diff options
author | Jack Lloyd <[email protected]> | 2017-09-29 13:38:26 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-29 13:38:26 -0400 |
commit | 16a0c84fa890ff6705f3e11386bf802ecf27515d (patch) | |
tree | 51d55670c35eac0e68d44b0cc9a57e5e0dbd7118 /src/tests/test_dlies.cpp | |
parent | 2919e00e5302381d3a9ba4e6a62952c0e544bdce (diff) |
Avoid crash in DLIES tests if AEADs disabled
Diffstat (limited to 'src/tests/test_dlies.cpp')
-rw-r--r-- | src/tests/test_dlies.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/test_dlies.cpp b/src/tests/test_dlies.cpp index 446470fe6..4c9708052 100644 --- a/src/tests/test_dlies.cpp +++ b/src/tests/test_dlies.cpp @@ -67,6 +67,12 @@ class DLIES_KAT_Tests final : public Text_Based_Test enc.reset(Botan::get_cipher_mode(cipher_algo, Botan::ENCRYPTION)); dec.reset(Botan::get_cipher_mode(cipher_algo, Botan::DECRYPTION)); + if(!enc || !dec) + { + result.test_note("Skipping due to missing cipher: " + mac_algo); + return result; + } + cipher_key_len = enc->key_spec().maximum_keylength(); } |