
As X.509 is a well-known standard for public certificates, we should always use this one. -x509 is the standard we are going to apply to our certificate.req tells OpenSSL we want to request a certificate.We will cover what are keys and certificates in a minute, but for now, we should limit to analyze the command, piece by piece. This will create a new key and a certificate from it. openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 Unfolding the command Here is the command to generate your certificate. That’s a third-party that most people and systems trust. The opposite of a self-signed certificate is a certificate signed by a Certificate Authority (CA). However, they can have a valid role in an internal environment, that is not exposed to the Internet. What is the purpose of self-signed certificates then? Of course, you can use them for tests. With no surprise, nobody will trust you and web browsers will still show the non-secure message. With a self-signed certificate, you verify your own identity. In fact, a certificate is the way a computer has to state its verified identity. But before we do that, it is worth mentioning that a self-signed certificate is almost useless. How to use OpenSSL to create a self-signed certificate? It is very easy, and it takes only one command. Making your first self-signed certificate We are ready to start to see how to use OpenSSL. Now, you can open your command prompt and simply type openssl to launch the OpenSSL terminal. Once done, just apply your way out.įor example, I have installed OpenSSL in E:\Software\OpenSSL, so I will have to use E:\Software\OpenSSL\bin. Now, click New on the right and write in the new text row that appears the path to your OpenSSL bin folder. In it, click on Environment Variables, select Path from the list on top, and click “Edit”. Open the start and search for Edit the system Environment Variables, then a dialog will appear.

By doing so, you can access OpenSSL from anyplace in your command prompt. While not required, this is very helpful in day-to-day work. Once you finished with the install, we need to add OpenSSL to our PATH environment variable. However, you need to remember the folder where you install OpenSSL. This is a simple visual setup that you can finish by Next-Next.

In both cases, you will download an executable file you need to run. First, we need to download the OpenSSL binaries, and we can do that from the OpenSSL wiki. Doing so is very simple, even on Windows. How to use OpenSSL Installing OpenSSL on Windowsīefore we start working on how to use OpenSSL, we need to install it first. The green lock is a requirement for any modern website.
