Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

api changed in 1.4.2 #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions blue-app-samplesign/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ static const bagl_element_t*
io_seproxyhal_touch_approve(const bagl_element_t *e) {
unsigned int tx = 0;
// Update the hash
cx_hash(&hash.header, 0, G_io_apdu_buffer + 5, G_io_apdu_buffer[4], NULL);
cx_hash(&hash.header, 0, G_io_apdu_buffer + 5, G_io_apdu_buffer[4], NULL, 0);
if (G_io_apdu_buffer[2] == P1_LAST) {
// Hash is finalized, send back the signature
unsigned char result[32];
cx_hash(&hash.header, CX_LAST, G_io_apdu_buffer, 0, result);
cx_hash(&hash.header, CX_LAST, G_io_apdu_buffer, 0, result, 32);
tx = cx_ecdsa_sign((void*) &N_privateKey, CX_RND_RFC6979 | CX_LAST,
CX_SHA256, result, sizeof(result), G_io_apdu_buffer);
CX_SHA256, result, sizeof(result), G_io_apdu_buffer, sizeof(G_io_apdu_buffer), NULL);
G_io_apdu_buffer[0] &= 0xF0; // discard the parity information
hashTainted = 1;
}
Expand Down