-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support SSH certificate parsing #7960
Conversation
9cd0ee6
to
8053f3d
Compare
Is there any reason this has to be a separate function? It feels to me like If I have a pile of SSH public keys as files, I'd much rather use:
than have to catch the
If this must be a separate function, at least give us a better way to distinguish certificate public keys from non-certificate public keys. If, instead, all public keys and the
|
There's no hard requirement that this has to be a separate function, but having it return |
A, yes, code that currently expects the unwrapped public key without certificate metadata is going to be unhappy. However, wouldn't a default-False option on the function not be better option then? E.g., expressed as overloads:
(not married to |
DSA (deliberately) not supported
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
@mjpieters Trying to align our types to allow Go-like interfaces here would be very difficult and would result in odd situations like You've definitely convinced me that we should support both in a single function though, so this PR has been updated to implement that as |
|
||
def _get_ec_hash_alg(curve: ec.EllipticCurve) -> hashes.HashAlgorithm: | ||
if isinstance(curve, ec.SECP256R1): | ||
return hashes.SHA256() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently this is uncovered?
No description provided.