Skip to content

Commit

Permalink
Prestwich/invalid data (#134)
Browse files Browse the repository at this point in the history
* feature: badkeyhandle to invalid data

* coins-ledger@0.10.0
  • Loading branch information
prestwich authored Jan 31, 2024
1 parent 32463b1 commit d115d88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ledger/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coins-ledger"
version = "0.9.3"
version = "0.10.0"
authors = [
"Summa <team@summa.one>",
"James Prestwich <james@summa.one>",
Expand Down
10 changes: 5 additions & 5 deletions ledger/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ pub enum APDUResponseCodes {
ConditionsNotSatisfied = 0x6985,
/// CommandNotAllowed
CommandNotAllowed = 0x6986,
/// BadKeyHandle
BadKeyHandle = 0x6A80,
/// InvalidData
InvalidData = 0x6A80,
/// InvalidP1P2
InvalidP1P2 = 0x6B00,
/// InsNotSupported
Expand Down Expand Up @@ -261,8 +261,8 @@ impl APDUResponseCodes {
APDUResponseCodes::CommandNotAllowed => {
"[APDU_CODE_COMMAND_NOT_ALLOWED] Command not allowed (no current EF)"
}
APDUResponseCodes::BadKeyHandle => {
"[APDU_CODE_BAD_KEY_HANDLE] The parameters in the data field are incorrect"
APDUResponseCodes::InvalidData => {
"[APDU_CODE_INBALID_DATA] The parameters in the data field are incorrect"
}
APDUResponseCodes::InvalidP1P2 => "[APDU_CODE_INVALIDP1P2] Wrong parameter(s) P1-P2",
APDUResponseCodes::InsNotSupported => {
Expand Down Expand Up @@ -291,7 +291,7 @@ impl TryFrom<u16> for APDUResponseCodes {
0x6984 => Ok(APDUResponseCodes::DataInvalid),
0x6985 => Ok(APDUResponseCodes::ConditionsNotSatisfied),
0x6986 => Ok(APDUResponseCodes::CommandNotAllowed),
0x6A80 => Ok(APDUResponseCodes::BadKeyHandle),
0x6A80 => Ok(APDUResponseCodes::InvalidData),
0x6B00 => Ok(APDUResponseCodes::InvalidP1P2),
0x6D00 => Ok(APDUResponseCodes::InsNotSupported),
0x6E00 => Ok(APDUResponseCodes::ClaNotSupported),
Expand Down

0 comments on commit d115d88

Please sign in to comment.