What is cURL Error 35?
cURL Error 35 is an SSL/TLS connection error that occurs when the cURL library fails to establish a secure connection with the remote server. The full error message typically reads: “cURL error 35: SSL connect error” or “error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version”. This error is common in PHP applications, API integrations, WordPress sites, and command-line scripts when attempting HTTPS requests.
Quick Answer: How to Fix cURL Error 35
Update your SSL/TLS libraries, ensure your system supports TLS 1.2 or higher, verify the remote server’s SSL certificate is valid, and check that your cURL version is up to date. For immediate fixes, try forcing TLS 1.2 or updating your CA certificate bundle.
What Causes cURL Error 35?
Understanding the root causes is essential for effective troubleshooting:
- Outdated SSL/TLS Libraries: Older OpenSSL versions do not support modern TLS protocols
- TLS Version Mismatch: Client and server cannot agree on a compatible TLS version
- Expired or Invalid SSL Certificates: The remote server’s certificate has expired or is self-signed
- Firewall or Proxy Interference: Network security tools blocking SSL handshakes
- Outdated cURL Version: Older cURL builds lack support for newer encryption standards
- Missing CA Certificates: The system lacks the root certificates needed to verify SSL
- Server-Side SSL Misconfiguration: The remote server has improper SSL settings
How to Fix cURL Error 35: Step-by-Step Solutions
Method 1: Update cURL and OpenSSL
Outdated libraries are the most common cause of Error 35. Update them:
| Operating System | Update Command |
|---|---|
| Ubuntu/Debian | sudo apt-get update && sudo apt-get install curl openssl libssl-dev |
| CentOS/RHEL | sudo yum update curl openssl openssl-devel |
| macOS (Homebrew) | brew upgrade curl openssl |
| Windows | Download latest cURL from curl.se |
Method 2: Force TLS 1.2 or Higher
Many servers now require TLS 1.2 minimum. Force the correct version:
- Command Line:
curl --tlsv1.2 https://1000sciencefairprojects.com/tech/ - PHP cURL:
curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); - Python requests: Use
requests.get(url, ssl_version=ssl.PROTOCOL_TLSv1_2)
Method 3: Update CA Certificate Bundle
Missing or outdated CA certificates cause verification failures:
- Download latest CA bundle: From curl.se/ca/cacert.pem
- PHP: Update
curl.cainfoandopenssl.cafilein php.ini - cURL command line: Use
--cacert /path/to/cacert.pem - Verify path: Check
php -i | grep cafilefor correct location
Method 4: Check SSL Certificate Validity
Verify the remote server’s certificate is not expired:
- Test with OpenSSL:
openssl s_client -connect 1000sciencefairprojects.com/tech/ -servername 1000sciencefairprojects.com/tech/ - Check expiration: Look for “Verify return code: 0 (ok)”
- Use SSL Labs: Test at SSL Labs
- Verify certificate chain: Ensure all intermediate certificates are present
Method 5: Disable SSL Verification (Temporary Debug Only)
Warning: Only use this for testing, never in production:
- Command Line:
curl -k https://1000sciencefairprojects.com/tech/orcurl --insecure - PHP:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - Always re-enable verification after identifying the issue
Method 6: Check Firewall and Proxy Settings
Network security tools can interfere with SSL handshakes:
- Temporarily disable firewall to test if it is the cause
- Configure proxy settings:
curl -x proxy:port https://1000sciencefairprojects.com/tech/ - Check corporate proxies: Some intercept and re-encrypt SSL traffic
- Whitelist the domain in your security software
Method 7: Verify Server-Side SSL Configuration
If you control the server, check these settings:
- Enable TLS 1.2 and 1.3: Disable SSLv3 and TLS 1.0/1.1
- Update server certificate: Renew if expired
- Install intermediate certificates: Complete the certificate chain
- Check cipher suites: Ensure compatibility with client libraries
cURL Error 35: Platform-Specific Fixes
| Platform | Specific Solution |
|---|---|
| WordPress | Update WordPress core, plugins, and themes. Check SSL plugin settings. Verify hosting provider supports TLS 1.2+ |
| PHP Applications | Update PHP to 7.4+ or 8.x. Set curl.cainfo in php.ini. Use stream_context_set_default for SSL options |
| Linux Servers | Update OpenSSL with package manager. Rebuild cURL against new OpenSSL. Check /etc/ssl/certs/ directory |
| Windows WAMP/XAMPP | Download cacert.pem and place in php/extras/ssl/. Update php.ini to point to this file |
| Docker Containers | Update base image. Install ca-certificates package. Mount host CA bundle if needed |
How to Prevent cURL Error 35
- Keep cURL and OpenSSL updated to latest stable versions
- Monitor certificate expiration dates and set renewal reminders
- Use TLS 1.2 or higher for all connections
- Regularly update CA certificate bundles
- Test SSL configuration with SSL Labs monthly
- Document proxy and firewall rules for your network
Common cURL Error 35 Variations
| Error Message | Meaning |
|---|---|
SSL connect error |
General SSL handshake failure |
tlsv1 alert protocol version |
TLS version mismatch – server requires newer TLS |
certificate verify failed |
CA certificate missing or invalid |
sslv3 alert handshake failure |
Cipher suite mismatch between client and server |
TL;DR – Quick Fix Summary
cURL Error 35 is an SSL/TLS connection error fixed by:
- Updating cURL and OpenSSL to latest versions
- Forcing TLS 1.2 or higher in your requests
- Updating CA certificate bundle
- Checking SSL certificate validity on the remote server
- Verifying firewall/proxy is not blocking SSL handshakes
Start with Method 1 (update libraries) and Method 2 (force TLS 1.2) for fastest resolution.
Related: cURL SSL Certificates Documentation | OpenSSL Project