diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-04-16 22:14:21 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-05-05 12:27:14 -0400 |
commit | f012ebc2317418ecaf9f9a071bfb7b12dc9f0cce (patch) | |
tree | 4f2ad704fdf906934c528b2f02c4a37886ae48da /sites | |
parent | 0146cf72012e46505851abe17d8eb3555a481967 (diff) |
Enhance AgentKey with comment, inner_key attributes
- Comment was being read-but-not-stored from the agent reply. wat?
- Use newly added PKey constructor to instantiate a key subclass for the
'inner'/proxied key, this way client code can obtain stuff like bit
size, fingerprint, etc.
- Proxy to inner_key with __getattr__ so clients don't have to know
whether they're dealing with an AgentKey or a regular one
- Add `__repr__` to PKey instead of doing it in AgentKey. (wow, how did
we not have this ever?)
Diffstat (limited to 'sites')
-rw-r--r-- | sites/www/changelog.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 5a0907ff..39034a1c 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,21 @@ Changelog ========= +- :feature:`-` Enhanced `~paramiko.agent.AgentKey` with new attributes, such + as: + + - Added a ``comment`` attribute (and constructor argument); + `Agent.get_keys() <paramiko.agent.Agent.get_keys>` now uses this kwarg to + store any comment field sent over by the agent. The original version of + the agent feature inexplicably did not store the comment anywhere. + - Agent-derived keys now attempt to instantiate a copy of the appropriate + key class for access to other algorithm-specific members (eg key size). + This is available as the ``.inner_key`` attribute. + + .. note:: + This functionality is now in use in Fabric's new ``--list-agent-keys`` + feature, as well as in Paramiko's debug logging. + - :feature:`-` `~paramiko.pkey.PKey` now offers convenience "meta-constructors", static methods that simplify the process of instantiating the correct subclass for a given key type identifier or other |