curl returns "ssl_choose_client_version:unsupported protocol" error in Ubuntu 20.x
If you encountered "ssl_choose_client_version:unsupported protocol" when using curl in Ubuntu 20:
$ curl https://somehost/
curl: (35) error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
It may because the "somehost" only accepts old protocol (e.g. TLS v1, etc.), but in Ubuntu 20.x, the OpenSSL assumes minimum = TLS v1.2 by default.
If the "somehost" just cannot upgrade to TLS v1.2, you might consider fixing it with the following:
1) Modify /etc/ssl/openssl.cnf
Search for the line "oid_section = new_oids"
Add the following lines below it:
openssl_conf = default_conf[default_conf]ssl_conf = ssl_sect[ssl_sect]system_default = system_default_sect[system_default_sect]MinProtocol = TLSv1.1CipherString = DEFAULT@SECLEVEL=1
2) curl "somehost" with the following parameters
$ curl --tlsv1 https://somehost
3) If the "somehost" just using a self-signed certificate
$ curl -k --tlsv1 https://somehost
Reference:
Comments
Post a Comment