mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-06 21:40:56 +00:00
fixup! feat(core): add libtropic to unix build
This commit is contained in:
parent
c76fbb6dea
commit
446fe2788d
@ -220,12 +220,21 @@ void drivers_init() {
|
|||||||
|
|
||||||
#ifdef USE_TROPIC
|
#ifdef USE_TROPIC
|
||||||
|
|
||||||
tropic_init();
|
if (sectrue != tropic_secret_ok) {
|
||||||
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) {
|
if (tropic_handshake(tropic_secret) != TROPIC_SUCCESS) {
|
||||||
// ??
|
memzero(tropic_secret, sizeof(tropic_secret));
|
||||||
}
|
ensure(false, "tropic_handshake failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
memzero(tropic_secret, sizeof(tropic_secret));
|
memzero(tropic_secret, sizeof(tropic_secret));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -509,12 +509,21 @@ void drivers_init() {
|
|||||||
uint8_t tropic_secret[SECRET_TROPIC_KEY_LEN] = {0};
|
uint8_t tropic_secret[SECRET_TROPIC_KEY_LEN] = {0};
|
||||||
secbool tropic_secret_ok = secret_tropic_get(tropic_secret);
|
secbool tropic_secret_ok = secret_tropic_get(tropic_secret);
|
||||||
|
|
||||||
tropic_init();
|
if (sectrue != tropic_secret_ok) {
|
||||||
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) {
|
if (tropic_handshake(tropic_secret) != TROPIC_SUCCESS) {
|
||||||
// ??
|
memzero(tropic_secret, sizeof(tropic_secret));
|
||||||
}
|
ensure(false, "tropic_handshake failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
memzero(tropic_secret, sizeof(tropic_secret));
|
memzero(tropic_secret, sizeof(tropic_secret));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user