jaymzh / pius

PGP Individual User Signer
Other
97 stars 25 forks source link

MODE_AGENT has a bad setting for gpg2 #106

Closed mpounsett closed 6 years ago

mpounsett commented 6 years ago

libpius.constants.MODE_AGENT is set to 2, which breaks the mode check in the main pius script:

  if signer.gpg2:
    if options.mode != MODE_AGENT:
      print("ERROR: gpg2 requires using an agent")
      sys.exit(1)
  else:
    warn_for_gpg1()

1 != 2, so this always fails.

jaymzh commented 6 years ago

It doesn't always fail. If options.mode is 1, that means you used cache_passphrase mode (-p) which isn't compatible with gpg2, you must use agent mode (-a) instead. In PIUS3, when we drop gpg1 support, -p and -i will be removed.

mpounsett commented 6 years ago

Okay.. this is odd. I reproduced this a half-dozen times (with -a, no-p) before submitting the bug and now I can't. Clearly I've either fallen through a hole in spacetime or need more caffeine.

I'll close it for now.

jaymzh commented 6 years ago

No worries. The README until about 10 minutes ago (see #107 ) claimed port was -p instead of -P, so maybe you'd used it while trying to set the port?

Anyway, glad it's sorted. :)