Fixes

Fix

SSL error: unable to get local issuer certificate

The client cannot link the server's certificate to a root it trusts: the server did not send its intermediate, or the client's trust store lacks the root.

Likely causes

  1. The server sends only its own certificate, not the intermediate that signed it. Browsers often hide this; curl and apps do not.
  2. The client's trust store is missing the root (a private CA never installed, or a store emptied).

Diagnose

Run these in order. The output is what each printed on a lab's real Linux machines.

customer:~# curl -sS https://kiosk.lab/
curl has the kiosk's certificate but nothing that leads from its issuer to a root.
curl: (60) SSL certificate problem: unable to get local issuer certificate
…
customer:~# curl -sv -o /dev/null https://bakery.lab/
A good server for comparison: curl -sv shows the issuer, SSL certificate verify ok, and Certificate level 0 to 2, the whole chain.
…
* Server certificate:
*  subject: CN=bakery.lab
*  start date: Nov  1 06:54:35 2026 GMT
*  expire date: May 19 06:54:35 2027 GMT
*  subjectAltName: host "bakery.lab" matched cert's "bakery.lab"
*  issuer: CN=netlab lab issuing CA
*  SSL certificate verify ok.
*   Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
…

Fix

sharedHost:~# openssl x509 -in /etc/ssl/lab/bakery/chain.pem -noout -subject -issuer
On the server: this is the certificate that went missing. Serve it after the site's own, in one file: with Certbot, fullchain.pem, not cert.pem.
subject=CN=netlab lab issuing CA
issuer=CN=netlab lab CA
customer:~# openssl x509 -in /usr/local/share/ca-certificates/lab-ca.crt -noout -subject -issuer
On the client, when its store lacks a private CA: put the CA's certificate in /usr/local/share/ca-certificates/, as here, and run update-ca-certificates.
subject=CN=netlab lab CA
issuer=CN=netlab lab CA

Break it and fix it yourself

Each lab is a small network of real Linux machines in your browser, where this fault happens.

Open HTTPS and TLS: lock a site and prove who it is

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab