I am working on a project that needs a C++ HTTPS server to run in a separate thread from a MQTT & later on, another HTTPS server, and, out of all libraries, Boost comes with some examples, including HTTPS so this make me choose it in the first place.
I've tried the Boost.Beast examples listed here for this server and this client but when the client connects it just won't work. The client should make a GET request for /index.html
but:
the server running with $ ./server 127.0.0.1 9999 .
prints this:
handshake: tlsv1 alert unknown ca (SSL routines, ssl3_read_bytes)
and the client running with $ ./client 127.0.0.1 9999 /
prints this:
handshake: certificate verify failed (SSL routines, tls_process_server_certificate)
I am compiling with flags -lssl -lcrypto -pthread
and I am using the certificates provided by the authors in the same repo. I am not entirely decided to use Boost and I'm open to ideas to help me make a HTTPS server, I've seen other libraries but either those don't support HTTPS or I can't find examples of how to use them. Btw please let me know if I've missed out anything, including how the SSL certificates should be used in this context.