cmd_esbc_validate.c 1013 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright 2015 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <command.h>
  8. #include <fsl_validate.h>
  9. static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
  10. char * const argv[])
  11. {
  12. if (argc < 2)
  13. return cmd_usage(cmdtp);
  14. return fsl_secboot_validate(cmdtp, flag, argc, argv);
  15. }
  16. /***************************************************/
  17. static char esbc_validate_help_text[] =
  18. "esbc_validate hdr_addr <hash_val> - Validates signature using\n"
  19. " RSA verification\n"
  20. " $hdr_addr Address of header of the image\n"
  21. " to be validated.\n"
  22. " $hash_val -Optional\n"
  23. " It provides Hash of public/srk key to be\n"
  24. " used to verify signature.\n";
  25. U_BOOT_CMD(
  26. esbc_validate, 3, 0, do_esbc_validate,
  27. "Validates signature on a given image using RSA verification",
  28. esbc_validate_help_text
  29. );