1

I'd like to be able to get the default DN from openssl.cnf. http://www.php.net/manual/en/openssl.installation.php talks about where the openssl.cnf file is stored by default but when it talks about OPENSSL_CONF... it seems like that'd be an OS environmental variable - not one that PHP would be able to get access to unless it did something like exec('echo %OPENSSL_CONF%') or something.

I guess I could create an X.509 cert with OpenSSL and get the DN from that but that seems a little excessive. Plus, that doesn't fail very gracefully if the openssl.conf file isn't present. At least in so far as I know..

Any ideas?

neubert
  • 15,947
  • 24
  • 120
  • 212
  • There is no default Distinguished Name. Each DN is unique (or supposed to be unique), and it depends on the name of the subject. Your `openssl.cnf` issue is a different problem. For that, see [How to determine the default location for openssl.cnf](http://stackoverflow.com/q/37035300) and [Correct location of openssl.cnf file](http://stackoverflow.com/q/21477210). – jww May 05 '16 at 05:19
  • Also see [“unable to find 'distinguished_name' in config”](http://superuser.com/q/947061) on Super User. – jww May 05 '16 at 05:37

0 Answers0