Merge pull request #40 from fastchain/extras-button-check

Security fix for issue 39
This commit is contained in:
Pol Henarejos 2024-06-17 11:30:31 +02:00 committed by GitHub
commit 4a40cebe1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,6 +28,10 @@
#include "mbedtls/chachapoly.h"
int cmd_extras() {
//check button (if enabled)
if (wait_button_pressed() == true) {
return SW_SECURE_MESSAGE_EXEC_ERROR();
}
if (P1(apdu) == 0xA) { //datetime operations
if (P2(apdu) != 0x0) {
return SW_INCORRECT_P1P2();