diff options
| author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2016-07-19 21:12:59 +0200 | 
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-07-19 14:12:59 -0500 | 
| commit | 0edf7993c66bf8e78803d771d49f5e214dbe3815 (patch) | |
| tree | dabba8ea4d2a1ae27b4275a68bef2d8ac57978c5 /tests/hazmat/primitives/test_rsa.py | |
| parent | 6868b1f01904270b286a4bf9dbb355e792df8f36 (diff) | |
| download | cryptography-0edf7993c66bf8e78803d771d49f5e214dbe3815.tar.gz cryptography-0edf7993c66bf8e78803d771d49f5e214dbe3815.tar.bz2 cryptography-0edf7993c66bf8e78803d771d49f5e214dbe3815.zip | |
Enforce that p > q to improve OpenSSL compatibility (fixes #2990) (#3010)
Diffstat (limited to 'tests/hazmat/primitives/test_rsa.py')
| -rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index e4e43780..81e3f946 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1985,10 +1985,11 @@ class TestRSAPrimeFactorRecovery(object):              private["private_exponent"]          )          # Unfortunately there is no convention on which prime should be p -        # and which one q. The function we use always makes p < q, but the +        # and which one q. The function we use always makes p > q, but the          # NIST vectors are not so consistent. Accordingly, we verify we've          # recovered the proper (p, q) by sorting them and asserting on that.          assert sorted([p, q]) == sorted([private["p"], private["q"]]) +        assert p > q      def test_invalid_recover_prime_factors(self):          with pytest.raises(ValueError): | 
