]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
daemon: allow opportunistic DNS over TLS to origins
authorMarek Vavruša <mvavrusa@cloudflare.com>
Tue, 31 Jul 2018 22:12:25 +0000 (15:12 -0700)
committerPetr Špaček <petr.spacek@nic.cz>
Wed, 5 Dec 2018 15:21:46 +0000 (15:21 +0000)
commita1ba84584dadee09991869ac64e15b971853fec5
tree2b7f06daab4432074a036cbca4c9e57419ddf4e7
parent4d91c0a09a89cbf25209e2cfdb7d66074d407ec7
daemon: allow opportunistic DNS over TLS to origins

This commit allows opportunistic DNS over TLS to origins configured
as supporting DoT on port 853. It also adds interface for clearing
configured TLS clients to allow runtime reconfiguration.

The general mode of operation is as follows:

1. Produce a new outgoing query
2. Check if the selected upstream address has configured TLS support on port 853
 2a. If it does: upgrade to DNS over TLS, it cannot be downgraded from this point
 2b. If not: continue with preferred protocol

This allows further automatic discovery as in [1], but right now it has to be configured
manually.

[1]: https://tools.ietf.org/id/draft-bortzmeyer-dprive-resolver-to-auth-00.html

(cherrypicked from cloudflare branch, need to be adapted)
daemon/bindings.c
daemon/tls.c
daemon/tls.h
daemon/worker.c