You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TEST_RUN_TESTS="$(yes unit/crypto.test | head -n 1000)" make test
[011] Test failed! Result content mismatch:
[011] --- unit/crypto.result Sat Jun 22 18:46:06 2019
[011] +++ unit/crypto.reject Sun Jun 23 18:50:16 2019
[011] @@ -1,3 +1,9 @@
[011] + # Failed test 'decrypt can fail with wrong IV'
[011] + # in /home/alex/p/tarantool-meta/r/t-2/test/unit/crypto.c at line 92
[011] + # Looks like you failed 1 test of 20 run.
[011] +# Failed test 'subtests'
[011] +# in /home/alex/p/tarantool-meta/r/t-2/test/unit/unit.c at line 54
[011] +# Looks like you failed 1 test of 5 run.
[011] *** main ***
[011] 1..5
[011] ok 1 - crypto checks that algo argument is correct
[011] @@ -15,7 +21,7 @@
[011] ok 10 - decrypt also checks length and returns needed number of bytes
[011] ok 11 - decrypt returns correct number of bytes
[011] ok 12 - and correctly decrypts data
[011] - ok 13 - decrypt can fail with wrong IV
[011] + not ok 13 - decrypt can fail with wrong IV
[011] ok 14 - diag error is set
[011] ok 15 - encrypt with different IV and the same number of written bytes returned
[011] ok 16 - the encrypted data looks different
[011] @@ -23,7 +29,7 @@
[011] ok 18 - data is the same
[011] ok 19 - encrypt with one codec, but decrypt with another codec and the same key
[011] ok 20 - data is the same
[011] -ok 2 - subtests
[011] +not ok 2 - subtests
[011] *** test_aes128_codec: done ***
[011] *** test_aes128_stress ***
[011] 1..1
The text was updated successfully, but these errors were encountered:
Seems like sometimes crypto_codec_gen_iv generates such an IV, that it causes not decryption error with a different IV, but just a wrong decryption. Probably that test should be just dropped.
One of subtests was checking if crypto_decode returns an error
when fails to decode. But due to randomness of the test sometimes
it happened, that initial vector of encrypted data somehow didn't
lead to an error. Decryption was not correct, but only in terms
of result, not in terms of decryption algorithm. -1 was not
returned, and diag was not set.
This patch checks all the cases.
Closes#4306
Tarantool version: 2.2.0-465-g88a232903 Linux-x86_64-Debug.
OS version: Gentoo Linux.
Reproduced by Travis-CI and locally:
The text was updated successfully, but these errors were encountered: