google / coset

A set of Rust types for supporting COSE
Apache License 2.0
28 stars 16 forks source link

Support for async signatures. #21

Closed scouten-adobe closed 2 years ago

scouten-adobe commented 3 years ago

Sorry to circle back with another feature request so soon, but I'm looking into signing via HSM, which is necessarily an async task. Any chance we could further adapt the new try_create_* functions to accept async closures?

daviddrysdale commented 3 years ago

I'm not super keen on async stuff bleeding into the API (particularly as my own use of the crate is eventually aiming at no_std). Is it possible to wrap your async task up into a sync FnOnce somehow?

Another thought is that the try_create_* helper methods are pretty small; I could make sure all the individual parts are pub and then you could create your own async versions?

daviddrysdale commented 2 years ago

Closing out for now; please shout if you weren't able to work around this.