mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
RequestServer: Use default certificate for DNS over TLS
This commit is contained in:
committed by
Ali Mohammad Pur
parent
65966020d1
commit
42a18a4a91
@@ -51,8 +51,12 @@ static NonnullRefPtr<Resolver> default_resolver()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_dns_info.use_dns_over_tls) {
|
if (g_dns_info.use_dns_over_tls) {
|
||||||
|
TLS::Options options;
|
||||||
|
if (!g_default_certificate_path.is_empty())
|
||||||
|
options.set_root_certificates_path(g_default_certificate_path);
|
||||||
|
|
||||||
return DNS::Resolver::SocketResult {
|
return DNS::Resolver::SocketResult {
|
||||||
MaybeOwned<Core::Socket>(TRY(TLS::TLSv12::connect(*g_dns_info.server_address, *g_dns_info.server_hostname))),
|
MaybeOwned<Core::Socket>(TRY(TLS::TLSv12::connect(*g_dns_info.server_address, *g_dns_info.server_hostname, move(options)))),
|
||||||
DNS::Resolver::ConnectionMode::TCP,
|
DNS::Resolver::ConnectionMode::TCP,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user