aes: Allow to store randomly generated IV in the FIT
When the initialisation vector is randomly generated, its value shall be stored in the FIT together with the encrypted data. The changes allow to store the IV in the FIT also in the case where the key is not stored in the DTB but retrieved somewhere else at runtime. Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -540,7 +540,7 @@ fit_image_process_cipher(const char *keydir, void *keydest, void *fit,
|
||||
* size values
|
||||
* And, if needed, write the iv in the FIT file
|
||||
*/
|
||||
if (keydest) {
|
||||
if (keydest || (!keydest && !info.ivname)) {
|
||||
ret = info.cipher->add_cipher_data(&info, keydest, fit, node_noffset);
|
||||
if (ret) {
|
||||
fprintf(stderr,
|
||||
|
||||
Reference in New Issue
Block a user