Issue with gpg-agent and a python software
chaica
chaica at ohmytux.com
Tue Jun 30 19:46:15 CEST 2009
Hi,
I'm trying to implement gpg-agent support in a Python software but I've
trouble when my gpg key is not yet stored by the gpg-agent.
I'm using the Python module "os" using os.system() function like this :
os.system("gpg --use-agent ...")
The output is something like :
...
[SNIP]
You need a passphrase to unlock the secret key for
user: Foo Lastfoo (Paris, France) <foo at lastfoo.com>"
1024-bit DSA key, ID XXXXXXX, created 2007-09-28
gpg: cancelled by user
gpg: skipped "foo at lastfoo.com": bad passphrase
gpg: [stdin]: clearsign failed: bad passphrase
[SNIP]
...
So signing my text fails. But if I store my passphrase before launching
my software (e.g by signing a file from the command line in the same
shell with gpg), next time I use my software everything works fine. So
it appears it only fails when the passphrase is not stored yet. I
thought my software was going to provide the pinentry window but it is
not the case. And I don't know why.
Bye,
Carl Chenet
More information about the Gnupg-users
mailing list