Estoy intentando usar un servicio que usa un certificado autofirmado.
-
Descarga el certificado:
# printf QUIT | openssl s_client -connect my-server.net:443 -showcerts 2>/dev/null > my-server.net.crt
-
Compruebe que esté autofirmado (el emisor y el asunto son los mismos):
# openssl x509 -subject -issuer -noout -in my-server.net.crt subject=O = Acme Co, CN = Controller Fake Certificate issuer=O = Acme Co, CN = Controller Fake Certificate
-
Intenta usarlo con la opción
--cacert
de curl:# curl https://my-server.net --cacert my-server.net.crt curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
No entiendo por qué curl no puede verificar el certificado.