mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-26 12:09:02 +00:00
fix(core/prodtest): fix prodtest run with unlocked bootloader
[no changelog]
This commit is contained in:
parent
be9255ae04
commit
5eb68975d9
@ -143,6 +143,12 @@ void pair_optiga(void) {
|
|||||||
uint8_t secret[SECRET_OPTIGA_KEY_LEN] = {0};
|
uint8_t secret[SECRET_OPTIGA_KEY_LEN] = {0};
|
||||||
|
|
||||||
if (secret_optiga_get(secret) != sectrue) {
|
if (secret_optiga_get(secret) != sectrue) {
|
||||||
|
if (secret_optiga_writable() != sectrue) {
|
||||||
|
// optiga pairing secret is unwritable, so fail
|
||||||
|
optiga_pairing_state = OPTIGA_PAIRING_ERR_WRITE_FLASH;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Generate the pairing secret.
|
// Generate the pairing secret.
|
||||||
if (OPTIGA_SUCCESS != optiga_get_random(secret, sizeof(secret))) {
|
if (OPTIGA_SUCCESS != optiga_get_random(secret, sizeof(secret))) {
|
||||||
optiga_pairing_state = OPTIGA_PAIRING_ERR_RNG;
|
optiga_pairing_state = OPTIGA_PAIRING_ERR_RNG;
|
||||||
|
Loading…
Reference in New Issue
Block a user