• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/H03-May-2022-3,6602,494

m4/H03-Apr-2019-9,6938,775

spec/example/H03-May-2022-1,007740

src/H03-May-2022-89,81962,165

stubby/H03-Apr-2019-2,8672,316

AUTHORSH A D03-Apr-2019266 87

COPYINGH A D03-Apr-20191.4 KiB2522

ChangeLogH A D03-Apr-201932.4 KiB666629

INSTALLH A D03-Apr-201916.4 KiB402311

LICENSEH A D03-Apr-20191.4 KiB2522

Makefile.inH A D03-May-202210.3 KiB306233

NEWSH A D03-Apr-201935 21

README.mdH A D03-Apr-201917 KiB372248

config.guessH A D03-Apr-201943.2 KiB1,4811,288

config.subH A D03-Apr-201935.3 KiB1,8021,661

configureH A D03-Apr-2019551.9 KiB19,88116,612

configure.acH A D03-Apr-201957.2 KiB1,8891,724

getdns.pc.inH A D03-Apr-2019233 129

getdns_ext_event.pc.inH A D03-Apr-2019253 129

install-shH A D03-Apr-201915 KiB519337

libtoolH A D03-Apr-2019337.2 KiB11,8448,310

ltmain.shH A D03-Apr-2019322.4 KiB11,3478,138

README.md

