diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-02-19 10:16:58 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-02-19 10:16:58 -0800 |
commit | 90e9de13ffa9496f14728d92d90fb54f92ebf9ae (patch) | |
tree | 94f3edb8a8d5224fc819359287382d848ee04064 | |
parent | d750e9b3ded1bdae43a3bbd99b1f463c75317a2b (diff) | |
parent | 9318a1436f25ac31dacde04b5c783c5f652d62ab (diff) | |
download | cryptography-90e9de13ffa9496f14728d92d90fb54f92ebf9ae.tar.gz cryptography-90e9de13ffa9496f14728d92d90fb54f92ebf9ae.tar.bz2 cryptography-90e9de13ffa9496f14728d92d90fb54f92ebf9ae.zip |
Merge pull request #641 from dreid/explicit-passing-of-key-parameters
Explicitly pass the key parameters instead of using **kwargs.
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index e7787bdb..df3a70f5 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -123,13 +123,24 @@ class TestRSA(object): ) def test_load_pss_vect_example_keys(self, pkcs1_example): secret, public = pkcs1_example - secret.pop("examples") - skey = rsa.RSAPrivateKey(**secret) + skey = rsa.RSAPrivateKey( + p=secret["p"], + q=secret["q"], + private_exponent=secret["private_exponent"], + dmp1=secret["dmp1"], + dmq1=secret["dmq1"], + iqmp=secret["iqmp"], + public_exponent=secret["public_exponent"], + modulus=secret["modulus"] + ) assert skey _check_rsa_private_key(skey) - pkey = rsa.RSAPublicKey(**public) + pkey = rsa.RSAPublicKey( + public_exponent=public["public_exponent"], + modulus=public["modulus"] + ) assert pkey pkey2 = skey.public_key() |