• Home
  • Raw
  • Download

Lines Matching refs:option

65 } option = {  variable
89 if (option.pem_signpriv) { in futil_cb_sign_pubkey()
90 if (option.pem_external) { in futil_cb_sign_pubkey()
94 option.pem_signpriv, in futil_cb_sign_pubkey()
95 option.pem_algo, option.flags, in futil_cb_sign_pubkey()
96 option.pem_external); in futil_cb_sign_pubkey()
98 option.signprivate = PrivateKeyReadPem( in futil_cb_sign_pubkey()
99 option.pem_signpriv, option.pem_algo); in futil_cb_sign_pubkey()
100 if (!option.signprivate) { in futil_cb_sign_pubkey()
106 vblock = KeyBlockCreate(data_key, option.signprivate, in futil_cb_sign_pubkey()
107 option.flags); in futil_cb_sign_pubkey()
111 vblock = KeyBlockCreate(data_key, option.signprivate, in futil_cb_sign_pubkey()
112 option.flags); in futil_cb_sign_pubkey()
116 return WriteSomeParts(option.outfile, in futil_cb_sign_pubkey()
172 if (!option.flags_specified) in futil_cb_sign_fw_vblock()
173 option.flags = preamble->flags; in futil_cb_sign_fw_vblock()
209 option.arch, option.kloadaddr, in futil_cb_create_kernel_part()
210 option.config_data, option.config_size, in futil_cb_create_kernel_part()
211 option.bootloader_data, option.bootloader_size, in futil_cb_create_kernel_part()
219 vblock_data = SignKernelBlob(kblob_data, kblob_size, option.padding, in futil_cb_create_kernel_part()
220 option.version, option.kloadaddr, in futil_cb_create_kernel_part()
221 option.keyblock, option.signprivate, in futil_cb_create_kernel_part()
222 option.flags, &vblock_size); in futil_cb_create_kernel_part()
232 if (!option.create_new_outfile) in futil_cb_create_kernel_part()
235 if (option.vblockonly) in futil_cb_create_kernel_part()
236 rv = WriteSomeParts(option.outfile, in futil_cb_create_kernel_part()
240 rv = WriteSomeParts(option.outfile, in futil_cb_create_kernel_part()
261 kblob_data = UnpackKPart(kpart_data, kpart_size, option.padding, in futil_cb_resign_kernel_part()
276 option.kloadaddr = preamble->body_load_address; in futil_cb_resign_kernel_part()
279 if (option.config_data && in futil_cb_resign_kernel_part()
281 option.config_data, in futil_cb_resign_kernel_part()
282 option.config_size)) { in futil_cb_resign_kernel_part()
288 if (!option.version_specified) in futil_cb_resign_kernel_part()
289 option.version = preamble->kernel_version; in futil_cb_resign_kernel_part()
293 if (option.flags_specified == 0) in futil_cb_resign_kernel_part()
294 option.flags = preamble->flags; in futil_cb_resign_kernel_part()
298 if (option.keyblock) in futil_cb_resign_kernel_part()
299 keyblock = option.keyblock; in futil_cb_resign_kernel_part()
302 vblock_data = SignKernelBlob(kblob_data, kblob_size, option.padding, in futil_cb_resign_kernel_part()
303 option.version, option.kloadaddr, in futil_cb_resign_kernel_part()
304 keyblock, option.signprivate, in futil_cb_resign_kernel_part()
305 option.flags, &vblock_size); in futil_cb_resign_kernel_part()
312 if (option.create_new_outfile) { in futil_cb_resign_kernel_part()
314 if (option.vblockonly) in futil_cb_resign_kernel_part()
315 rv = WriteSomeParts(option.outfile, in futil_cb_resign_kernel_part()
319 rv = WriteSomeParts(option.outfile, in futil_cb_resign_kernel_part()
341 option.signprivate); in futil_cb_sign_raw_firmware()
347 preamble = CreateFirmwarePreamble(option.version, in futil_cb_sign_raw_firmware()
348 option.kernel_subkey, in futil_cb_sign_raw_firmware()
350 option.signprivate, in futil_cb_sign_raw_firmware()
351 option.flags); in futil_cb_sign_raw_firmware()
358 rv = WriteSomeParts(option.outfile, in futil_cb_sign_raw_firmware()
359 option.keyblock, option.keyblock->key_block_size, in futil_cb_sign_raw_firmware()
394 preamble = CreateFirmwarePreamble(option.version, in write_new_preamble()
395 option.kernel_subkey, in write_new_preamble()
398 option.flags); in write_new_preamble()
422 option.loemdir ? option.loemdir : ".", in write_loem()
423 ab, option.loemid); in write_loem()
473 if (!option.devsignprivate || !option.devkeyblock) { in sign_bios_at_end()
479 option.devsignprivate, in sign_bios_at_end()
480 option.devkeyblock); in sign_bios_at_end()
483 option.signprivate, in sign_bios_at_end()
484 option.keyblock); in sign_bios_at_end()
489 option.signprivate, in sign_bios_at_end()
490 option.keyblock); in sign_bios_at_end()
495 if (option.loemid) { in sign_bios_at_end()
652 printf(usage_bios, option.version); in print_help()
653 printf(usage_new_kpart, option.kloadaddr, option.padding); in print_help()
654 printf(usage_old_kpart, option.padding); in print_help()
671 static const struct option long_opts[] = {
695 {"vblockonly", 0, &option.vblockonly, 1},
719 option.signprivate = PrivateKeyRead(optarg); in do_sign()
720 if (!option.signprivate) { in do_sign()
726 option.keyblock = KeyBlockRead(optarg); in do_sign()
727 if (!option.keyblock) { in do_sign()
733 option.kernel_subkey = PublicKeyRead(optarg); in do_sign()
734 if (!option.kernel_subkey) { in do_sign()
740 option.devsignprivate = PrivateKeyRead(optarg); in do_sign()
741 if (!option.devsignprivate) { in do_sign()
747 option.devkeyblock = KeyBlockRead(optarg); in do_sign()
748 if (!option.devkeyblock) { in do_sign()
754 option.version_specified = 1; in do_sign()
755 option.version = strtoul(optarg, &e, 0); in do_sign()
764 option.flags_specified = 1; in do_sign()
765 option.flags = strtoul(optarg, &e, 0); in do_sign()
773 option.loemdir = optarg; in do_sign()
776 option.loemid = optarg; in do_sign()
779 option.fv_specified = 1; in do_sign()
787 option.outfile = optarg; in do_sign()
790 option.bootloader_data = ReadFile( in do_sign()
791 optarg, &option.bootloader_size); in do_sign()
792 if (!option.bootloader_data) { in do_sign()
799 option.bootloader_size); in do_sign()
802 option.config_data = ReadConfigFile( in do_sign()
803 optarg, &option.config_size); in do_sign()
804 if (!option.config_data) { in do_sign()
815 option.arch = ARCH_X86; in do_sign()
818 option.arch = ARCH_ARM; in do_sign()
820 option.arch = ARCH_MIPS; in do_sign()
829 option.kloadaddr = strtoul(optarg, &e, 0); in do_sign()
837 option.padding = strtoul(optarg, &e, 0); in do_sign()
845 option.pem_signpriv = optarg; in do_sign()
848 option.pem_algo_specified = 1; in do_sign()
849 option.pem_algo = strtoul(optarg, &e, 0); in do_sign()
851 (option.pem_algo >= kNumAlgorithms)) { in do_sign()
858 option.pem_external = optarg; in do_sign()
895 if (!option.outfile && argc - optind > 0) { in do_sign()
897 option.outfile = argv[optind++]; in do_sign()
908 if (option.bootloader_data || option.config_data in do_sign()
909 || option.arch != ARCH_UNSPECIFIED) in do_sign()
911 else if (option.kernel_subkey || option.fv_specified) in do_sign()
925 option.create_new_outfile = 1; in do_sign()
926 if (option.signprivate && option.pem_signpriv) { in do_sign()
932 if ((option.signprivate && option.pem_algo_specified) || in do_sign()
933 (option.pem_signpriv && !option.pem_algo_specified)) { in do_sign()
938 if (option.pem_external && !option.pem_signpriv) { in do_sign()
962 errorcnt += no_opt_if(!option.signprivate, "signprivate"); in do_sign()
963 errorcnt += no_opt_if(!option.keyblock, "keyblock"); in do_sign()
964 errorcnt += no_opt_if(!option.kernel_subkey, "kernelkey"); in do_sign()
967 errorcnt += no_opt_if(!option.signprivate, "signprivate"); in do_sign()
968 if (option.vblockonly || inout_file_count > 1) in do_sign()
969 option.create_new_outfile = 1; in do_sign()
972 option.create_new_outfile = 1; in do_sign()
973 errorcnt += no_opt_if(!option.signprivate, "signprivate"); in do_sign()
974 errorcnt += no_opt_if(!option.keyblock, "keyblock"); in do_sign()
975 errorcnt += no_opt_if(!option.kernel_subkey, "kernelkey"); in do_sign()
976 errorcnt += no_opt_if(!option.version_specified, "version"); in do_sign()
979 option.create_new_outfile = 1; in do_sign()
980 errorcnt += no_opt_if(!option.signprivate, "signprivate"); in do_sign()
981 errorcnt += no_opt_if(!option.keyblock, "keyblock"); in do_sign()
982 errorcnt += no_opt_if(!option.version_specified, "version"); in do_sign()
983 errorcnt += no_opt_if(!option.bootloader_data, "bootloader"); in do_sign()
984 errorcnt += no_opt_if(!option.config_data, "config"); in do_sign()
985 errorcnt += no_opt_if(option.arch == ARCH_UNSPECIFIED, "arch"); in do_sign()
998 Debug("option.create_new_outfile=%d\n", option.create_new_outfile); in do_sign()
1001 if (!option.outfile) { in do_sign()
1002 if (option.create_new_outfile) { in do_sign()
1007 option.outfile = infile; in do_sign()
1011 Debug("option.outfile=%s\n", option.outfile); in do_sign()
1024 if (option.create_new_outfile) { in do_sign()
1039 state.in_filename = option.outfile; in do_sign()
1041 futil_copy_file_or_die(infile, option.outfile); in do_sign()
1042 Debug("open RW %s\n", option.outfile); in do_sign()
1043 ifd = open(option.outfile, O_RDWR); in do_sign()
1047 option.outfile, strerror(errno)); in do_sign()
1068 if (option.signprivate) in do_sign()
1069 free(option.signprivate); in do_sign()
1070 if (option.keyblock) in do_sign()
1071 free(option.keyblock); in do_sign()
1072 if (option.kernel_subkey) in do_sign()
1073 free(option.kernel_subkey); in do_sign()