Making dig calls within GPG

Werner Koch wk at gnupg.org
Fri Sep 23 20:49:41 CEST 2016


On Fri, 23 Sep 2016 15:46, bshastry at sec.t-labs.tu-berlin.de said:

> Is there a documented way of making dig (dnsutils) calls from within
> GPG? Or a standard means to run a shell command and parse its output? I

No, you can of course run an external program like host or dig.  For all
other purposes GnuPG includes a thin layer around the standard or ADNS
resolver library.  This is done in dirmngr/dns-stuff.c and t-dns-stuff.c
for testing the code.  The code is alo abale to route DNS via Tor.

> looked at exec_write() call but its usage wasn't entirely clear after I
> read its code because of fork+exec+pipe at play and the pipe reading
> from stdin.

Look at tools/wks-receive.c as an example how you can call external
tools.  Or g13/sh-bolockdev.c for simple use cases.  Some of the
primitives don't yet work on Windows, though.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 162 bytes
Desc: not available
URL: </pipermail/attachments/20160923/bfbdf9d3/attachment-0001.sig>


More information about the Gnupg-devel mailing list