Here's the error:
[ error ] ofApp::setup: SSL Exception: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
I am using the ofxHTTP library in OpenFrameworks (which uses a library called Poco I believe) to make an HTTP call:
// Testing redirects and https.
std::string url = "https://www.seasons986.pythonanywhere.com/getcoordinates";
// Create a client.
ofxHTTP::Client client;
// Create a request.
ofxHTTP::GetRequest request(url);
// Create a context.
ofxHTTP::Context context;
// Set custom session settings.
// See the class documentation for many additional settings.
ofxHTTP::ClientSessionSettings sessionSettings;
// Use an iPhone X user agent string.
sessionSettings.setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1");
// Set a 60 second keep-alive timeout (default is 8 seconds).
sessionSettings.setKeepAliveTimeout(Poco::Timespan::SECONDS * 60);
// Save the session settings with the context.
context.setClientSessionSettings(sessionSettings);
// Do the query!
try
{
// Execute the request within the given context.
auto response = client.execute(context, request);
std::cout << response->getStatus() << std::endl;
// Check the response.
if (response->getStatus() == Poco::Net::HTTPResponse::HTTP_OK)
{
// A successful response.
//...
}
}
else
{
ofLogError("ofApp::setup") << response->getStatus() << " " << response->getReason();
}
}
catch (const Poco::Exception& exc)
{
// ** SSL ERROR OCCURS HERE **
ofLogError("ofApp::setup") << exc.displayText();
}
I checked my system image--everything is all new, I also only started using PythonAnywhere this year so I can't imagine anything being out of date. I have no issue calling another HTTPs website, so the issue only occurs with my PythonAnywhere site.
Please help!