diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-10-27 14:35:25 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-10-27 14:35:25 -0500 |
commit | 6a843db90ae164c14ba1daacce52e0b680f3520e (patch) | |
tree | b98032de9f2ffa0aaa9e508e23e1bfecf1ef0a3f /misc | |
parent | ed9ad7642c211e7eba33a93dbb71c1afb2eda864 (diff) | |
download | bcfg2-6a843db90ae164c14ba1daacce52e0b680f3520e.tar.gz bcfg2-6a843db90ae164c14ba1daacce52e0b680f3520e.tar.bz2 bcfg2-6a843db90ae164c14ba1daacce52e0b680f3520e.zip |
Fix nondeterministic bruteforce_decrypt test
The existing test_bruteforce_decrypt was nondeterministic; in some
cases, the generated ciphertext would be decryptable with one of the
wrong passphrases, which would cause test failure even though it
decrypts to gibberish. This checks that by splitting it into two
tests:
1. Test with an invalid ciphertext, so that EVPError is always raised;
2. Test with valid ciphertext, and check for *either* EVPError or
decrypted plaintext that is not the same as the original plaintext.
Diffstat (limited to 'misc')
0 files changed, 0 insertions, 0 deletions