Cleanup os_mem* functions

This commit is contained in:
BTChip github
2020-11-24 10:23:45 +01:00
committed by TamtamHero
parent 374580431d
commit d43f7f6698
22 changed files with 55 additions and 55 deletions

View File

@@ -158,7 +158,7 @@ void compareOrCopy(char* preapproved_string, char* parsed_string, bool silent_mo
have some for checksum purpose, so let's get rid of these diffs */
to_uppercase(preapproved_string, strlen(preapproved_string));
to_uppercase(parsed_string, strlen(parsed_string));
if(os_memcmp(preapproved_string, parsed_string, strlen(preapproved_string))){
if(memcmp(preapproved_string, parsed_string, strlen(preapproved_string))){
THROW(ERR_SILENT_MODE_CHECK_FAILED);
}
}

View File

@@ -15,14 +15,14 @@ unsigned int io_seproxyhal_touch_tx_ok(const bagl_element_t *e) {
privateKeyData, NULL);
cx_ecfp_init_private_key(CX_CURVE_256K1, privateKeyData, 32,
&privateKey);
os_memset(privateKeyData, 0, sizeof(privateKeyData));
memset(privateKeyData, 0, sizeof(privateKeyData));
unsigned int info = 0;
io_seproxyhal_io_heartbeat();
signatureLength =
cx_ecdsa_sign(&privateKey, CX_RND_RFC6979 | CX_LAST, CX_SHA256,
tmpCtx.transactionContext.hash,
sizeof(tmpCtx.transactionContext.hash), signature, sizeof(signature), &info);
os_memset(&privateKey, 0, sizeof(privateKey));
memset(&privateKey, 0, sizeof(privateKey));
// Parity is present in the sequence tag in the legacy API
if (tmpContent.txContent.vLength == 0) {
// Legacy API