diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2021-12-13 15:55:36 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2021-12-23 00:31:01 -0500 |
commit | 363a28d94cada17f012c1604a3c99c71a2bda003 (patch) | |
tree | 6979a1d39ced84c3b29d366a0026db5fd9a62851 /paramiko/pkey.py | |
parent | dfffaeaa0170c784307d1c89dad60528a59b6ff2 (diff) | |
download | paramiko-363a28d94cada17f012c1604a3c99c71a2bda003.tar.gz |
Add support for RSA SHA2 host and public keys
Includes a handful of refactors and new semiprivate
attributes on Transport and AuthHandler for better
test visibility.
Diffstat (limited to 'paramiko/pkey.py')
-rw-r--r-- | paramiko/pkey.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 5bdfb1d4..7865a6ea 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -196,13 +196,20 @@ class PKey(object): """ return u(encodebytes(self.asbytes())).replace("\n", "") - def sign_ssh_data(self, data): + def sign_ssh_data(self, data, algorithm=None): """ Sign a blob of data with this private key, and return a `.Message` representing an SSH signature message. - :param str data: the data to sign. + :param str data: + the data to sign. + :param str algorithm: + the signature algorithm to use, if different from the key's + internal name. Default: ``None``. :return: an SSH signature `message <.Message>`. + + .. versionchanged:: 2.9 + Added the ``algorithm`` kwarg. """ return bytes() |