From 45621fe96644e4e15b421ef665be841ab324564e Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 27 Apr 2023 21:08:30 -0400 Subject: Enhance PKey.from_path and test it better --- sites/www/changelog.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sites') diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index b1de893e..43f81115 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -77,15 +77,16 @@ Changelog `PKey.from_type_string ` instead of iterating key classes or using if/else cascades. - As part of this change, `~paramiko.pkey.PKey` and friends grew an + `PKey.from_path ` is also new, and offers a way + to load a file path without knowing *a priori* what type of key it is (thanks + to some handy methods within our cryptography dependency). + + As part of these changes, `~paramiko.pkey.PKey` and friends grew an `~paramiko.pkey.PKey.identifiers` classmethod; this is inspired by the `~paramiko.ecdsakey.ECDSAKey.supported_key_format_identifiers` classmethod (which now refers to the new method.) This also includes adding a ``.name`` attribute to most key classes (which will eventually replace ``.get_name()``. - In addition, there is a new convenience top-level API member, - ``paramiko.key_classes``, containing a list of all key classes. - - :feature:`-` `~paramiko.pkey.PKey` grew a new ``.algorithm_name`` property which displays the key algorithm; this is typically derived from the value of `~paramiko.pkey.PKey.get_name`. For example, ED25519 keys have a ``get_name`` -- cgit v1.2.3