New implementation

This commit is contained in:
Alexandre Paillier
2022-09-02 14:22:11 +02:00
parent a58d2ababb
commit 493ce85c3b
6 changed files with 312 additions and 186 deletions

View File

@@ -88,12 +88,10 @@ void handleGetAppConfiguration(uint8_t p1,
uint16_t dataLength,
unsigned int *flags,
unsigned int *tx);
void handleSignPersonalMessage(uint8_t p1,
bool handleSignPersonalMessage(uint8_t p1,
uint8_t p2,
const uint8_t *dataBuffer,
uint16_t dataLength,
unsigned int *flags,
unsigned int *tx);
const uint8_t *const payload,
uint8_t length);
void handleSignEIP712Message(uint8_t p1,
uint8_t p2,
const uint8_t *dataBuffer,

View File

@@ -664,12 +664,11 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
case INS_SIGN_PERSONAL_MESSAGE:
memset(tmpCtx.transactionContext.tokenSet, 0, MAX_ITEMS);
*flags |= IO_ASYNCH_REPLY;
handleSignPersonalMessage(G_io_apdu_buffer[OFFSET_P1],
G_io_apdu_buffer[OFFSET_P2],
G_io_apdu_buffer + OFFSET_CDATA,
G_io_apdu_buffer[OFFSET_LC],
flags,
tx);
G_io_apdu_buffer[OFFSET_LC]);
break;
case INS_SIGN_EIP_712_MESSAGE: