diff options
author | Hans Nilsson <[email protected]> | 2018-09-14 13:13:50 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-09-14 13:13:50 +0200 |
commit | 025bb085ab7b7305e5f464984d0714a94ad12bc9 (patch) | |
tree | dafe6b5f10ade07f88db72f39c6028d5681b85f3 | |
parent | f850f6bdf6a13ef91f6f97ce821968ff977ff4d7 (diff) | |
download | otp-025bb085ab7b7305e5f464984d0714a94ad12bc9.tar.gz otp-025bb085ab7b7305e5f464984d0714a94ad12bc9.tar.bz2 otp-025bb085ab7b7305e5f464984d0714a94ad12bc9.zip |
crypto: Fix no_aead test
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 12 |
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"}]. |