I am looking for a way to restore openssl configuration from an X509 certificate (or a csr). I know it's possible to look at the certificate and manually reconstruct the config file but it's unreliable and requires too much labor :P.

Any suggestions?

2 Answers 2


No, there is no builtin functionality in openssl, which allows to reconstruct the configuration used to create a certificate from the certificate alone.

This would be an impossible task, since there are quite a few administrative settings in the config file, which are not contained in the resulting certificate (like the actual openssl command used, paths and filenames, naming policy, ...).


XCA (small OpenSource Java PKI tool) supports exporting a X509 certificate as OpenSSL config template. Maybe does not cover all use cases, but it's probably a good start.

Just import the cert to the XCA database (e.g. drag and drop), right-click -> Export -> OpenSSL Config.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .