When running a curl request to a Sumo Logic endpoint I am receiving the following error message.
About to connect() to api.sumologic.com port 443
* Trying 126.96.36.199... connected
* Connected to api.sumologic.com (188.8.131.52) port 443
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* SSLv2, Client hello (1):
Unknown SSL protocol error in connection to api.sumologic.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to api.sumologic.com:443
This error is due to an unsupported version of TLS being used with the connection. On June 20th, 2018 Sumo Logic removed support for TLS 1.0 and TLS 1.1 from all public endpoints and now requires all connections to occur via TLS 1.2.
To address the reported error you can:
- Upgrade to the latest version of curl. To verify the curl version type curl -V. TLS1.2 is the default used by Curl versions 7.34 has default support for tlsv1.2
- Use the --tlsv1.2 option. For example
curl --tlsv1.2 -u 'accessid:accesskey' -X POST -H "Content-Type: application/json" -T hosted_collector.json https://api.sumologic.com/api/v1/collectors/collectorid/sources