From 3829bc2580491cd69981898dc66e67f16b5a28c4 Mon Sep 17 00:00:00 2001 From: Alex Stapleton Date: Wed, 5 Feb 2014 19:53:36 +0000 Subject: Check p*q=n in the tests --- tests/hazmat/primitives/test_rsa.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index c725c5f0..87d39730 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -50,6 +50,8 @@ class TestRSA(object): assert skey.key_size == pkey.key_size assert skey.key_size == pkey2.key_size + assert skey.p * skey.q == skey.modulus + def test_invalid_argument_types(self): with pytest.raises(TypeError): rsa.RSAPrivateKey(None, None, None, None, None) -- cgit v1.2.3