diff options
author | Jack Lloyd <[email protected]> | 2016-12-08 19:23:18 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-08 19:23:18 -0500 |
commit | 59a71779ad7c644fcaefd3582ea244f1ff60349a (patch) | |
tree | 3354cf95d4d239ad602f3c6fbdf719bca89ae0db /src/tests/tests.h | |
parent | 41e7cade5889d238ca695806451db227b9792cd9 (diff) |
Fix off by one in PKCS #1 v1.5 decryption decoding
When the code was changed in b8966d0f89e, the offset was not changed,
so it would reject ciphertexts with exactly 8 bytes of random padding
(the required minimum).
Found by pkcs1 fuzzer which also had problems due to not having been
updated at the same time.
Add a test suite for decoding of PK decryption padding to cover the
problem cases.
Diffstat (limited to 'src/tests/tests.h')
-rw-r--r-- | src/tests/tests.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/tests.h b/src/tests/tests.h index 733e948ea..32aaad0fb 100644 --- a/src/tests/tests.h +++ b/src/tests/tests.h @@ -430,6 +430,8 @@ class Text_Based_Test : public Test virtual std::vector<Test::Result> run_final_tests() { return std::vector<Test::Result>(); } + bool get_req_bool(const VarMap& vars, const std::string& key) const; + std::vector<uint8_t> get_req_bin(const VarMap& vars, const std::string& key) const; std::vector<uint8_t> get_opt_bin(const VarMap& vars, const std::string& key) const; |