def GetSigner(context):
  if args.subparser_name in ["deploy", "repack", "buildanddeploy"]:
    if args.platform == "windows":
      print "Enter passphrase for code signing cert:"
      passwd = getpass.getpass()
      cert = config_lib.CONFIG.Get(
          "ClientBuilder.windows_signing_cert", context=context)
      key = config_lib.CONFIG.Get(
          "ClientBuilder.windows_signing_key", context=context)
      app_name = config_lib.CONFIG.Get(
          "ClientBuilder.windows_signing_application_name", context=context)
      return signing.WindowsCodeSigner(cert, key, passwd, app_name)
    elif args.platform == "linux" and args.package_format == "rpm":
      pub_keyfile = config_lib.CONFIG.Get(
          "ClientBuilder.rpm_signing_key_public_keyfile", context=context)
      gpg_name = config_lib.CONFIG.Get(
          "ClientBuilder.rpm_gpg_name", context=context)

      print "Enter passphrase for code signing key %s:" % (gpg_name)
      passwd = getpass.getpass()
      return signing.RPMCodeSigner(passwd, pub_keyfile, gpg_name)
    else:
      parser.error("Signing only supported on windows and linux rpms for "
                   "deploy, repack, buildanddeploy")
dataset/ETHPy150Open google/grr/grr/client/client_build.py/GetSigner/original