crow
crow copied to clipboard
Crow server not responding when TLS is used
Code:
#define CROW_ENABLE_SSL #include "dependencies/crow_all.h"
int main() { crow::SimpleApp app;
CROW_ROUTE(app, "/") ( { return "Hello world!"; });
app.port(18080).ssl_file("test.crt", "test.key").run();
}
Compiling Statement
g++ src/authentication.cpp -o build/authentication -std=c++11 -lboost_thread -lboost_system -pthread -lssl -lcrypto
Execution
Response on Web Browser
Generated test.crt and test.key (compressed)
Did you use https in your url? try https://127.0.0.1:18080/
@moneroexamples I am currently using crow with apache2 server. HTTPS encryption is functional between Apache server and the client.
It should work. I am using crow with nginx server and nd HTTPs encryption work very well. Question : Are you testing it on local machine or Have you deployed it on some cloud ?
If you're using Apache as the front end server with HTTPS and it's proxying requests to crow, then you don't need to use HTTPS between Apache and crow unless you're worried about the local traffic between them being intercepted.
The only thing I can think of is that Apache is refusing the SSL certificate since it looks to be self-signed. You might want to check the Apache logs.