I have a server, which has a self signed certificate, which I am trying to securely access. I've got the certificate by looking at the output from
openssl s_client -connect <ip>, and copied it to testcert.pem, which I then tried to use with
curl --cacert testcert.pem <url>. However, this didn't work, and my research has lead me believe that the problem may be the line in the certificate that reads
Apparently, I need to store an alias somewhere on my system linking id23946 to the ip address, but I can't find any information on how to do that. So, how do I do it? How do I make curl verify this certificate as valid?
I am aware that I can connect to the server by adding
<ip> id23946 to my hosts file and then using id23946 as the address, but I would really prefer to be able to connect directly to the server's actual address, without having to modify the server certificate. Is there any way to do that?