Skip to content

Commit 218660e

Browse files
committed
Only allow change PHY without PIN. PIN is required for other extra options.
Signed-off-by: Pol Henarejos <[email protected]>
1 parent de89d61 commit 218660e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/hsm/cmd_extras.c

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

3030
int cmd_extras() {
31+
#ifndef ENABLE_EMULATION
32+
// Only allow change PHY without PIN
33+
if (!isUserAuthenticated && P1(apdu) != 0x1B) {
34+
return SW_SECURITY_STATUS_NOT_SATISFIED();
35+
}
36+
#endif
3137
if (P1(apdu) == 0xA) { //datetime operations
3238
if (P2(apdu) != 0x0) {
3339
return SW_INCORRECT_P1P2();

0 commit comments

Comments
 (0)