<div dir="ltr">Hello,<br><br>I have a <i>IXWebSocket</i> c++ wss client connecting to a <i>Node.js</i> wss server(websocket npm package). Everything is fine as long as the client connects to `<font face="monospace">wss://localhost:8080</font>`. Soon as I use the ip address of the <i>Node.js</i> wss server, I have the error "<i>OpenSSL failed - error:0A000086:SSL routines::certificate verify failed</i>"<br><br>## Certificate chain creation ##<br>I created my own private root ca.  I used those commands to generate <i>root ca</i> key/certificate and <i>server</i> key/certificate:<br><br>  <font face="monospace">  $ openssl genpkey -aes256 -out root-ca/private/ca.private.key -algorithm RSA -pkeyopt rsa_keygen_bits:2048<br>   $ openssl req -config root-ca/root-ca.conf -key root-ca\private\ca.private.key -x509 -days 7500 -sha256 -extensions v3_ca -out root-ca\certs\ca.crt<br>   $ openssl genpkey -out server/private/server.private.key -algorithm RSA -pkeyopt rsa_keygen_bits:2048<br>   $ openssl req -key server\private\server.private.key -new -sha256 -out server\csr\server.csr<br>   $ openssl ca -config root-ca\root-ca.conf -extensions server_cert -days 365 -notext -in server\csr\server.csr -out server\certs\server.crt</font><br><br>The configuration has a `<font face="monospace">subjectAltName</font>` for both root and server and it looks like this :<br><br> See config file : <a href="https://pastebin.com/kAcwkp9w">https://pastebin.com/kAcwkp9w</a><br><br>The certificate chain looks valid between my *root ca* and my *server*:<br><br><font face="monospace">    $ openssl verify -CAfile root-ca\certs\ca.crt server\certs\server.crt<br>    server\certs\server.crt: OK</font><br><br><br>Both `<font face="monospace">ca.crt</font>` and `<font face="monospace">server.crt</font>` have a reference to my ip address, so I used the <font face="monospace">subjectAltName </font>parameter to define it. I thought that my *root ca* would need it (I am not even sure that it makes sense to have a domain on the *root ca*), but it doesn't make any difference.<br><br><font size="4"><b>Code that is not working</b></font><br><br><b>My IXWebSocket c++ client :</b><br><br><a href="https://pastebin.com/tLGi3amA">https://pastebin.com/tLGi3amA</a><br><br><font size="4"><b>Code that is working</b></font><br><br><b>wss javascript client:</b><br><br>I also coded a javascript client (using the same npm package as my server, not ) and this little client can connect using the ip address!!<br><br><a href="https://pastebin.com/Huzv59gX">https://pastebin.com/Huzv59gX</a><br><br><br><b>My Node.js server :</b><br><br><a href="https://pastebin.com/QCYg5z1B">https://pastebin.com/QCYg5z1B</a><br><br><br><b><font size="4">Questions : </font></b><br>1. Any idea why my c++ client cannot connect using an ip address to the server, while the javascript client can? (using the same certificate chain)<br>2. If not, any idea how I could debug this?<br>3. Would it be possible that the problem is a high level SSL stuff, where you actually need a real hostname and can't use an IP?<br><br></div>