Questions about gpg-wks-client usage
aheinecke at intevation.de
Wed Feb 15 17:18:16 CET 2017
On Wednesday 15 February 2017 16:48:45 Patrick Brunschwig wrote:
> I got a patch from Kai which integrates gpg-wks-client into Enigmail
> (thanks for this!). Now reviewing, and trying to understand the code, I
> noticed that the tool is invoked the following way:
> /path/to/gpg-wks-client --supported <email>
> and then then the exit status of gpg-wks-client is checked (0 = OK,
> other = did not work).
> Is this the correct way to determine if gpg-wks-client was successful?
Yes this is the correct way. It is the way QGpgME / KMail also check if wks is
> Or is this the better (safer) way:
> /path/to/gpg-wks-client --status-fd 2 --supported <email>
> and then the status output should be checked just like regular gpg-output?
This was added on my request thanks to a technical detail in GPGME that
created problems for me in GpgOL. In GPGME we have gpgme_op_spawn for a
platform independent spawn of a process. Nice API and easier to use then
CreateProcess / fork etc. But gpgme_op_spawn does not communicate the return
code of the spawned process. We added the status-fd as a workaround so that a
plain GPGME application can use gpgme_op_spawn to interact with the wks tools.
So its more of an optional workaround to check if wks is supported even if you
don't have access to the return code of the process.
Thanks for reviewing this and best regards,
Andre Heinecke | ++49-541-335083-262 | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 659 bytes
Desc: This is a digitally signed message part.
More information about the Gnupg-devel