The curl command returns an error

If you try to use the curl command and it returns error 35, try one of these solutions.


The curl and nss libraries do not support Transport Layer Security (TLS) 1.2 by default in the versions available for RHEL 7.1 or earlier. Default support for TLS 1.2 requires nss level 3.17.3 or later. This Red Hat bug is tracking the issue: Bug 1170339 - libcurl does not enable TLS > 1.0 by default .


Look for this error after trying to run curl: curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).


Try one of the following solutions to fix the problem:
  • Explicitly tell curl to use TLSv1.x or TLSv1.2 by adding one of the following arguments to the curl command: -1, --tlsv1, or --tlsv1.2.
  • Upgrade curl and nss and their dependencies by using Fedora packages.
  • Use something other than curl.