From 025bb085ab7b7305e5f464984d0714a94ad12bc9 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 14 Sep 2018 13:13:50 +0200 Subject: crypto: Fix no_aead test --- lib/crypto/test/crypto_SUITE.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 749a57dbac..ff9c5163a3 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -428,12 +428,18 @@ no_block(Config) when is_list(Config) -> no_aead() -> [{doc, "Test disabled aead ciphers"}]. no_aead(Config) when is_list(Config) -> - [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, _Info} | _] = - lazy_eval(proplists:get_value(aead, Config)), - EncryptArgs = [Type, Key, Nonce, {AAD, PlainText}], + EncArg4 = + case lazy_eval(proplists:get_value(aead, Config)) of + [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, TagLen, _Info} | _] -> + {AAD, PlainText, TagLen}; + [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, _Info} | _] -> + {AAD, PlainText} + end, + EncryptArgs = [Type, Key, Nonce, EncArg4], DecryptArgs = [Type, Key, Nonce, {AAD, CipherText, CipherTag}], notsup(fun crypto:block_encrypt/4, EncryptArgs), notsup(fun crypto:block_decrypt/4, DecryptArgs). + %%-------------------------------------------------------------------- stream() -> [{doc, "Test stream ciphers"}]. -- cgit v1.2.1