Skip to content

Commit 4a40ceb

Browse files
authored
Merge pull request #40 from fastchain/extras-button-check
Security fix for issue 39
2 parents 98e9b72 + 87ffd21 commit 4a40ceb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hsm/cmd_extras.c

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#include "mbedtls/chachapoly.h"
2929

3030
int cmd_extras() {
31+
//check button (if enabled)
32+
if (wait_button_pressed() == true) {
33+
return SW_SECURE_MESSAGE_EXEC_ERROR();
34+
}
3135
if (P1(apdu) == 0xA) { //datetime operations
3236
if (P2(apdu) != 0x0) {
3337
return SW_INCORRECT_P1P2();

0 commit comments

Comments
 (0)