Commit graph

22 commits

Author SHA1 Message Date
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Daan De Meyer d402edb764 resolved: Fix build error due to missing include. 2020-05-07 03:05:50 -07:00
Jörg Thalheim eec394f10b systemd-resolved: use hostname for certificate validation in DoT
Widely accepted certificates for IP addresses are expensive and only
affordable for larger organizations. Therefore if the user provides
the hostname in the DNS= option, we should use it instead of the IP
address.
2020-03-07 01:37:30 +09:00
Yu Watanabe df70539f9f resolve: error handling improvements 2020-03-01 14:02:23 +01:00
Guilhem Lettron 2e22a54f4e Implement SNI when using DNS-over-TLS
Some DNS providers need SNI to identify client.

This can be used by adding #name to a DNS.
Example:
[Resolve]
DNS=192.168.1.1#example.com
2019-12-04 23:24:06 +09:00
Iwan Timmer 4310bfc20b resolved: add strict mode for DNS-over-TLS
Add strict mode for DNS-over-TLS, which will require TLS support from the server. Closes #10755
2019-06-19 13:10:44 +02:00
Iwan Timmer 71a681ae50 resolved: add missing error code check when initializing DNS-over-TLS 2019-06-18 19:16:36 +02:00
Iwan Timmer e22c5b2064 resolved: move TLS data shared by all servers to manager
Instead of having a context and/or trusted CA list per server this is now moved to the server. Ensures future TLS configuration options are global instead of per server.
2019-06-18 19:16:36 +02:00
Iwan Timmer ab8cd6c968 resolved: make no changes to OpenSSL BUF_MEM struct
Fix crash when using OpenSSL 1.1.1c
Fixes: #12763
2019-06-15 22:46:55 +02:00
Iwan Timmer 53d64ebb30 Revert "resolved: Fix incorrect use of OpenSSL BUF_MEM"
This reverts commit 18bddeaaf2.

Revert this because it does not take the OpenSSL internal read pointer
into considoration. Resulting in padding in packetdata and therefore
broken SSL connections.
2019-06-15 21:56:45 +02:00
Tomas Mraz 18bddeaaf2 resolved: Fix incorrect use of OpenSSL BUF_MEM
Fixes: #12763
2019-06-12 11:15:25 +09:00
Lennart Poettering 29e719ced0 resolved: sort headers again 2018-12-02 13:22:29 +01:00
Aleksei Timofeyev 09e5c07fbd resolved: add missed io-util.h header to resolved-dnstls-openssl.c
Regression after commit 5cfa2c3dc0
2018-12-01 12:49:01 +01:00
Lennart Poettering 5cfa2c3dc0 tree-wide: use IOVEC_MAKE() at many places 2018-11-27 10:12:27 +01:00
Zbigniew Jędrzejewski-Szmek baaa35ad70 coccinelle: make use of SYNTHETIC_ERRNO
Ideally, coccinelle would strip unnecessary braces too. But I do not see any
option in coccinelle for this, so instead, I edited the patch text using
search&replace to remove the braces. Unfortunately this is not fully automatic,
in particular it didn't deal well with if-else-if-else blocks and ifdefs, so
there is an increased likelikehood be some bugs in such spots.

I also removed part of the patch that coccinelle generated for udev, where we
returns -1 for failure. This should be fixed independently.
2018-11-22 10:54:38 +01:00
Yu Watanabe 72938b9309 resolve: sort headers 2018-08-06 09:57:00 +02:00
Yu Watanabe 8e740110df resolve: openssl: make dnstls_stream_{write,read}() may return zero 2018-08-03 07:19:01 +09:00
Yu Watanabe 8eadd29183 resolve: fix error handling of SSL_shutdown() 2018-08-03 07:18:08 +09:00
Yu Watanabe 36f1946c73 resolve: fix typo and coding style cleanups 2018-08-03 06:29:38 +09:00
Yu Watanabe 59c3fee2c7 resolve: clear error queue before calling SSL_*() 2018-08-03 06:26:58 +09:00
Iwan Timmer 04c4d9199e resolved: TCP Fast Open and TLS Session Tickets for OpenSSL
To decreae latency this add support for TFO and TLS Session Tickets. As OpenSSL wouldn't let you easily set a different function all written data is temporarily cached and therefore needs to be flushed after each SSL function which can write data.
2018-07-27 21:23:17 +01:00
Iwan Timmer 096cbdce13 resolved: basic OpenSSL support for DNS-over-TLS
This provides basic OpenSSL support without optimizations like TCP Fast Open and TLS Session Tickets.
Notice only a single SSL library can be enabled at a time and therefore journald functions provided by GnuTLS will be disabled when using OpenSSL.
Fixes #9531
2018-07-27 21:23:17 +01:00