diff --git a/sdk/src/callback_signer.rs b/sdk/src/callback_signer.rs index 519b5690..eccd4846 100644 --- a/sdk/src/callback_signer.rs +++ b/sdk/src/callback_signer.rs @@ -26,7 +26,7 @@ use crate::{ /// The callback should return a signature for the given data. /// The callback should return an error if the data cannot be signed. pub type CallbackFunc = - dyn Fn(*const (), &[u8]) -> std::result::Result, Error>; + dyn Fn(*const (), &[u8]) -> std::result::Result, Error> + Send + Sync; /// Defines a signer that uses a callback to sign data. /// @@ -59,7 +59,7 @@ impl CallbackSigner { /// Create a new callback signer. pub fn new(callback: F, alg: SigningAlg, certs: T) -> Self where - F: Fn(*const (), &[u8]) -> std::result::Result, Error> + 'static, + F: Fn(*const (), &[u8]) -> std::result::Result, Error> + Send + Sync + 'static, T: Into>, { let certs = certs.into();