Skip to content

Conversation

Foxboron
Copy link
Owner

Fixes #80

@andsens
Copy link
Contributor

andsens commented Dec 20, 2024

Regarding #81 (comment)

I've realized that the internal implementation of certificates in ssh-tpm-agent is a bit problematic and doesn't work the same way as ssh-agent so I suspect I need to do some larger changes.

Do you think the refactor would change the external behavior of this patch? If not, maybe you could merge the current changes with an alpha notice. Otherwise I'm perfectly fine just running a fork for now.

Also curious to hear what those differences from ssh-agent are? :-)

@Foxboron
Copy link
Owner Author

Do you think the refactor would change the external behavior of this patch? If not, maybe you could merge the current changes with an alpha notice. Otherwise I'm perfectly fine just running a fork for now.

I can merge my slight rewrite into master.

Also curious to hear what those differences from ssh-agent are? :-)

The implementation is done so that the SSHTPMKey struct contains both the public key and the certificate. It implies a 1-to-1 relationship between one public key, and one certificate. So multiple certificates for one key would not work very well. It also implies that the agent will do the wrong thing if you try to remove the key or the certificate from the keyring.

Effectively need to decouple this and ensure that the signer/key list contains both.

Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron Foxboron force-pushed the morten/cert-signing branch from ffd354f to f98b8cf Compare December 21, 2024 14:35
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron Foxboron merged commit 3aba1f9 into master Dec 21, 2024
10 checks passed
@Foxboron Foxboron deleted the morten/cert-signing branch March 2, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssh-tpm-agent: Unable to find private key when using SSH certificate for git commit signing
2 participants