unittest / specify a cacert for tls client tests

This commit is contained in:
Benjamin Sergeant
2019-09-29 21:24:22 -07:00
parent 55141aa875
commit bf46f3fe8f
4 changed files with 4443 additions and 0 deletions

View File

@ -55,6 +55,10 @@ TEST_CASE("http_client", "[http]")
HttpClient httpClient;
WebSocketHttpHeaders headers;
SocketTLSOptions tlsOptions;
tlsOptions.caFile = "cacert.pem";
httpClient.setTLSOptions(tlsOptions);
std::string url("https://httpbin.org/");
auto args = httpClient.createRequest(url);
@ -94,6 +98,10 @@ TEST_CASE("http_client", "[http]")
HttpClient httpClient(async);
WebSocketHttpHeaders headers;
SocketTLSOptions tlsOptions;
tlsOptions.caFile = "cacert.pem";
httpClient.setTLSOptions(tlsOptions);
std::string url("https://httpbin.org/");
auto args = httpClient.createRequest(url);