Closed FlorianUekermann closed 7 years ago
I found only two users of testScAesKey. Both only check if the return value is false, so I decided to return FALSE unless APDU_ANSWER_COMMAND_CORRECT == CcidAesDec (...) in which case TRUE is returned.
This does not fix issue #9 anymore. This should be applied after review, since the behavior with the old switch in testScAesKey statement is undefined in some cases.
You might want to check https://github.com/Nitrokey/nitrokey-storage-firmware for comparison. Some bugs might have been fixed independently there.
Made obsolete with #31 Closing.
This includes a missing return, which seems to fix #9
I am still not sure about the correctness of testScAesKey, so don't apply this yet. The switch statement looks very fishy. What exactly is the meaning of nRet and what do the callers of testScAesKey expect as return value?
All other changes should at least not introduce regressions (but also no fixes).