using gpg-agent from web server mod_wsgi script

Bernhard Reiter bernhard at intevation.de
Wed Apr 26 14:20:59 CEST 2023


Am Freitag 07 April 2023 01:20:07 schrieb Christian, Mark via Gnupg-users:
> I was hoping to gpg-preset-passphrase a gpg-agent running under the apache
> WSGI service account, so that a python gpgme web wsgi/cgi application could
> access the gpg-agent's private key in order to run various gpg operations. 
> It seems the python mod_wsgi script is not finding the gpg-agent.  I'm
> wondering if this is possible?

apache and mod_wsgi are most likely controlling the environment variables
for the python process closely and running on a different user and thus 
directory than your gpg-agent.

So the mod_wsgi process may not be able to access the agent's socket

> I'm using gpg2 2.2.27 and python gpgme_version 1.16.0

Other solution approach:
  Use a private key without passphrase.

Best,
Bernhard
[Answering an elder question where I haven't seen an answer to.]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20230426/bd5545c5/attachment.sig>


More information about the Gnupg-users mailing list