How to use certbot to obtain DER format certs

I’m using certonly subcommand to obtain a cert for a domain. By default certbot is obtaining a cert in PEM format. Is it possible to obtain a DER format cert?

From docs:

All files are PEM-encoded. If you need other format, such as DER or PFX, then you could convert using openssl. You can automate that with --deploy-hook if you’re using automatic renewal.

You will probably need to write a script and point --deploy-hook at it, that runs something like:

openssl x509 -outform der -in $RENEWED_LINEAGE/fullchain.pem -out $RENEWED_LINEAGE/fullchain.der  

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.