Permalink
Browse files

Correct result displayed in exception message.

  • Loading branch information...
1 parent 884982b commit b3163da83c85759d6314d5e2a7ddfbf2e5bb371a @fredrikt fredrikt committed Oct 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/unitedid/yhsm/internal/AESECBCmd.java
View
2 src/main/java/org/unitedid/yhsm/internal/AESECBCmd.java
@@ -111,7 +111,7 @@ private static String parseResult(byte[] data, int keyHandle, byte command, bool
if (data[20] == YSM_STATUS_OK) {
return decrypt ? new String(result).trim() : byteArrayToHex(result);
} else {
- throw new YubiHSMCommandFailedException("Command " + getCommandString(command) + " failed: " + getCommandStatus(result[4]));
+ throw new YubiHSMCommandFailedException("Command " + getCommandString(command) + " failed: " + getCommandStatus(data[20]));
}
}
}

0 comments on commit b3163da

Please sign in to comment.