I have created a WebSocket server using Boost Beast and a client with Angular. my setup works fine when I use the WebSockets (ws), however, when I try to use WebSocket Secure(wss) I get the following errors on the server and client:
Error on the server: Error: sslv3 alert certificate unknown
Error on the client: net::ERR_CERT_COMMON_NAME_INVALID
I built my angular code and placed my Angular files in my web hosting account, when building the angular project I did not provide my certificate or key. I have installed an SSL certificate on my hosting account. the certificate was provided and installed by my hosting service(namecheap). I assume that when my wss message is sent by my client it is automatically encrypted by the hosting service(maybe this is where it’s all going wrong).
I have added the SSL certificate and key to my C++ server code and added it to usr/local/share/ca-certificates. as far as I can tell the certificate should be working. I followed the following tutorial: https://www.boost.org/doc/libs/develop/libs/beast/example/common/root_certificates.hpp
At this moment I’m completely stuck. Any pointers on what I can do to debug my problem would be greatly appreciated.
Is there a way to decrypt the connection request and print it using boost ASIO or BOOST Beast.
Source: Windows Questions C++