Press button when signing with HD.
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Emulation and test / build (push) Has been cancelled
Emulation and test / test (pkcs11) (push) Has been cancelled
Emulation and test / test (pytest) (push) Has been cancelled
Emulation and test / test (sc-hsm-pkcs11) (push) Has been cancelled

Fixes #103.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2025-08-26 13:38:50 +02:00
parent ca82a9c9c7
commit 7ecf361fec
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -305,6 +305,9 @@ int cmd_signature() {
mbedtls_ecp_keypair_free(&hd_context);
return SW_INCORRECT_PARAMS();
}
if (wait_button_pressed() == true) { // timeout
return SW_SECURE_MESSAGE_EXEC_ERROR();
}
md = MBEDTLS_MD_SHA256;
if (mbedtls_ecdsa_write_signature(&hd_context, md, apdu.data, apdu.nc, buf,
MBEDTLS_ECDSA_MAX_LEN,