Use system certificate on Windows.

This commit is contained in:
Chunting Gu
2019-06-17 15:28:20 +08:00
parent 889024d6c7
commit 43aadee885
5 changed files with 54 additions and 40 deletions
-12
View File
@@ -8,16 +8,6 @@
// -----------------------------------------------------------------------------
#if (defined(_WIN32) || defined(_WIN64))
// You need to set environment variable SSL_CERT_FILE properly to enable
// SSL verification.
bool kSslVerify = false;
#else
bool kSslVerify = true;
#endif
// -----------------------------------------------------------------------------
// JSON helper functions (based on jsoncpp).
// Parse a string to JSON object.
@@ -97,8 +87,6 @@ TEST(ClientTest, Get_Shortcut) {
TEST(ClientTest, Get_SSL) {
webcc::ClientSession session;
session.set_ssl_verify(kSslVerify);
try {
// HTTPS is auto-detected from the URL scheme.
auto r = session.Request(webcc::RequestBuilder{}.Get().