Remove support for DNS-over-TLS certificate fingerprints.
Inject a test Certificate authority for DNS-OVER-TLS test, and It
provides proper test coverage to TLS cerificate validation.
Test: built, flashed, booted
atest pass
Change-Id: I32b8c743d991ba1f113b37165ff01f4b2acc9da2
diff --git a/ResolverController.cpp b/ResolverController.cpp
index 8296826..0128a12 100644
--- a/ResolverController.cpp
+++ b/ResolverController.cpp
@@ -195,9 +195,7 @@
return resolv_create_cache_for_net(netId);
}
-int ResolverController::setResolverConfiguration(
- const ResolverParamsParcel& resolverParams,
- const std::set<std::vector<uint8_t>>& tlsFingerprints) {
+int ResolverController::setResolverConfiguration(const ResolverParamsParcel& resolverParams) {
using aidl::android::net::IDnsResolver;
// At private DNS validation time, we only know the netId, so we have to guess/compute the
@@ -213,8 +211,10 @@
if (tlsServers.size() > MAXNS) {
tlsServers.resize(MAXNS);
}
- const int err = gPrivateDnsConfiguration.set(resolverParams.netId, fwmark.intValue, tlsServers,
- resolverParams.tlsName, tlsFingerprints);
+ const int err =
+ gPrivateDnsConfiguration.set(resolverParams.netId, fwmark.intValue, tlsServers,
+ resolverParams.tlsName, resolverParams.caCertificate);
+
if (err != 0) {
return err;
}