29 static constexpr char kProxyUrl[] =
"http://127.0.0.1:80";
30 struct curl_blob trust_anchor = {
const_cast<char*
>(tls_test_credentials::kCertificatePem),
31 sizeof(tls_test_credentials::kCertificatePem) - 1, CURL_BLOB_NOCOPY};
32 (void)curl_easy_setopt(easy, CURLOPT_CONNECT_TO,
nullptr);
33 (void)curl_easy_setopt(easy, CURLOPT_PROXY, kProxyUrl);
34 (void)curl_easy_setopt(easy, CURLOPT_PROXYTYPE,
static_cast<long>(CURLPROXY_HTTP));
35 (void)curl_easy_setopt(easy, CURLOPT_NOPROXY,
"");
36 (void)curl_easy_setopt(easy, CURLOPT_HTTPPROXYTUNNEL, 1L);
37 (void)curl_easy_setopt(easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY);
41 (void)curl_easy_setopt(easy, CURLOPT_CAINFO_BLOB, &trust_anchor);
42 (void)curl_easy_setopt(easy, CURLOPT_SSL_VERIFYPEER, 1L);
43 (void)curl_easy_setopt(easy, CURLOPT_SSL_VERIFYHOST, 2L);