Skip to content

Commit

Permalink
Make CoreRsaPrivateSigningKey Send and Sync
Browse files Browse the repository at this point in the history
by #96. This change makes the type both Send and Sync.
  • Loading branch information
ramosbugs committed Jan 16, 2023
1 parent f0d4b4c commit bc09d22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/jwk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ impl<T> RngClone for T where T: rand::RngCore + rand::CryptoRng + Clone {}
///
pub struct CoreRsaPrivateSigningKey {
key_pair: rsa::RsaPrivateKey,
rng: Box<dyn RngClone>,
rng: Box<dyn RngClone + Send + Sync>,
kid: Option<JsonWebKeyId>,
}
impl CoreRsaPrivateSigningKey {
Expand All @@ -429,7 +429,7 @@ impl CoreRsaPrivateSigningKey {

pub(crate) fn from_pem_internal(
pem: &str,
rng: Box<dyn RngClone>,
rng: Box<dyn RngClone + Send + Sync>,
kid: Option<JsonWebKeyId>,
) -> Result<Self, String> {
let key_pair = rsa::RsaPrivateKey::from_pkcs1_pem(pem).map_err(|err| err.to_string())?;
Expand Down

0 comments on commit bc09d22

Please sign in to comment.