Ejemplo n.º 1
0
         # tools/process with a different cert.
         osslsigncode_signfile(inputfile,
                               tmpfile,
                               options.sha2signcode_keydir,
                               options.fake,
                               passphrase,
                               timestamp=options.signcode_timestamp,
                               includedummycert=includedummycert)
     else:
         parser.error("Invalid file for signing: %s" % filename)
         sys.exit(1)
 elif format_ == "gpg":
     if not options.gpg_homedir:
         parser.error("gpgdir required when format is gpg")
     safe_unlink(tmpfile)
     gpg_signfile(inputfile, tmpfile, options.gpg_homedir, options.fake,
                  passphrase)
 elif format_ == "emevoucher":
     safe_unlink(tmpfile)
     emevoucher_signfile(inputfile, tmpfile, options.emevoucher_key,
                         options.emevoucher_chain, options.fake, passphrase)
 elif format_ == "mar":
     if not options.mar_cmd:
         parser.error("mar_cmd is required when format is mar")
     safe_unlink(tmpfile)
     mar_signfile(inputfile, tmpfile, options.mar_cmd, options.fake,
                  passphrase)
 elif format_ == "mar_sha384":
     if not options.mar_sha384_cmd:
         parser.error(
             "mar_sha384_cmd is required when format is mar_sha384")
     safe_unlink(tmpfile)
Ejemplo n.º 2
0
         osslsigncode_signfile(
             inputfile,
             tmpfile,
             options.sha2signcode_keydir,
             options.fake,
             passphrase,
             timestamp=options.signcode_timestamp,
         )
     else:
         parser.error("Invalid file for signing: %s" % filename)
         sys.exit(1)
 elif format_ == "gpg":
     if not options.gpg_homedir:
         parser.error("gpgdir required when format is gpg")
     safe_unlink(tmpfile)
     gpg_signfile(inputfile, tmpfile, options.gpg_homedir, options.fake, passphrase)
 elif format_ == "emevoucher":
     safe_unlink(tmpfile)
     emevoucher_signfile(
         inputfile, tmpfile, options.emevoucher_key, options.emevoucher_chain, options.fake, passphrase
     )
 elif format_ == "mar":
     if not options.mar_cmd:
         parser.error("mar_cmd is required when format is mar")
     safe_unlink(tmpfile)
     mar_signfile(inputfile, tmpfile, options.mar_cmd, options.fake, passphrase)
 elif format_ == "b2gmar":
     if not options.b2gmar_cmd:
         parser.error("b2gmar_cmd is required when format is b2gmar")
     safe_unlink(tmpfile)
     mar_signfile(inputfile, tmpfile, options.b2gmar_cmd, options.fake, passphrase)