diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2020-07-18 14:18:07 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2020-08-27 15:03:58 -0400 |
commit | 81064206bf3cec2ca4372257ff138481e1227b91 (patch) | |
tree | 5f453017cb0b41ed2efacca0740afadce3691cb6 | |
parent | 253a29b648dd20aa67d457d981e28b068e0b38a5 (diff) |
fix RSA key loading: p and q were being swapped
This currently works, because OpenSSL simply re-computes iqmp when it doesn't match the p & q values. However a future pyca/cryptography patch enforces this.
-rw-r--r-- | paramiko/rsakey.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index 9707b268..172f42d4 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -189,7 +189,7 @@ class RSAKey(PKey): except ValueError as e: raise SSHException(str(e)) elif pkformat == self._PRIVATE_KEY_FORMAT_OPENSSH: - n, e, d, iqmp, q, p = self._uint32_cstruct_unpack(data, "iiiiii") + n, e, d, iqmp, p, q = self._uint32_cstruct_unpack(data, "iiiiii") public_numbers = rsa.RSAPublicNumbers(e=e, n=n) key = rsa.RSAPrivateNumbers( p=p, |