diff options
-rw-r--r-- | cryptography/hazmat/primitives/asymmetric/rsa.py | 4 | ||||
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/rsa.py b/cryptography/hazmat/primitives/asymmetric/rsa.py index a4e6cb71..be7edad3 100644 --- a/cryptography/hazmat/primitives/asymmetric/rsa.py +++ b/cryptography/hazmat/primitives/asymmetric/rsa.py @@ -314,8 +314,6 @@ class RSAPrivateNumbers(object): " instance." ) - _check_private_key_components(p, q, d, dmp1, dmq1, iqmp, - public_numbers.e, public_numbers.n) self._p = p self._q = q self._d = d @@ -361,8 +359,6 @@ class RSAPublicNumbers(object): ): raise TypeError("RSAPublicNumbers arguments must be integers.") - _check_public_key_components(e, n) - self._e = e self._n = n diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index cfb51b0b..8f10fb10 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1681,12 +1681,12 @@ class TestRSAEncryption(object): @pytest.mark.rsa class TestRSANumbers(object): def test_rsa_public_numbers(self): - public_numbers = rsa.RSAPublicNumbers(e=3, n=15) - assert public_numbers.e == 3 + public_numbers = rsa.RSAPublicNumbers(e=1, n=15) + assert public_numbers.e == 1 assert public_numbers.n == 15 def test_rsa_private_numbers(self): - public_numbers = rsa.RSAPublicNumbers(e=3, n=15) + public_numbers = rsa.RSAPublicNumbers(e=1, n=15) private_numbers = rsa.RSAPrivateNumbers( p=3, q=5, @@ -1713,7 +1713,7 @@ class TestRSANumbers(object): rsa.RSAPublicNumbers(e=1, n=None) def test_private_numbers_invalid_types(self): - public_numbers = rsa.RSAPublicNumbers(e=3, n=15) + public_numbers = rsa.RSAPublicNumbers(e=1, n=15) with pytest.raises(TypeError): rsa.RSAPrivateNumbers( |