Ignore the CERTIFICATE_ERROR using CPP REST SDK

1.3k views Asked by At

I have been using the CPP Rest SDK for my application which serves as both HTTP_Client and HTTP_Server as well. And now I want to support HTTPS in my application.

The HTTP_Client will be running in HTTP and HTTP_Server will be running as HTTPS.

Since there is no authentication needed from Client side :

I just want to ignore the CERTIFICATE_ERROR

But I couldn't find any such option in the CPP REST SDK.

Please help, I need to know how to ignore

Note: I use Visual Studio 2013 for my application

1

There are 1 answers

1
EMX On

There is config.validate_certificates @ src/http/client/http_client_asio.cpp#L166

http_client_config config;
config.set_validate_certificates(false);
http_client client(url, config);