If you encounter this error on Windows
unable to find 'distinguished_name' in config
problems making Certificate Request
11088:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:crypto\conf\conf_lib.c:270:
When running this command
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365
Solution for OpenSSL bundled with Git for Windows
Two things to do here.
- Update git for windows by running..
git update-git-for-windows
- Switch to git-bash and re-run the openSSL command.
It should work now.
Solution for OpenSSL standalone install:
One way to do it, passing in your openssl.cnf file location. (that path is the default)
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 -config c:\OpenSSL-Win64\bin\openssl.cfg
Another way to do it is by setting the 'openssl_conf' flag with the path
set openssl_conf=c:\OpenSSL-Win64\bin\openssl.cfg
You can also set this directly in the environment variables tab. Add it to the 'system variables' section if you go the manual route.
Pick an option and then re-run your openSSL command/
If you encounter this error on Windows
When running this command
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365Solution for OpenSSL bundled with Git for Windows
Two things to do here.
git update-git-for-windowsIt should work now.
Solution for OpenSSL standalone install:
One way to do it, passing in your openssl.cnf file location. (that path is the default)
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 -config c:\OpenSSL-Win64\bin\openssl.cfgAnother way to do it is by setting the 'openssl_conf' flag with the path
set openssl_conf=c:\OpenSSL-Win64\bin\openssl.cfgYou can also set this directly in the environment variables tab. Add it to the 'system variables' section if you go the manual route.
Pick an option and then re-run your openSSL command/