diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-08-31 14:30:56 +0200 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-16 19:50:25 +0100 |
| commit | a5950c69af6663895eb158027489e703a2da284f (patch) | |
| tree | 3d9e5355879ac833c17a7858a4acaaee2a03b2c7 | |
| parent | 2df6b1fc43ab3cc7b07688a7c8d18f377a754c82 (diff) | |
| download | rockbox-a5950c69af6663895eb158027489e703a2da284f.zip rockbox-a5950c69af6663895eb158027489e703a2da284f.tar.gz rockbox-a5950c69af6663895eb158027489e703a2da284f.tar.bz2 rockbox-a5950c69af6663895eb158027489e703a2da284f.tar.xz | |
imxtools: rework key/IV overriding logic
The overriding of the IV and real key should be the exception, there is no
need to manually set them to false.
Change-Id: Id66754f20a79aa5c1a991839345d1242e0aa587d
| -rw-r--r-- | rbutil/mkimxboot/mkimxboot.c | 4 | ||||
| -rw-r--r-- | utils/imxtools/sbtools/sb.c | 2 | ||||
| -rw-r--r-- | utils/imxtools/sbtools/sbtoelf.c | 7 |
3 files changed, 0 insertions, 13 deletions
diff --git a/rbutil/mkimxboot/mkimxboot.c b/rbutil/mkimxboot/mkimxboot.c index d10ad9c..db18c76 100644 --- a/rbutil/mkimxboot/mkimxboot.c +++ b/rbutil/mkimxboot/mkimxboot.c @@ -275,10 +275,6 @@ static enum imx_error_t patch_std_zero_host_play(int jump_before, * call in the ____ section and get rid of everything else. In recovery mode, * we give 0xfee1dead as argument */ - /* Do not override real key and IV */ - sb_file->override_crypto_iv = false; - sb_file->override_real_key = false; - /* used to manipulate entries */ int nr_boot_inst = rb_fw_get_sb_inst_count(&boot_fw); diff --git a/utils/imxtools/sbtools/sb.c b/utils/imxtools/sbtools/sb.c index 183434e..c005b07 100644 --- a/utils/imxtools/sbtools/sb.c +++ b/utils/imxtools/sbtools/sb.c @@ -935,9 +935,7 @@ struct sb_file_t *sb_read_memory(void *_buf, size_t filesize, unsigned flags, vo printf(GREEN, " IV : "); print_hex(YELLOW, buf, 16, true); - sb_file->override_real_key = true; memcpy(sb_file->real_key, real_key, 16); - sb_file->override_crypto_iv = true; memcpy(sb_file->crypto_iv, buf, 16); } diff --git a/utils/imxtools/sbtools/sbtoelf.c b/utils/imxtools/sbtools/sbtoelf.c index 86c37f3..ac8db06 100644 --- a/utils/imxtools/sbtools/sbtoelf.c +++ b/utils/imxtools/sbtools/sbtoelf.c @@ -413,14 +413,7 @@ int main(int argc, char **argv) sb_dump(file, NULL, generic_std_printf); } if(loopback) - { - /* sb_read_file will fill real key and IV but we don't want to override - * them when looping back otherwise the output will be inconsistent and - * garbage */ - file->override_real_key = false; - file->override_crypto_iv = false; sb_write_file(file, loopback, 0, generic_std_printf); - } sb_free(file); } else if(force_sb1 || ver == SB_VERSION_1) |