Linux SSL/TLS Certificate Errors — Expired, Self-Signed & Chain Issues
Warningsecurity
Overview
Fix Linux SSL/TLS errors including certificate expired, unable to verify certificate chain, self-signed certificate rejection, and CA bundle configuration.
Key Details
- Certificate errors from curl, wget, git, and other tools indicate TLS verification failure
- Common: 'SSL certificate problem: unable to get local issuer certificate'
- CA certificates are stored in /etc/ssl/certs/ or /etc/pki/tls/certs/ depending on distro
- Let's Encrypt certificates require the ISRG Root X1 CA in the trust store
- Self-signed certificates are rejected by default — must be explicitly trusted
Common Causes
- System CA certificate bundle outdated (missing newer CAs)
- Clock significantly wrong causing valid certificates to appear expired
- Corporate proxy with MITM certificate not in the trust store
- Self-signed certificate used on server
- Intermediate certificate missing from server configuration (incomplete chain)
Steps
- 1Update CA certificates: sudo apt install --reinstall ca-certificates (Debian/Ubuntu) or sudo yum reinstall ca-certificates (RHEL)
- 2Check system time: date — fix with: sudo timedatectl set-ntp true
- 3Test certificate: openssl s_client -connect hostname:443 -showcerts
- 4Add custom CA: copy cert to /usr/local/share/ca-certificates/ then sudo update-ca-certificates
- 5For curl specifically: curl --cacert /path/to/ca-bundle.crt URL
Tags
linuxssltlscertificateca
More in Security
windows-defender-errorsWindows Defender Errors — Antivirus Not Working or Updating
Errorwindows-error-0x80073b01-defender-serviceWindows Error 0x80073B01 — Windows Defender Service Failed to Start
Errormac-gatekeeper-app-blockedMac Gatekeeper — App Cannot Be Opened (Unidentified Developer)
Warningmac-filevault-recovery-errorsMac FileVault Errors — Encryption, Decryption & Recovery Key Issues
Errorbrowser-mixed-content-warningsBrowser Mixed Content Warnings — HTTP Resources on HTTPS Page
Warningbrowser-csp-violationsBrowser CSP Violations — Content Security Policy Error Guide
WarningFrequently Asked Questions
Only for testing. Never in production. Fix the root cause: update CA certs, fix clock, or add the correct CA to your trust store.