I tried this on several different machines:
On some machines I got the SSL error 35, and on some it worked with no
error message. From this I suspected that there was some difference in the
curl version being used, or else the related packages for SSL certs. So I
tried updating some packages on the server I needed. It turned out that
updating the Network Security Services (NSS) package fixed the problem.
yum update nss