1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 03:50:58 +00:00

fixup! feat(core): add libtropic to unix build

This commit is contained in:
Ioan Bizău 2024-12-19 15:41:18 +01:00
parent c76fbb6dea
commit 446fe2788d
2 changed files with 28 additions and 10 deletions

View File

@ -220,12 +220,21 @@ void drivers_init() {
#ifdef USE_TROPIC
tropic_init();
if (sectrue == tropic_secret_ok) {
if (tropic_handshake(tropic_secret) != TROPIC_SUCCESS) {
// ??
}
if (sectrue != tropic_secret_ok) {
memzero(tropic_secret, sizeof(tropic_secret));
ensure(false, "secret_tropic_get failed");
}
if (tropic_init() != TROPIC_SUCCESS) {
memzero(tropic_secret, sizeof(tropic_secret));
ensure(false, "tropic_init failed");
}
if (tropic_handshake(tropic_secret) != TROPIC_SUCCESS) {
memzero(tropic_secret, sizeof(tropic_secret));
ensure(false, "tropic_handshake failed");
}
memzero(tropic_secret, sizeof(tropic_secret));
#endif

View File

@ -509,12 +509,21 @@ void drivers_init() {
uint8_t tropic_secret[SECRET_TROPIC_KEY_LEN] = {0};
secbool tropic_secret_ok = secret_tropic_get(tropic_secret);
tropic_init();
if (sectrue == tropic_secret_ok) {
if (tropic_handshake(tropic_secret) != TROPIC_SUCCESS) {
// ??
}
if (sectrue != tropic_secret_ok) {
memzero(tropic_secret, sizeof(tropic_secret));
ensure(false, "secret_tropic_get failed");
}
if (tropic_init() != TROPIC_SUCCESS) {
memzero(tropic_secret, sizeof(tropic_secret));
ensure(false, "tropic_init failed");
}
if (tropic_handshake(tropic_secret) != TROPIC_SUCCESS) {
memzero(tropic_secret, sizeof(tropic_secret));
ensure(false, "tropic_handshake failed");
}
memzero(tropic_secret, sizeof(tropic_secret));
#endif
}