sshcerts icon indicating copy to clipboard operation
sshcerts copied to clipboard

feat: Change SSHCertificateSigner to be an async trait

Open rustyconover opened this issue 3 years ago • 1 comments

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.

rustyconover avatar Apr 08 '23 17:04 rustyconover

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 avatar May 04 '23 23:05 obelisk