From a36c3e40fec280d88332bfe9d95841a1eda30e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Mon, 10 Mar 2025 12:25:12 +0100 Subject: [PATCH] fixup! feat(core): add libtropic to the unix build --- core/embed/sec/tropic/tropic_transport.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/core/embed/sec/tropic/tropic_transport.c b/core/embed/sec/tropic/tropic_transport.c index b7a1bfc0d8..94747cea21 100644 --- a/core/embed/sec/tropic/tropic_transport.c +++ b/core/embed/sec/tropic/tropic_transport.c @@ -33,17 +33,7 @@ void tropic_init(void) { uint8_t tropic_secret_tropic_pubkey[SECRET_TROPIC_KEY_LEN] = {0}; uint8_t tropic_secret_trezor_privkey[SECRET_TROPIC_KEY_LEN] = {0}; - lt_ret_t ret = LT_FAIL; - - ret = lt_init(<_handle); - -#if !defined(TREZOR_EMULATOR) - ensure((ret == LT_OK) * sectrue, "lt_init failed"); -#else - if (ret != LT_OK) { - printf("Warning: lt_init failed: %d\n", ret); - } -#endif + ensure((lt_init(<_handle) == LT_OK) * sectrue, "lt_init failed"); ensure(secret_tropic_get_tropic_pubkey(tropic_secret_tropic_pubkey), "secret_tropic_get_tropic_pubkey failed"); @@ -53,16 +43,11 @@ void tropic_init(void) { uint8_t trezor_pubkey[SECRET_TROPIC_KEY_LEN] = {}; curve25519_scalarmult_basepoint(trezor_pubkey, tropic_secret_trezor_privkey); + lt_ret_t ret = LT_FAIL; ret = lt_session_start(<_handle, tropic_secret_tropic_pubkey, PKEY_INDEX_BYTE, tropic_secret_trezor_privkey, trezor_pubkey); memzero(tropic_secret_trezor_privkey, sizeof(tropic_secret_trezor_privkey)); -#if !defined(TREZOR_EMULATOR) ensure((ret == LT_OK) * sectrue, "lt_session_start failed"); -#else - if (ret != LT_OK) { - printf("Warning: lt_session_start failed: %d\n", ret); - } -#endif }