Is it possible to generate openssl configuration file from an existing x509 certificate

certificateconfigurationopensslssl-certificatex509

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?

Best Answer

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, ...).