aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-09-14 13:13:50 +0200
committerHans Nilsson <[email protected]>2018-09-14 13:13:50 +0200
commit025bb085ab7b7305e5f464984d0714a94ad12bc9 (patch)
treedafe6b5f10ade07f88db72f39c6028d5681b85f3
parentf850f6bdf6a13ef91f6f97ce821968ff977ff4d7 (diff)
downloadotp-025bb085ab7b7305e5f464984d0714a94ad12bc9.tar.gz
otp-025bb085ab7b7305e5f464984d0714a94ad12bc9.tar.bz2
otp-025bb085ab7b7305e5f464984d0714a94ad12bc9.zip
crypto: Fix no_aead test
-rw-r--r--lib/crypto/test/crypto_SUITE.erl12
1 files 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"}].