Use system certificate on Windows.
This commit is contained in:
@@ -3,14 +3,6 @@
|
||||
#include "webcc/client_session.h"
|
||||
#include "webcc/logger.h"
|
||||
|
||||
#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
|
||||
|
||||
static void PrintSeparator() {
|
||||
static const std::string s_line(80, '-');
|
||||
std::cout << s_line << std::endl;
|
||||
@@ -21,8 +13,6 @@ int main() {
|
||||
|
||||
webcc::ClientSession session;
|
||||
|
||||
session.set_ssl_verify(kSslVerify);
|
||||
|
||||
try {
|
||||
PrintSeparator();
|
||||
|
||||
|
||||
@@ -5,14 +5,6 @@
|
||||
#include "webcc/client_session.h"
|
||||
#include "webcc/logger.h"
|
||||
|
||||
#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
|
||||
|
||||
void Help(const char* argv0) {
|
||||
std::cout << "Usage: " << argv0 << " <upload_dir> [url]" << std::endl;
|
||||
std::cout << "Default Url: http://httpbin.org/post" << std::endl;
|
||||
|
||||
@@ -10,14 +10,6 @@
|
||||
// Change to 1 to print response JSON.
|
||||
#define PRINT_RESPONSE 0
|
||||
|
||||
#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
|
||||
|
||||
const std::string kUrlRoot = "https://api.github.com";
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -136,8 +128,6 @@ int main() {
|
||||
|
||||
webcc::ClientSession session;
|
||||
|
||||
session.set_ssl_verify(kSslVerify);
|
||||
|
||||
ListEvents(session);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user