Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Masahiro Yamada's avatar
    6793d017
    tools: image: allow to sign image nodes without -K option · 6793d017
    Masahiro Yamada authored
    
    If -K option is missing when you sign image nodes, it fails with
    an unclear error message:
    
      tools/mkimage Can't add hashes to FIT blob: -1
    
    It is hard to figure out the cause of the failure.
    
    In contrast, when you sign configuration nodes, -K is optional because
    fit_config_process_sig() returns successfully if keydest is unset.
    Probably this is a preferred behavior when you want to update FIT with
    the same key; you do not have to update the public key in this case.
    
    So, this commit changes fit_image_process_sig() to continue signing
    without keydest.  If ->add_verify_data() fails, show a clearer error
    message, which has been borrowed from fit_config_process_sig().
    
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    6793d017
    History
    tools: image: allow to sign image nodes without -K option
    Masahiro Yamada authored
    
    If -K option is missing when you sign image nodes, it fails with
    an unclear error message:
    
      tools/mkimage Can't add hashes to FIT blob: -1
    
    It is hard to figure out the cause of the failure.
    
    In contrast, when you sign configuration nodes, -K is optional because
    fit_config_process_sig() returns successfully if keydest is unset.
    Probably this is a preferred behavior when you want to update FIT with
    the same key; you do not have to update the public key in this case.
    
    So, this commit changes fit_image_process_sig() to continue signing
    without keydest.  If ->add_verify_data() fails, show a clearer error
    message, which has been borrowed from fit_config_process_sig().
    
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>