Skip to content

Instantly share code, notes, and snippets.

@Ampflower
Created February 16, 2024 10:20
Show Gist options
  • Select an option

  • Save Ampflower/59b9412b477dba2b376326c76c1ed9ca to your computer and use it in GitHub Desktop.

Select an option

Save Ampflower/59b9412b477dba2b376326c76c1ed9ca to your computer and use it in GitHub Desktop.
When you need to revoke a certificate but use Caddy (requires certbot)
caddy_ocsp=/var/lib/caddy/.local/share/caddy/ocsp
caddy_le=/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory
revoke() { certbot revoke --cert-path $caddy_le/$1/$1.crt --key-path $caddy_le/$1/$1.key --reason keyCompromise; rm $caddy_ocsp/$1-*; }
revoke useyour.domain && systemctl reload caddy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment