-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for SSH certs #33
Conversation
It appears these keys are treated differently based on the algorithm in OpenSSH, see here.
Perhaps the algorithm should be read first, and used to determine if the key delivered is a certificate or a raw key - and wrap them both in an e.g.: pub enum KeyType {
Key(KeyData),
Certificate(Certificate)
} |
Yep, exactly. I tried to use KeyData which seem to have support for unknown types: #3 (comment) Your suggestion to use an enum may be exactly what's needed 👌 As I mentioned in the other comment SSH binary format is not regular and one can't parse it without knowing the schema and the specs are sometimes broken (just yesterday I found reserved values I'm restrict destination constraints that were in the source but not in the spec). |
This last commit should fix parsing, but this requires a fix upstream to expose a function: I wouldn't mind if we could put that on the back-burner, get those fixes upstream, and work slowly. |
e2b879a
to
a1c0beb
Compare
f7f159a
to
d0d4de9
Compare
Just FYI after merging a ton of PRs (some of them rebased) I've cleaned up this PR by basically rebasing on top of main and leaving just two commits: my, adding test vectors, and @baloo's which implements.
I think this is a good idea and thanks a lot for working on it! 🙇 |
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.
This looks just great 👌
I'll want to take a look at it on my computer but I think it's good to be merged. Great job 👏
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Signed-off-by: Arthur Gautier <[email protected]>
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
e5f626a
to
da7f6a9
Compare
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
da7f6a9
to
f86245b
Compare
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Okay, I've fixed a couple of small issues I've found and added test case for I'll approve this PR and if @baloo doesn't have anything against I propose we merge it :) Edit: I forgot formally I'm the "author" and cannot approve it... lol :) |
ship it |
This doesn't work but illustrates the way parsing
KeyData
from binary AddIdentity request with cert fails.