Page MenuHome GnuPG

gpg 1.4 interactions between --passphrase-fd=0 and --use-agent are confused/confusing
Closed, WontfixPublic

Description

consider the following three commands in the 1.4.x series (the gpg-agent is
running; gpg.conf contains use-agent; the agent is seeded with the correct
passphrase):

A) gpg --passphrase-fd=0 --clearsign test.txt
C) gpg --use-agent --passphrase-fd=0 --clearsign test.txt
B) gpg --passphrase-fd=0 --use-agent --clearsign test.txt

They have three different behaviors:

A) prompts on the terminal, reads passphrase from stdin, does not query the
agent for the passphrase (if the stdin passphrase is wrong, the signing fails)

B) does not prompt on the terminal, reads passphrase from stdin, does not query
the agent for the passphrase (if the stdin passphrase is wrong, the signing fails)

C) does not prompt on the terminal, reads passphrase from stdin, queries the
agent for the passphrase (if the stdin passphrase is wrong, the signing succeeds
anyway)

It seems that there is some sort of "last-option wins" behavior, but it's not
particularly predictable which options (or permutation of the options) will have
which effect.

Details

Version
1.4.19

Event Timeline

dkg set Version to 1.4.19.
dkg added a subscriber: dkg.
marcus claimed this task.
marcus added a subscriber: marcus.

I don't think we want any behavioral changes to gpg 1.4 anymore. And in gpg2 all of this is different (use-agent is mandatory, passphrase-fd only used with batch).