diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-12-17 17:05:39 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-12-17 17:05:39 -0600 |
commit | 230174cec0a9a909bbf8e8f9137da29275d27ba9 (patch) | |
tree | 24662fb4a4ddd6ed8be0e8833333118f5bc0ceb4 | |
parent | 4d8de138910628db04a1c861303e744e7f10729a (diff) | |
parent | 96d87f57baa6013300f30a621335f76b43c9eb5d (diff) | |
download | cryptography-230174cec0a9a909bbf8e8f9137da29275d27ba9.tar.gz cryptography-230174cec0a9a909bbf8e8f9137da29275d27ba9.tar.bz2 cryptography-230174cec0a9a909bbf8e8f9137da29275d27ba9.zip |
Merge pull request #1537 from alex/cleanup-ssh-serialization
Use the slightly more natural API here
-rw-r--r-- | src/cryptography/hazmat/primitives/serialization.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/primitives/serialization.py b/src/cryptography/hazmat/primitives/serialization.py index 9d384fc7..f080ea86 100644 --- a/src/cryptography/hazmat/primitives/serialization.py +++ b/src/cryptography/hazmat/primitives/serialization.py @@ -85,7 +85,7 @@ def _load_ssh_rsa_public_key(decoded_data, backend): if rest: raise ValueError('Key body contains extra bytes.') - return backend.load_rsa_public_numbers(RSAPublicNumbers(e, n)) + return RSAPublicNumbers(e, n).public_key(backend) def _load_ssh_dss_public_key(decoded_data, backend): @@ -105,7 +105,7 @@ def _load_ssh_dss_public_key(decoded_data, backend): parameter_numbers = DSAParameterNumbers(p, q, g) public_numbers = DSAPublicNumbers(y, parameter_numbers) - return backend.load_dsa_public_numbers(public_numbers) + return public_numbers.public_key(backend) def _read_next_string(data): |