mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12667 from boomer41/fix-devicekey
Add check for return code in DeviceKey to avoid injecting invalid ROTpull/12684/head
commit
ae0ec86d59
|
@ -269,7 +269,10 @@ int DeviceKey::generate_root_of_trust()
|
||||||
|
|
||||||
mbedtls_entropy_free(entropy);
|
mbedtls_entropy_free(entropy);
|
||||||
delete entropy;
|
delete entropy;
|
||||||
ret = device_inject_root_of_trust(key_buff, actual_size);
|
|
||||||
|
if (ret == DEVICEKEY_SUCCESS) {
|
||||||
|
ret = device_inject_root_of_trust(key_buff, actual_size);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue