aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-02-05 19:53:36 +0000
committerAlex Stapleton <alexs@prol.etari.at>2014-02-05 19:53:36 +0000
commit3829bc2580491cd69981898dc66e67f16b5a28c4 (patch)
tree4a8827fdd812efd563714834e5954621df278896 /tests
parent5d17ab3b354fe96e94689ad012163f42cc598a27 (diff)
downloadcryptography-3829bc2580491cd69981898dc66e67f16b5a28c4.tar.gz
cryptography-3829bc2580491cd69981898dc66e67f16b5a28c4.tar.bz2
cryptography-3829bc2580491cd69981898dc66e67f16b5a28c4.zip
Check p*q=n in the tests
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_rsa.py2
1 files changed, 2 insertions, 0 deletions
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)