1getdns
2======
3
4# Overview of getdns
5
6* GitHub:  <https://github.com/getdnsapi/getdns>
7
8getdns is an implementation of a modern asynchronous DNS API; the specification was originally edited by Paul Hoffman.  It is intended to make all types of DNS information easily available to application developers and non-DNS experts.
9
10## Why you might want getdns
11
12Traditional access to DNS data from applications has several limitations:
13
14* APIs require applications to have considerable sophistication about DNS data and data types
15
16* Some kinds of data about the response (notably, the resource record set time to live) is not exposed via any API, so applications need to process raw protocol responses to get such data
17
18* APIs are often blocking, meaning asynchronous access is not possible without some work
19
20* Sophisticated uses of the DNS (things like IDNA and DNSSEC validation) require considerable application work, possibly by application developers with little experience with the vagaries of DNS.
21
22getdns also provides an experimental DNS Privacy enabled client called 'stubby' - see below for more details.
23
24## Motivation for providing the API
25
26The developers are of the opinion that DNSSEC offers a unique global infrastructure for establishing and enhancing cryptographic trust relations.  With the development of this API we intend to offer application developers a modern and flexible interface that enables end-to-end trust in the DNS architecture, and which will inspire application developers to implement innovative security solutions in their applications.
27
28### API Documentation
29
30Note that this implementation offers additional functionality to supplement that in the [official getdns API](https://getdnsapi.net/documentation/spec/). Some additions are convenient utility functions but other functionality is experimental prior to be being recommended for inclusion in the official API.  The [Doxygen documentation](https://getdnsapi.net/doxygen/modules.html)  provides the details of the full API for this implementation.
31
32## License
33
34This implementation is licensed under the New BSD License (BSD-new).
35
36Obtaining and getting started with getdns
37=========================================
38The project home page at [getdnsapi.net](https://getdnsapi.net) provides documentation, binary downloads, and news regarding the getdns API implementation.  This README file captures the goals and direction of the project and the current state of the implementation.
39
40If you are just getting started with the library take a look at the section below that describes building and handling external dependencies for the library.
41
42### Examples
43Once it is built you should take a look at src/examples to see how the library is used.
44
45
46# Download
47
48Download the sources from our [github repo](https://github.com/getdnsapi/getdns)
49or from [getdnsapi.net](https://getdnsapi.net) and verify the download using
50the checksums (SHA1 or MD5) or using gpg to verify the signature.  Our keys are
51available from the [pgp keyservers](https://keyserver.pgp.com)
52
53* willem@nlnetlabs.nl, key id E5F8F8212F77A498
54
55# Releases
56
57Release numbering follows the [Semantic Versioning](http://semver.org/)
58approach.  The code is currently under active development.
59
60The following requirements were met as conditions for the present release:
61
62* code compiles cleanly on at least the primary target platforms: OSX, RHEL/CentOS Linux, FreeBSD
63* examples must compile and run cleanly
64* there must be clear documentation of supported and unsupported elements of the API
65
66# Building and External Dependencies
67
68If you are installing from packages, you have to install the library and also the library-devel (or -dev) for your package management system to get the the necessary compile time files.
69
70External dependencies are linked outside the getdns API build tree (we rely on configure to find them).  We would like to keep the dependency tree short.  Please refer to section for building on Windows for separate dependency and build instructions for that platform.
71
72* [libunbound from NLnet Labs](https://unbound.net/) version 1.4.16 or later.
73* [libidn from the FSF](https://www.gnu.org/software/libidn/) version 1 or 2 (from version 2.0.0 and higher).  (Note that the libidn version means the conversions between A-labels and U-labels may permit conversion of formally invalid labels under IDNA2008.)
74* [libssl and libcrypto from the OpenSSL Project](https://www.openssl.org/) version 0.9.7 or later. (Note: version 1.0.1 or later is required for TLS support, version 1.0.2 or later is required for TLS hostname authentication)
75* Doxygen is used to generate documentation; while this is not technically necessary for the build it makes things a lot more pleasant.
76
77For example, to build on a recent version of Ubuntu, you would need the following packages:
78
79    # apt install build-essential libunbound-dev libidn2-dev libssl-dev libtool m4 autoconf
80
81If you are building from git, you need to do the following before building:
82
83
84    # git submodule update --init
85
86    # libtoolize -ci # (use glibtoolize for OS X, libtool is installed as glibtool to avoid name conflict on OS X)
87    # autoreconf -fi
88
89
90As well as building the getdns library three other tools may be installed:
91
92* getdns_query: a command line test script wrapper for getdns
93* stubby: an experimental DNS Privacy enabled client
94* getdns_server_mon: test DNS server function and capabilities
95
96Note: If you only want to build stubby, then use the `--with-stubby` option when running 'configure'.
97
98
99## Minimizing dependencies
100
101* getdns can be configured for stub resolution mode only with the `--enable-stub-only` option to configure.  This removes the dependency on `libunbound`.
102* Currently getdns only offers two helper functions to deal with IDN: `getdns_convert_ulabel_to_alabel` and `getdns_convert_alabel_to_ulabel`.  If you do not need these functions, getdns can be configured to compile without them with the `--without-libidn` and `--without-libidn2` options to configure.
103* When `--enable-stub-only`, `--without-libidn` and `--without-libidn2` options are used, getdns has only one dependency left, which is OpenSSL.
104
105## Extensions and Event loop dependencies
106
107The implementation works with a variety of event loops, each built as a separate shared library.  See [this Doxygen page](https://getdnsapi.net/doxygen/group__eventloops.html) and [this man page](https://getdnsapi.net/documentation/manpages/#ASYNCHRONOUS USE) for more details.
108
109* [libevent](http://libevent.org).  Note: the examples *require* this and should work with either libevent 1.x or 2.x.  2.x is preferred.
110* [libuv](https://github.com/joyent/libuv)
111* [libev](http://software.schmorp.de/pkg/libev.html)
112
113## Stubby
114
115* Stubby is an experimental implementation of a DNS Privacy enabled stub resolver than encrypts DNS queries using TLS. It is currently suitable for advanced/technical users - all feedback is welcome!
116* Details on how to use Stubby can be found in the [Stubby Reference Guide](https://dnsprivacy.org/wiki/x/JYAT).
117* Also see [dnsprivacy.org](https://dnsprivacy.org) for more information on DNS Privacy.
118
119## Regression Tests
120
121A suite of regression tests are included with the library, if you make changes or just
122want to sanity check things on your system take a look at src/test.  You will need
123to install [libcheck](https://libcheck.github.io/check/).  The check library is also available from many of the package repositories for the more popular operating systems.
124
125## DNSSEC dependencies
126
127For the library to be DNSSEC capable, it needs to know the root trust anchor.
128The library will try to load the root trust anchor from
129`/etc/unbound/getdns-root.key` by default.  This file is expected to have one
130or more `DS` or `DNSKEY` resource records in presentation (i.e. zone file)
131format.  Note that this is different than the format of BIND.keys.
132
133##$ Zero configuration DNSSEC
134
135When the root trust anchor is not installed in the default location and a DNSSEC query is done, getdns will try to use the trust anchors published here: http://data.iana.org/root-anchors/root-anchors.xml .
136It will validate these anchors with the ICANN Certificate Authority certificate following the procedure described in [RFC7958].
137The `root-anchors.xml` and `root-anchors.p7s` S/MIME signature will be cached in the `$HOME/.getdns` directory on Unixes, and the `%appdata%\getdns` directory on Windows.
138
139When using trust-anchors from the `root-anchors.xml` file, getdns will track the keys in the root DNSKEY rrset and store a copy in `$HOME/.getdns/root.key` on Unixes, and `%appdata%\getdns\root.key` on Windows.
140Only when the KSK DNSKEY's change, a new version of `root-anchors.xml` is tried to be retrieved from [data.iana.org](https://data.iana.org/root-anchors/).
141
142A installed trust-anchor from the default location (`/etc/unbound/getdns-root.key`) that fails to validate the root DNSKEY RRset, will also trigger the "Zero configuration DNSSEC" procedure described above.
143
144Support
145=======
146
147## Mailing lists
148
149We have a [getdns users list](https://getdnsapi.net/mailman/listinfo/users) for this implementation.
150
151The [getdns-api mailing list](https://getdnsapi.net/mailman/listinfo/spec) is a good place to engage in discussions regarding the design of the API.
152
153## Tickets and Bug Reports
154
155Tickets and bug reports should be reported via the [GitHub issues list](https://github.com/getdnsapi/getdns/issues).
156
157Features of this release
158========================
159
160## Goals
161
162The goals of this implementation of the getdns API are:
163
164* Provide an open source implementation, in C, of the formally described getdns API by getdns API team at <https://getdnsapi.net/spec.html>
165* Support FreeBSD, OSX, Linux (CentOS/RHEL, Ubuntu) via functional "configure" script
166* Support Windows 8.1
167* Include examples and tests as part of the build
168* Document code using doxygen
169* Leverage github as much as possible for project coordination
170* Follow the BSD coding style/standards <ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/style>
171
172Non-goals (things we will not be doing at least initially) include:
173
174* implementation of the traditional DNS related routines (gethostbyname, etc.)
175
176## Language Bindings
177
178In parallel, the team is actively developing bindings for various languages.
179For more information, visit this
180[webpage](https://getdnsapi.net/bindings/).
181
182## Unsupported getDNS Features
183
184The following API calls are documented in getDNS but *not supported* by the implementation at this time:
185
186* Detecting changes to resolv.conf and hosts
187* MDNS, NIS and NetBIOS namespaces (only DNS and LOCALFILES are supported)
188
189### Minor omissions
190
191The following minor implementation omissions are noted:
192
193Recursive mode does not support:
194* TLS as a transport
195* Non-zero connection idle timeouts or query pipelining
196* Anything other than query_type and resolution_type in the return_call_reporting extension
197
198Stub mode does not support:
199* Non zero idle timeouts for synchronous calls
200
201# Known Issues
202
203* None
204
205# Supported Platforms
206
207The primary platforms targeted are Linux and FreeBSD, other platform are supported as we get time.  The names listed here are intended to help ensure that we catch platform specific breakage, not to limit the work that folks are doing.
208
209* RHEL/CentOS 6.4
210* OSX 10.8
211* Ubuntu 16.04
212* Microsoft Windows 8.1
213
214We intend to add Android and other platforms to future releases as we have time to port it.
215
216
217##  Platform Specific Build Reports
218
219[![Build Status](https://travis-ci.org/getdnsapi/getdns.png?branch=master)](https://travis-ci.org/getdnsapi/getdns)
220
221### FreeBSD
222
223If you're using [FreeBSD](https://www.freebsd.org/), you may install getdns via the [ports tree](https://www.freshports.org/dns/getdns/) by running: `cd /usr/ports/dns/getdns && make install clean`
224
225If you are using FreeBSD 10 getdns can be intalled via 'pkg install getdns'.
226
227### CentOS and RHEL 6.5
228
229We rely on the most excellent package manager fpm to build the linux packages, which
230means that the packaging platform requires ruby 2.1.0.  There are other ways to
231build the packages; this is simply the one we chose to use.
232
233    # cat /etc/redhat-release
234    CentOS release 6.5 (Final)
235    # uname -a
236    Linux host-10-1-1-6 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
237    # cd getdns-0.2.0rc1
238    # ./configure --prefix=/home/deploy/build
239    # make; make install
240    # cd /home/deploy/build
241    # mv lib lib64
242    # . /usr/local/rvm/config/alias
243    # fpm -x "*.la" -a native -s dir -t rpm -n getdns -v 0.2.0rc1 -d "unbound" -d "libevent" -d "libidn" --prefix /usr --vendor "Verisign Inc., NLnet Labs" --license "BSD New" --url "https://getdnsapi.net" --description "Modern asynchronous API to the DNS" .
244
245### OSX
246
247    # sw_vers
248    ProductName:	Mac OS X
249    ProductVersion:	10.8.5
250    BuildVersion:	12F45
251
252    Built using PackageMaker, libevent2.
253
254    # ./configure --with-libevent --prefix=$HOME/getdnsosx/export
255    # make
256    # make install
257
258    edit/fix hardcoded paths in lib/*.la to reference /usr/local
259
260    update getdns.pmdoc to match release info
261
262    build package using PackageMaker
263
264    create dmg
265
266    A self-compiled version of OpenSSL or the version installed via Homebrew is required.
267    Note: If using a self-compiled version, manual configuration of certificates into /usr/local/etc/openssl/certs is required for TLS authentication to work.
268
269#### Homebrew
270
271If you're using [Homebrew](http://brew.sh/), you may run `brew install getdns`.  By default, this will only build the core library without any 3rd party event loop support.
272
273To install the [event loop integration libraries](https://getdnsapi.net/doxygen/group__eventloops.html) that enable support for libevent, libuv, and libev, run: `brew install getdns --with-libevent --with-libuv --with-libev`.  All switches are optional.
274
275Note that in order to compile the examples, the `--with-libevent` switch is required.
276
277Additionally, the OpenSSL library installed by Homebrew is linked against. Note that the Homebrew OpenSSL installation clones the Keychain certificates to the default OpenSSL location so TLS certificate authentication should work out of the box.
278
279### Microsoft Windows 8.1
280
281The build has been tested using the following:
28232 bit only Mingw: [Mingw(3.21.0) and Msys 1.0](http://www.mingw.org/) on Windows 8.1
28332 bit build on a 64 bit Mingw [Download latest from: http://mingw-w64.org/doku.php/download/mingw-builds and http://msys2.github.io/]. IMPORTANT: Install tested ONLY on the  "x86_64" for 64-bit installer of msys2.
284
285#### Dependencies
286The following dependencies are
287* openssl-1.0.2j
288* libidn
289
290Instructions to build openssl-1.0.2j:
291Open the mingw32_shell.bat from msys2 in order to build:
292
293If necessary, install the following using pacman:
294
295    pacman -S pkg-config  libtool automake
296    pacman -S autoconf automake-wrapper
297
298    tar -xvf openssl-1.0.2j.tar
299    cd openssl-1.0.2j/
300    ./Configure --prefix=${LOCALDESTDIR} --openssldir=${LOCALDESTDIR}/etc/ssl --libdir=lib shared zlib-dynamic mingw
301    make
302    make install
303
304To configure:
305
306    ./configure --enable-stub-only --with-trust-anchor="c:\\\MinGW\\\msys\\\1.0\\\etc\\\unbound\\\getdns-root.key" --with-ssl=<location of openssl from above> --with-getdns_query
307
308 The trust anchor is also installed by unbound on `c:\program Files (X86)\unbound\root.key` and can be referenced from there
309 or anywhere else that the user chooses to configure it.
310
311 After configuring, do a `make` and `make install` to build getdns for Windows.
312
313 Example test queries:
314
315    ./getdns_query.exe -s gmadkat.com A @64.6.64.6  +return_call_reporting (UDP)
316    ./getdns_query.exe -s gmadkat.com A @64.6.64.6 -T  +return_call_reporting (TCP)
317    ./getdns_query.exe -s gmadkat.com A -l L @185.49.141.37  +return_call_reporting (TLS without authentication)
318    ./getdns_query.exe -s www.huque.com A +dnssec_return_status +return_call_reporting (DNSSEC)
319
320Contributors
321============
322* Claus Assman
323* Theogene Bucuti
324* Andrew Cathrow, Verisign Labs
325* Neil Cook
326* Saúl Ibarra Corretgé
327* Craig Despeaux, Verisign, Inc.
328* John Dickinson, Sinodun
329* Sara Dickinson, Sinodun
330* Robert Edmonds
331* Angelique Finan, Verisign, Inc.
332* Simson Garfinkel
333* Daniel Kahn Gillmor
334* Neel Goyal, Verisign, Inc.
335* Bryan Graham, Verisign, Inc.
336* Robert Groenenberg
337* Jim Hague, Sinodun
338* Paul Hoffman
339* Scott Hollenbeck, Verising, Inc.
340* Christian Huitema
341* Shumon Huque, Verisign Labs
342* Jelte Janssen
343* Guillem Jover
344* Shane Kerr
345* Anthony Kirby
346* Olaf Kolkman, NLnet Labs
347* Sanjay Mahurpawar, Verisign, Inc.
348* Allison Mankin, Verisign, Inc. - Verisign Labs.
349* Sai Mogali, Verisign, Inc.
350* Linus Nordberg
351* Benno Overeinder, NLnet Labs
352* Joel Purra
353* Tom Pusateri
354* Prithvi Ranganath, Verisign, Inc.
355* Hoda Rohani, NLnet Labs
356* Rushi Shah, Verisign, Inc.
357* Vinay Soni, Verisign, Inc.
358* Melinda Shore, No Mountain Software LLC
359* Bob Steagall, Verisign, Inc.
360* Andrew Sullivan
361* Ondřej Surý
362* Willem Toorop, NLnet Labs
363* Gowri Visweswaran, Verisign Labs
364* Wouter Wijngaards, NLnet Labs
365* Glen Wiley, Verisign, Inc.
366* Paul Wouters
367
368
369Acknowledgements
370================
371The development team explicitly acknowledges Paul Hoffman for his initiative and efforts to develop a consensus based DNS API. We would like to thank the participants of the [mailing list](https://getdnsapi.net/mailman/listinfo/spec) for their contributions.
372