I spent the whole day of yesterday implementing the HTTP_OPENPGP_IMPORTKEY method. I had lots of issues, but I finally made it work.
The funny thing, as usual, the solution came to me during the night. I went to bed, and I couldn't sleep - A partner called me with one of his famous "server emergencies" so I got up and started helping him out. So, while waiting for a backup to restore (Bacula's great, by the way) I figured out the solution to the problem that made me crazy all day:
All GPGME operations worked ok from withing a shell.
But not from within Apache.
Ergo, Apache was not providing GPGME with some necessary environment element, say a variable.
So, I hacked my Apache's init script, and exported GPGHOME=/var/www/.gnupg, et voila!
Apache's SetEnv didn't work. I should check putting it into the global configuration, instead of the virtualhost container. Or maybe I could set it from withing the module itself, before creating a gpgme context...
So, I believe I will be releasing a new development version of Enigform and MAO this weekend.