- rc = start_url_load(boot_task, "kernel image", image, &boot_task->image)
- || start_url_load(boot_task, "initrd", initrd, &boot_task->initrd)
- || start_url_load(boot_task, "dtb", dtb, &boot_task->dtb);
+ rc = start_url_load(boot_task, _("kernel image"),
+ image, &boot_task->image)
+ || start_url_load(boot_task, _("initrd"), initrd, &boot_task->initrd)
+ || start_url_load(boot_task, _("dtb"), dtb, &boot_task->dtb);
+
+ if (boot_task->verify_signature) {
+ /* Generate names of associated signature files and load */
+ if (image) {
+ image_sig = gpg_get_signature_url(ctx, image);
+ rc |= start_url_load(boot_task,
+ _("kernel image signature"), image_sig,
+ &boot_task->image_signature);
+ }
+ if (initrd) {
+ initrd_sig = gpg_get_signature_url(ctx, initrd);
+ rc |= start_url_load(boot_task, _("initrd signature"),
+ initrd_sig, &boot_task->initrd_signature);
+ }
+ if (dtb) {
+ dtb_sig = gpg_get_signature_url(ctx, dtb);
+ rc |= start_url_load(boot_task, _("dtb signature"),
+ dtb_sig, &boot_task->dtb_signature);
+ }
+ }
+
+ if (boot_task->verify_signature || boot_task->decrypt_files) {
+ rc |= start_url_load(boot_task,
+ _("kernel command line signature"), cmdline_sig,
+ &boot_task->cmdline_signature);
+ }