Skip to content
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

Handle pubkey blob in sign call being SSH cert #43

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

timweri
Copy link
Collaborator

@timweri timweri commented Nov 28, 2023

Right now the pubkey blob passed into sign_request can either be a PublicKey or a Certificate. Currently, it is always parsed as a PublicKey. So if a certificate is passed in, the parsing fails.

This PR makes sure certificate is handled correctly when passed as the pubkey blob into sign_request.

@timweri timweri force-pushed the bug-fixes branch 3 times, most recently from 3c1795d to 8bd4025 Compare November 29, 2023 00:08
@obelisk
Copy link
Owner

obelisk commented Nov 29, 2023

Please add a description.

@obelisk obelisk self-requested a review November 29, 2023 17:31
@obelisk obelisk added the bug Something isn't working label Nov 29, 2023
@@ -333,13 +334,27 @@ impl SshAgentHandler for Handler {

return Ok(Response::SignResponse { signature });
} else if let Signatory::Direct(privkey) = &self.signatory {
// Extract the pubkey fingerprint from either the SSH pubkey or the SSH cert
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull this out of the check and add it to the top of the function. Then we only need to do it once, and when we come back and fix this whole large if statement later it will be easier

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@timweri timweri merged commit 7027da4 into obelisk:develop Nov 30, 2023
8 checks passed
@timweri timweri deleted the bug-fixes branch November 30, 2023 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants