resolv_gold_test: Add DNS-over-TLS test
Prepare for gold test on private DNS and correct the typo in
generating SSL certificate commands for DNS TLS frontend and client.
Test: cd packages/modules/DnsResolver && atest
Change-Id: Ic30d1ec3e60c2a40390f4e6b7de65ebd1a338b94
diff --git a/tests/resolv_integration_test.cpp b/tests/resolv_integration_test.cpp
index 02bb3f1..3c706a1 100644
--- a/tests/resolv_integration_test.cpp
+++ b/tests/resolv_integration_test.cpp
@@ -65,6 +65,7 @@
#include "tests/dns_metrics_listener/dns_metrics_listener.h"
#include "tests/dns_responder/dns_responder.h"
#include "tests/dns_responder/dns_responder_client_ndk.h"
+#include "tests/dns_responder/dns_tls_certificate.h"
#include "tests/dns_responder/dns_tls_frontend.h"
#include "tests/resolv_test_utils.h"
@@ -75,11 +76,6 @@
// Use maximum reserved appId for applications to avoid conflict with existing uids.
static const int TEST_UID = 99999;
-// Currently the hostname of TLS server must match the CN filed on the server's certificate.
-// Inject a test CA whose hostname is "example.com" for DNS-OVER-TLS tests.
-static const std::string kDefaultPrivateDnsHostName = "example.com";
-static const std::string kDefaultIncorrectPrivateDnsHostName = "www.example.com";
-
// Semi-public Bionic hook used by the NDK (frameworks/base/native/android/net.c)
// Tested here for convenience.
extern "C" int android_getaddrinfofornet(const char* hostname, const char* servname,