forked from pool/parsec
parsec service OBS-URL: https://build.opensuse.org/request/show/844364 OBS-URL: https://build.opensuse.org/package/show/security/parsec?expand=0&rev=1
17 lines
839 B
Diff
17 lines
839 B
Diff
diff --git a/src/providers/pkcs11/utils.rs b/src/providers/pkcs11/utils.rs
|
|
index 7f51e8d..1755226 100644
|
|
--- a/src/providers/pkcs11/utils.rs
|
|
+++ b/src/providers/pkcs11/utils.rs
|
|
@@ -284,7 +284,10 @@ impl CkMechanism {
|
|
/// of memory, hardware failure, corruption detection, lack of entropy and unsupported operations.
|
|
pub fn to_response_status(error: Error) -> ResponseStatus {
|
|
match error {
|
|
- Error::Io(e) => ResponseStatus::from(e),
|
|
+ Error::LibraryLoading{err} => {
|
|
+ format_error!("PKCS11 error to PsaErrorCommunicationFailure", err);
|
|
+ ResponseStatus::PsaErrorCommunicationFailure
|
|
+ },
|
|
Error::Module(e) | Error::InvalidInput(e) => {
|
|
format_error!("Conversion of error to PsaErrorCommunicationFailure", e);
|
|
ResponseStatus::PsaErrorCommunicationFailure
|