mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-27 20:49:02 +00:00
feat(legacy): enable DebugLinkReseedRandom
This commit is contained in:
parent
658c50fc1f
commit
e81bb0f856
1
legacy/firmware/.changelog.d/2115.added
Normal file
1
legacy/firmware/.changelog.d/2115.added
Normal file
@ -0,0 +1 @@
|
|||||||
|
\[emulator] Added support for `DebugLinkReseedRandom`.
|
@ -94,6 +94,7 @@ void fsm_msgDebugLinkStop(const DebugLinkStop *msg);
|
|||||||
void fsm_msgDebugLinkMemoryWrite(const DebugLinkMemoryWrite *msg);
|
void fsm_msgDebugLinkMemoryWrite(const DebugLinkMemoryWrite *msg);
|
||||||
void fsm_msgDebugLinkMemoryRead(const DebugLinkMemoryRead *msg);
|
void fsm_msgDebugLinkMemoryRead(const DebugLinkMemoryRead *msg);
|
||||||
void fsm_msgDebugLinkFlashErase(const DebugLinkFlashErase *msg);
|
void fsm_msgDebugLinkFlashErase(const DebugLinkFlashErase *msg);
|
||||||
|
void fsm_msgDebugLinkReseedRandom(const DebugLinkReseedRandom *msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ethereum
|
// ethereum
|
||||||
|
@ -100,4 +100,20 @@ void fsm_msgDebugLinkFlashErase(const DebugLinkFlashErase *msg) {
|
|||||||
uint32_t dummy = svc_flash_lock();
|
uint32_t dummy = svc_flash_lock();
|
||||||
(void)dummy;
|
(void)dummy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fsm_msgDebugLinkReseedRandom(const DebugLinkReseedRandom *msg) {
|
||||||
|
#if EMULATOR
|
||||||
|
RESP_INIT(Success);
|
||||||
|
random_reseed(msg->value);
|
||||||
|
msg_debug_write(MessageType_MessageType_Success, resp);
|
||||||
|
#else
|
||||||
|
(void)msg;
|
||||||
|
RESP_INIT(Failure);
|
||||||
|
resp->code = FailureType_Failure_UnexpectedMessage;
|
||||||
|
resp->has_message = true;
|
||||||
|
strlcpy(resp->message, "ReseedRandom not supported on hardware",
|
||||||
|
sizeof(resp->message));
|
||||||
|
msg_debug_write(MessageType_MessageType_Failure, resp);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,7 +3,7 @@ Q := @
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \
|
SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \
|
||||||
DebugLinkRecordScreen DebugLinkReseedRandom DebugLinkShowText DebugLinkEraseSdCard DebugLinkWatchLayout \
|
DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkWatchLayout \
|
||||||
GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin DoPreauthorized \
|
GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin DoPreauthorized \
|
||||||
CancelAuthorization DebugLinkLayout GetNonce \
|
CancelAuthorization DebugLinkLayout GetNonce \
|
||||||
TxAckInput TxAckOutput TxAckPrev TxAckPaymentRequest \
|
TxAckInput TxAckOutput TxAckPrev TxAckPaymentRequest \
|
||||||
|
Loading…
Reference in New Issue
Block a user