I also wanted to use OpenSSL on Windows 10. An easy way to do it without running into the risk of installing unknown software from 3rd party websites and risking viruses, is by using the openssl.exe that comes inside your Git for Windows installation. In my case, I found the OpenSSL executable in the following location of the Git for Windows installation.
C:\Program Files\Git\usr\bin\openssl.exe
If you also want instructions on how to use OpenSSL to generate and use certificates, here is a write-up on my blog. The step by step instructions first explain how to use Microsoft Windows Default Tool and also OpenSSL and explains the difference between them.
Answer from Kaushik Ghosh on Stack OverflowI also wanted to use OpenSSL on Windows 10. An easy way to do it without running into the risk of installing unknown software from 3rd party websites and risking viruses, is by using the openssl.exe that comes inside your Git for Windows installation. In my case, I found the OpenSSL executable in the following location of the Git for Windows installation.
C:\Program Files\Git\usr\bin\openssl.exe
If you also want instructions on how to use OpenSSL to generate and use certificates, here is a write-up on my blog. The step by step instructions first explain how to use Microsoft Windows Default Tool and also OpenSSL and explains the difference between them.
If you have chocolatey installed you can install openssl via a single command i.e.
choco install openssl
How do I install OpenSSL on Windows?
Where to find Windows 10 installer For OpenSSL?
Enabling legacy provider in OpenSSL for Windows
How To Get Started Using OpenSSL With PowerShell
How is AutoInstall SSLโข different from Letโs Encrypt or Certbot?
What is AutoInstall SSLโข?
Are wildcard certificates supported?
Videos
Hello,
So far I've been using OpenSSL on Windows via the OpenSSL that comes bundled with XAMPP.
But what if I want to install OpenSSL myself on Windows? I could not find a way to do it directly from the official OpenSSL source.
That's because I want the newest OpenSSL version 3 instead of 1.1.1 that comes with XAMPP
How can I do it?
Thanks
I hope someone can advise me what have I been missing in order to generate the certificate.
You attempted to run OpenSSL prompt commands within a Command Prompt. You need to run OpenSSL within a Command Prompt in order to start the required OpenSSL prompt.
This required step was clearly indicated in the tutorial you linked to.
Open a command prompt and type
opensslto get OpenSSL prompt. Then run version command on OpenSSL proper to view installed OpenSSL version.

Source: How To Install OpenSSL on Windows
Based on the information provided in the question body, and the fact you are getting 'version' is not recognized as an internal or external command, operable program or batch file.` it means you are not launching OpenSSL. I have provided a screenshot that explains what you should be doing exactly.

Even going into the bin area where openSSL.exe reside, it is no good still
C:\Program Files\OpenSSL-Win64\bin>openssl req -x509 -out localhost.crt -keyout localhost.key \ req: Use -help for summary.
You need to run OpenSSL.exe before you run this command.

Issue the command exactly as it appears in the above screenshot. If you did not choose to include the OpenSSL \bin directory then you should reinstall OpenSSL.
In order for this OpenSSL command to work, -subj '/CN=localhost' -extensions EXT -config, you must have defiend the OPENSSL_CONF PATH system variable. There is a way to avoid creating the system variable but that isn't within the scope of this answer.
Same question was asked on StackOverflow and the solution is quite simple.
You probably have Git installed on your machine, so you can simply run openssl on the Git Bash.