aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-29 13:38:26 -0400
committerJack Lloyd <[email protected]>2017-09-29 13:38:26 -0400
commit16a0c84fa890ff6705f3e11386bf802ecf27515d (patch)
tree51d55670c35eac0e68d44b0cc9a57e5e0dbd7118 /src
parent2919e00e5302381d3a9ba4e6a62952c0e544bdce (diff)
Avoid crash in DLIES tests if AEADs disabled
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_dlies.cpp6
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();
}