Step 1 : Generating a Private Key
Open the OpenSSL tool using Terminal/Command Prompt
We create a Private Key that has a 1024 RSA key with Triple-DES encryption. This key is stored as PEM (Privacy Enhanced Email) format which contains ASCII text hence you can read it with a text editor too.
OpenSSL> genrsa -des3 -out mySSL.key 1024
Generating RSA private key, 1024 bit long modulus .............++++++
........++++++
e is 65537 (0x10001)
Enter passphrase for mySSL.key:
Verifying - Enter pass phrase for mySSL.key:
OpenSSL>
Step 2 : Generating CSR Request (Certificate Signing Request)
In Step 1 we created a Private Key, now we need to generate a Certificate Signing Request.
Its a request that is sent to the Certificate Authority (CA) like Verisign who verify the identity of the organization who is requesting the certificate and issues a signed Certificate.
But as we are going to do a Self Signing we do not require a CA, let's see how it is done,
When we run the command for CSR we will be prompted with questions that need to be addressed, these are called as X.509 attributes of a Certificate. You will be prompted to fill the following,
Country Name in ISO format
Full State or Province Name
Locality Name i.e your City
Organization Name
Organizational Unit Name
Common Name
Email Address
OpenSSL> req -new -key server.key -out server.cs
Enter passphrase for server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:New York
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Code2care Tech
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:Code2care
Email Address []:xyz@somedomainname.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: your password
An optional company name []:c2c
Step 3 : Generating Self Signed Certificate
Now we will request a Self-signed certificate, for this we need to provide the number of days that this certificate is valid. Once you run this command the certificate file will be generated (for me the location of the file is under XAMPP/etc/ssl.crt/server.crt)
OpenSSL>x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=US/ST=New York/L=New York/O=Code2care Tech/OU=I T/CN=Code2care/ emailAddress= xyz@somedomainname.com
Getting Private key
Enter pass phrase for server.key:
OpenSSL>
- Fix NVIDIA GeForce Experience ERROR CODE 0x0003
- How to convert byte array to String [Kotlin]
- Unzip a Zip file from Terminal Command
- How to write hello world different languages syntax
- [Error] zsh: command not found: mvn
- How to know the version of OpenSSL
- [Solution] IDEA IntelliJ System.out.println function shortcut (sysout alternative for eclipse IDE)
- The default username and password for RabbitMQ
- ChatGPT Outage: Hmm...something seems to have gone wrong. Maybe try me again in a little bit.
- How to check the version of NodeJS installed
- Gmail Unable to upload because it is a folder or a package (like an application bundle or RTFD document)
- How to remove password from pdf file
- BSNL Broadband upgrades speed to minimum 2MBps for all users 512Kbps 1Mbps
- MongoDB: Failed to connect to 127.0.0.1:27017 reason: Connection refused
- Turn off Focus Mode on Mac
- Steps to Delete or Deactivate Instagram Account
- [IRCTC] Indian railways official eRail API 1.1 for developers to get train info
- CentOS Cannot find a valid baseurl for repo base7x86_64 yum
- Why I see Download pre-built shared indexes in IntelliJ
- Copy file from a remote server to current local directory system using SCP command
- [Fix] Minecraft Error: A JNI error has occurred, please check your installation and try again
- How to install Zsh shell
- Merge multiple zip files without unzipping (extracting)
- How to find someone on Instagram
- How to get an embed code from Vimeo?
- How to Open Finder using Mac Terminal - MacOS
- Android Studio emulator/Device logCat logs not displayed - Android-Studio
- How to embed web page in SharePoint - SharePoint
- How to know the Safari Version on Mac - MacOS
- Convert Java Array to ArrayList Code Example - Java
- How to show End of Line Characters in File using Notepad++ - NotepadPlusPlus
- The selected device is incompatible : Android Studio - Android-Studio
- Bash Command to Find String in a File - Bash