SSH icon indicating copy to clipboard operation
SSH copied to clipboard

ssh-key: externally generated signatures for certificates

Open shimunn opened this issue 1 year ago • 1 comments

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

shimunn avatar Feb 08 '25 12:02 shimunn

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

tarcieri avatar Feb 08 '25 18:02 tarcieri