Details for GPGME within Apache

Werner Koch wk at
Wed Jun 20 18:31:34 CEST 2007

On Wed, 20 Jun 2007 15:30, buanzo at said:

> I've created an apache module that links to gpgme. Some GPGME
> functions, like verification, work ok, but others, like import do
> not. I've found out that the GPGHOME environment variable should
> exist,

Another way to set the home directory is by using:

 -- Function: gpgme_error_t gpgme_set_engine_info
          (gpgme_protocol_t PROTO, const char *FILE_NAME,
          const char *HOME_DIR)
     The function `gpgme_set_engine_info' changes the default
     configuration of the crypto engine implementing the protocol PROTO.

     FILE_NAME is the file name of the executable program implementing
     this protocol, and HOME_DIR is the directory name of the
     configuration directory for this crypto engine.  If HOME_DIR is
     `NULL', the engine's default will be used.

     The new defaults are not applied to already created GPGME contexts.

     This function returns the error code `GPG_ERR_NO_ERROR' if
     successful, or an eror code on failure.

So a 

   gpgme_set_engine_info (GPGME_PROTOCOL_OpenPGP,

would do the trick.  This function is available since version 1.0.3.



More information about the Gnupg-devel mailing list