Skip to content

Commit

Permalink
address pr feedback
Browse files Browse the repository at this point in the history
* make error message parameterized
  • Loading branch information
jmayclin committed Jan 15, 2025
1 parent 49c39e6 commit 8d7b34b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bindings/rust-examples/async-pkey-offload/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ impl s2n_tls::callbacks::PrivateKeyCallback for KmsAsymmetricKey {
OperationType::Sign(Self::EXPECTED_SIG, hash_algorithm) => Ok(hash_algorithm),

// errors
OperationType::Sign(_, _) => Err(s2n_tls::error::Error::application(
"RSA signatures can not be used with EC keys".into(),
OperationType::Sign(s, _) => Err(s2n_tls::error::Error::application(
format!("Unsupported signature type: {:?}", s).into(),
)),
OperationType::Decrypt => Err(s2n_tls::error::Error::application(
"Decrypt can not be used with EC keys".into(),
"Decrypt operation not supported".into(),
)),
_ => Err(s2n_tls::error::Error::application(
format!("Unrecognized operation type: {:?}", operation.kind()).into(),
Expand Down

0 comments on commit 8d7b34b

Please sign in to comment.