brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: openssl s_client -status shows whether a server staples OCSP

Openssl
~/tips/tip-openssl-s-client-ocsp-status

echo | openssl s_client -connect example.com:443 -servername example.com -status 2>/dev/null \

See if a server sends a stapled OCSP response with its certificate, and what it says.

OCSP stapling means the server sends a fresh, signed statement from the CA that its certificate is not revoked. -status asks for it and prints what came back.

Ask for the stapled response and look at that part of the output:

echo | openssl s_client -connect example.com:443 -servername example.com -status 2>/dev/null \
  | grep -A12 'OCSP response'

With stapling you see OCSP Response Status: successful, a Cert Status: good line and the This Update and Next Update times. Without it the line reads OCSP response: no response sent.

I’d run this check after enabling ssl_stapling in nginx. Note that nginx fetches the response on demand, so the very first connection after a restart can show no response, and a second try a moment later shows it.

Not every certificate has an OCSP responder anymore. Let’s Encrypt shut down its OCSP service in 2025, so for its certificates “no response sent” is simply expected, and there is nothing to fix. Other CAs still run OCSP. Look for an OCSP line in the Authority Information Access extension of the certificate to see if yours has a responder at all.

Further reading: OpenSSL: openssl-s_client, Let's Encrypt: ending OCSP support

Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get

More Openssl tips openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/null | openssl x509 -noout -subject openssl x509 -in cert.pem -days 365 -signkey key.pem -out cert-new.pem printf %s hello | openssl dgst -sha256 -hmac secret openssl pkcs12 -legacy -in old.pfx -nokeys echo 'aGVsbG8gd29ybGQ=' | openssl base64 -d All Openssl tips (34) All topics

Link