You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the conversion From<psa_crypto_sys::psa_status_t> for Status converts any unsupported integer to a GenericError - I think that's not entirely correct as it aliases an error occuring in the crate with one relayed by the linked library.
The correct thing to do would be to have TryFrom and return a crate-specific error for anything outside of the recognised codes, and the correct enum variant for the correct ones. However I do get that TryFrom is not actually available without std so maybe we should have a method implemented straight on Status when no-std is on and the normal TryFrom when std is available.
The text was updated successfully, but these errors were encountered:
I agree that it is not ideal but it is also a way to simplify error handling with less types to unwrap for the caller. It's nice that conceptually only PSA Crypto 1.0.0 abstracted types are used and not our own.
Currently the conversion
From<psa_crypto_sys::psa_status_t> for Status
converts any unsupported integer to aGenericError
- I think that's not entirely correct as it aliases an error occuring in the crate with one relayed by the linked library.The correct thing to do would be to have
TryFrom
and return a crate-specific error for anything outside of the recognised codes, and the correct enum variant for the correct ones. However I do get thatTryFrom
is not actually available withoutstd
so maybe we should have a method implemented straight onStatus
whenno-std
is on and the normalTryFrom
whenstd
is available.The text was updated successfully, but these errors were encountered: