Skip to content

Commit

Permalink
Make CoseError thread safe
Browse files Browse the repository at this point in the history
Make it safe to send CoseErrors between threads

Fixes: #114

Signed-off-by: Miguel Martín <[email protected]>
  • Loading branch information
mmartinv authored and atanzu committed Feb 10, 2025
1 parent 9d4bcec commit 6064f82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ use aws_sdk_kms::{
/// Aggregation of all error types returned by this library
pub enum CoseError {
/// Failed to generate random bytes
EntropyError(Box<dyn Error>),
EntropyError(Box<dyn Error + Send + Sync>),
/// Computation of a cryptographic hash failed
HashingError(Box<dyn Error>),
HashingError(Box<dyn Error + Send + Sync>),
/// Signature could not be performed due to OpenSSL error.
SignatureError(Box<dyn Error>),
SignatureError(Box<dyn Error + Send + Sync>),
/// This feature is not yet fully implemented according
/// to the spec.
UnimplementedError,
Expand All @@ -35,7 +35,7 @@ pub enum CoseError {
/// Tag is missing or incorrect.
TagError(Option<u64>),
/// Encryption could not be performed due to OpenSSL error.
EncryptionError(Box<dyn Error>),
EncryptionError(Box<dyn Error + Send + Sync>),
/// TPM error occured
#[cfg(feature = "key_tpm")]
TpmError(tss_esapi::Error),
Expand Down

0 comments on commit 6064f82

Please sign in to comment.