Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aes_gcm: Add counter test for max input/output length.
For *ring* 0.17.12, both of these tests pass for default release mode, release mode with overflow-checks=true, and debug mode, on 64-bit and 32-bit targets. For prior releases, `test_aes_gcm_counter_blocks_max_minus_one` passes in all three modes. For prior releases, `test_aes_gcm_counter_blocks_max` passes in default release mode: ``` $ cargo test --lib test_aes_gcm_counter_blocks --release [snip] test aead::aes::aes_gcm_tests::test_aes_gcm_counter_blocks_max ... ok test aead::aes::aes_gcm_tests::test_aes_gcm_counter_blocks_max_minus_one ... ok ``` But, for 64-bit targets, when overflow checks are enabled (including debug mode), `test_aes_gcm_counter_blocks_max` fails: ``` $ RUSTFLAGS="-C overflow-checks=true" cargo test --lib test_aes_gcm_counter_blocks [snip] thread 'aead::aes::aes_gcm_tests::test_aes_gcm_counter_blocks_max' panicked at src\aead\aes.rs:157:25: attempt to add with overflow ```
- Loading branch information