SSH
SSH copied to clipboard
ssh-key: externally generated signatures for certificates
This adds an async function with_signer to the certificate builder to delegate the signature generation to an user defined function such an fido2 implementation to sign an certificate using an security key.
I'd really prefer to use an async closure instead of Fn(&[u8]) -> impl Future however that would require bumping rust-version to 1.84
I would suggest following the existing pattern for the SigningKey trait and defining an AsyncSigningKey trait which bounds on AsyncSigner<Signature>. Then you can add a certificate::Builder::sign_async method. This is similar to how equivalent functionality works in the x509-cert crate