Website security has become crucial nowadays due to the increasing number of cyberattacks. Activating a TLS certificate on your website guarantees its protection. But before buying an SSL certificate, you have to generate a code signing request on the website you want to protect with an SSL certificate. Let us start with CSR’s basics and then go deep to explain the intricacies to help you create a CSR.
What is CSR?
A CSR or Certificate Signing request is a piece of the encrypted message delivered to the certification authority when making a demand for an SSL Certificate. It is usually created on the server where the certificate will be enabled and includes details displayed in the license, like the name of the entity, the common name (domain name), the location, and the region.
It also includes the public key that will be used in the license. A private key is generally generated simultaneously as you create a CSR, which makes a key combination. CSR is typically encrypted utilizing ASN.1 as defined in PKCS #10.
The certificate authority uses the CSR to build your SSL certificate, but you must not send your secret key. It would be best if you secured your private key firmly. The license issued with a specific CSR will operate only when used in tandem with the secret key that has been created along with it. In case you have lost your private key, then the certificate will become useless – so store it carefully to secure it from theft or loss.
What does a CSR look like?
Most of the CSRs get generated in a Base-64 encrypted PEM layout and contain “he “——BEGIN CERTIFICATE REQU” ST—” as the CSR header label “nd “———END CERTIFICATE REQU” ST—” statement as the CSR footer label. The default CSR PEM template will appear like the below-given example:
How to generate CSR and private key?
You can create your Certificate Signing Request file, e.g. if you run the web hosting on your own or if this is the right choice for your domain type/hosting plan. If you are using cPanel, then follow these instructions to create a code signing request in your account:
- Sign in to your cPanel account.
- F” nd “SSL/TLS Man” ger” in the security segment
- Tap on it
- In this section, you will see four lines, namely.
- Private Key
- Certificate Signing Request (CSR)
- Certificates (CRT)
- Install and Manage SSL for your Site
- Click on “the “CSR” section
- In the new window, search for an option with “he “Generate a New Code Signing Request (“SR)”. If you cho “se “Generate a new 2048-bit “ey,” a new secret key will be produced. If a private key has been created separately, pick it from the drop-down box.
- Insert the following details for the CSR key to be sent to the Certificate Authority. Also, be sure to utilize alphanumeric letters only when entering the information.
- Domain name– Submit the fully qualified domain name the SSL will be enabled on (common name). The common name for all Wildcard licenses should be displayed with an asterisk in front of the website (*. instance.com). To build your CSR key for various domains, insert each site on a new line.
- Locality – Type the proper name of the city where your business is operating. Avoid using abbreviations
- Region – Again provide the complete name of your state or province instead of using abbreviations
- Country – From the drop-down list in this section, select your country name
- Organization – Enter the name of your company exactly as on official records. Certificate authorities will validate the requested entity for the company and extended validation certificates. For domain validation SSLs, this category will not be displayed on the certificate given (you can wr “te” “NA” for Firm when issuing the domain validation certificates if you do not have a verified company)
- Company unit – Write the team or department’s name inside the company mentioned earlier that will handle SSL certificates. You can t “pe” “NA” if you are requesting a Domain Validation Certificate.
- Email – Enter your valid email address in this section
- Passphrase – It was intended to be another authentication attribute to verify the applicant’s identity for a certificate. This area is currently viewed as obsolete. So, feel free to leave it empty.
- Now, tap on “he “Generate “CSR” tab.
- On the next page, you will see the newly created CSR for your domain. You can now send this to your certificate issuer to buy your SSL certificate. Make sure to add —–BEGIN CERTIFICATE REQUEST—– and —–END CERTIFICATE REQUEST—– in the CSR file before forwarding it to the certification authority.
What information is needed for CSR?
The certification authority will utilize the certificate signing request data to produce your SSL certificate. The important parts of information are as follows.
Details about your company and the site that you are planning to equip with SSL, such as:
ü Common Name – The complete FQDN name of your website. For instance, www.abc.com, page.abc.com
ü Organization – Official name of your business. Avoid using abbreviated here
ü Company Unit – The department or unit in your organization that will be dealing with SSL certificate
ü City – Complete name of the city in which your Firm is operating. Do not use abbreviated here
ü Region – Full name of the state
ü Country – Two-letter code for the country where your company is located
ü Email address – A working email address that will be used for the communication process ahead
- The public key to be added to the license. SSL utilizes public key or asymmetric encryption to encrypt the transferred information during an SSL session. The public key is employed to encode it, and the matching private key is utilized to decode it.
- Details about the kind and size of the key. The most popular key length is RSA 2048, but some certification authorities encourage bigger key lengths (e.g. RSA 4096+) or ECC keys.
How to decode CSR?
You can conveniently decrypt your CSR and see what it contains by using a CSR decoder. If you want to decode it on your device utilizing OpenSSL, then run the below-mentioned code:
OpenSSL req -in server.csr -noout –text
Conclusion
Code signing request is a must to purchase an SSL certificate for your business domain. If you do not create a CSR for your website, then you cannot request the certification authority for an SSL certificate. Generating a CSR is not tricky. It just needs a little time and important information about your business and the domain as well.
Following the above information and steps about CSR generation will help you better understand what CSR is and help you easily create a CSR for ycompany’sny’s website.