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

feat: Change SSHCertificateSigner to be an async trait #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rustyconover
Copy link

Allow the sign() method of the SSHCertificateSigner trait to be asynchronous. Propagate the changes through the package to use Tokio.

I'm not sure you're going to want to merge this, but there is an advantage to allowing asynchronous things to happen when signing certificates.

Allow the sign() method of the SSHCertificateSigner trait
to be asynchronous.  Propagate the changes through the package
to use Tokio.
@obelisk
Copy link
Owner

obelisk commented May 4, 2023

So I'm not thrilled using the feature flag in this way because of the breaking changes and that this is not currently stable but I do like the idea of providing an async signing API. Rustica actually had to get around this exact issue so that is why the add_signature method exists: https://github.com/obelisk/rustica/blob/x509_certificates/rustica/src/signing/amazon_kms.rs#L274

In Rustica I use async_trait when needed so I'd be more inclined to use that here. Alternatively perhaps having two traits, one which is async and can be pulled in separately to keep dependencies down could be a solution.

@obelisk obelisk self-assigned this May 4, 2023
@obelisk obelisk added enhancement New feature or request breaking labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants