Skip to content

Not an Issue - A solution for 'distinguished_name' not found error when creating self-signed cert, Windows OpenSSL #1

Description

@JoeCrash

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.

  1. Update git for windows by running..
    git update-git-for-windows
  2. 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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions