Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL without CA root with openssl s_client

Tags:

curl

ssl

openssl

So, I've key and cert file which are using without problem with CURL.

curl -k --key key --cert cert --url myurl

No problem with it. Buf if test connection with openssl s_client i've error 19 self-signed cert in chain.

openssl s_client -key key -cert cert -connect myurl:443

So, seems openssl must have alternative option '-k' of curl which means insecure, allow connections to SSL sites without certs (H). Somebody knows it?

like image 818
Reddy Avatar asked May 31 '12 15:05

Reddy


1 Answers

curl will simply not make the connection at all without -k if the certificate isn't trusted.

In contrast, openssl s_client will make the connection anyway, but will display a warning if the certificate isn't trusted. (You would have to specify a list of trusted CA certificates using -CApath or -CAfile to get rid of that warning.)

like image 140
Bruno Avatar answered Sep 24 '22 02:09

Bruno