[ChangeLog][QtNetwork][QDnsLookup] Added support for querying records of
type TLSA, which are useful in DNS-based Authentication of Named
Entities (DANE).
Change-Id: I455fe22ef4ad4b2f9b01fffd17c723aa6ab7f278
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is implemented for DNS-over-TLS and for the native Unix resolver,
because I can find no way to get the state of the reply on Windows with
the WinDNS.h API.
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7bc022ded2363
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is just an empty shell for now. The implementation will come in the
next commit.
[ChangeLog][QtNetwork][QDnsLookup] The class now supports DNS-over-TLS
and some other DNSSEC experimental features, on some platforms. Use
QDnsLookup::isProtocolSupported to know if the protocol is supported on
a given platform.
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7e034dee75533
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We always just take the first, which QHostInfo should have sorted in
priority order.
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7bc6460f06b98
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
I couldn't make my Windows 10 or 11 query a non-standard port. It kept
complaining about "The parameter is incorrect.", so as a result the unit
test doesn't actually test the new feature there. I can't find a single
example of this on the Internet; my speculation is that the backend API
that DnsQueryEx uses does not support setting port numbers
(DnsQuery_{A,W} didn't offer that option).
[ChangeLog][QtNetwork][QDnsLookup] Added setNameserverPort().
Change-Id: I3e3bfef633af4130a03afffd175d60a581cc0a9c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Instead of using #if, this now uses SFINAE to detect the presence of the
glibc extensions to set IPv6 nameserver addresses. It's also possible
that this fixes some bugs that have always been there, but never checked
because we don't have a way to unit-test explicit name servers.
To that effect, this commit adds a manual unit test that mimics the BIND
tool "dig". When running:
./qdnslookup qt-project.org any @dns.google
it printed for me:
; <<>> QDnsLookup 6.6.0
;; status: NoError
;; QUESTION:
;qt-project.org IN ANY
;; ANSWER:
qt-project.org 3600 IN MX 10 mx.qt-project.org
qt-project.org 3600 IN NS ns14.cloudns.net
qt-project.org 3600 IN NS ns11.cloudns.net
qt-project.org 3600 IN NS ns12.cloudns.net
qt-project.org 3600 IN NS ns13.cloudns.net
qt-project.org 3600 IN A 52.18.144.254
qt-project.org 3600 IN TXT "v=spf1 mx ip4:193.209.87.4 include:spf.protection.outlook.com ~all"
;; Query time: 241 ms
;; SERVER: 2001:4860:4860::8844#53
strace confirms the DNS queries were sent to the correct address.
Change-Id: I3e3bfef633af4130a03afffd175d56a92371ed16
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>