You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* suggested changes
* sentence style capitalization on all headings
* change "we" and "our" to "you" and "your" where appropriate
* replace conjunctions with words
* remove passive voice
* add <kbd></kbd> tags for the ENTER commands
Copy file name to clipboardExpand all lines: docs/guides/security/ssl_keys_https.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,88 +9,87 @@ tags:
9
9
- openssl
10
10
---
11
11
12
-
# Generating SSL Keys
12
+
# Generating SSL/TLS keys
13
13
14
14
## Prerequisites
15
15
16
-
* A workstation and a server running Rocky Linux (OK, Linux, but really, you want Rocky Linux, right?)
17
-
*_OpenSSL_ installed on the machine that you are going to be generating the private key and CSR, as well as on the server where you will eventually be installing your key and certificates
16
+
* A workstation and a server running Rocky Linux
17
+
*_OpenSSL_ installed on the machine that you are going to be generating the private key and CSR (Certificate Signing Request), and on the server where you will eventually be installing your key and certificates
18
18
* Able to run commands comfortably from the command-line
19
-
* Helpful: knowledge of SSL and OpenSSL commands
19
+
* Helpful: knowledge of SSL/TLS and OpenSSL commands
20
20
21
21
22
22
## Introduction
23
23
24
-
Nearly every web site today _should_ be running with an SSL (secure socket layer) certificate. This procedure will guide you through generating the private key for your web site and then from this, generating the CSR (certificate signing request) that you will use to purchase your new certificate.
24
+
Nearly every web site today _should_ be running with an SSL/TLS (secure socket layer) certificate. This procedure will guide you through generating the private key for your web site and then generating the CSR (certificate signing request) that you will use to purchase your certificate.
25
25
26
-
## Generate The Private Key
26
+
## Generate the private key
27
27
28
-
For the uninitiated, SSL private keys can have different sizes, measured in bits, which basically determines how hard they are to crack.
28
+
For the uninitiated, SSL/TLS private keys can have different sizes, measured in bits, determining how hard they are to crack.
29
29
30
-
As of 2021, the recommended private key size for a web site is still 2048 bits. You can go higher, but doubling the key size from 2048 bits to 4096 bits is only about 16% more secure, takes more space to store the key, and causes higher CPU loads when the key is processed.
30
+
As of 2021, a website's recommended private key size is still 2048 bits. You can go higher, but doubling the key size from 2048 bits to 4096 bits is only about 16% more secure, takes more space to store the key, and causes higher CPU loads when processing the key.
31
31
32
-
This slows down your web site performance without gaining any significant security. Stick with the 2048 key size for now and always keep tabs on what is currently recommended.
33
-
34
-
To start with, let's make sure that OpenSSL is installed on both your workstation and server:
32
+
This slows down your web site performance without gaining any significant security. Stick with the 2048 key size and always keep tabs on what is currently recommend
33
+
To start with, ensure the installation of OpenSSL on your workstation and server:
35
34
36
35
`dnf install openssl`
37
36
38
37
If it is not installed, your system will install it and any needed dependencies.
39
38
40
-
Our example domain is example.com. Keep in mind that you would need to purchase and register your domain ahead of time. You can purchase domains through a number of "Registrars".
39
+
The example domain is "example.com." Remember that you will need to purchase and register your domain beforehand. You can purchase domains through several "Registrars".
41
40
42
41
If you are not running your own DNS (Domain Name System), you can often use the same providers for DNS hosting. DNS translates your named domain, to numbers (IP addresses, either IPv4 or IPv6) that the Internet can understand. These IP addresses will be where the web site is actually hosted.
Note that we named the key, with a .pass extension. That's because as soon as we execute this command, it requests that you enter a passphrase. Enter a simple passphrase that you can remember as we are going to be removing this shortly:
47
+
Note that you named the key, with a *.pass* extension. That is because when you run this command, it requests that you enter a passphrase. Enter a simplistic passphrase that you can remember as you are going to be removing this shortly:
49
48
50
49
```
51
50
Enter pass phrase for example.com.key.pass:
52
51
Verifying - Enter pass phrase for example.com.key.pass:
53
52
```
54
53
55
-
Next, let's remove that passphrase. The reason for this is that if you don't remove it, each time your web server restarts and loads up your key, you will need to enter that passphrase.
54
+
Next, remove that passphrase. This is because if you do not remove it, you will need to enter that passphrase each time your website restarts and loads up your key.
56
55
57
-
You might not even be around to enter it, or worse, might not have a console at the ready to enter it. Remove it now to avoid all of that:
56
+
You might not even be around to enter it, or worse, might not have a console available. Remove it now to avoid all of that:
This will request that passphrase once again to remove the passphrase from the key:
62
61
63
62
`Enter pass phrase for example.com.key.pass:`
64
63
65
-
Now that you have entered the passphrase a third time, it has been removed from the key file and saved as example.com.key
64
+
Your password is now removed from the key now that you have entered the passphrase a third time, and saved as *example.com.key*
66
65
67
66
## Generate the CSR
68
67
69
-
Next, we need to generate the CSR (certificate signing request) that we will use to purchase our certificate.
68
+
Next, you need to generate the CSR (certificate signing request) that you will use to purchase your certificate.
70
69
71
-
During the generation of the CSR, you will be prompted for several pieces of information. These are the X.509 attributes of the certificate.
70
+
Prompting for several pieces of information occurs during the generation of the CSR. These are the X.509 attributes of the certificate.
72
71
73
-
One of the prompts will be for "Common Name (e.g., YOUR name)". It is important that this field be filled in with the fully qualified domain name of the server to be protected by SSL. If the website to be protected will be https://www.example.com, then enter www.example.com at this prompt:
72
+
One of the prompts will be for "Common Name (e.g., YOUR domain name)". This field must have the fully qualified domain name of the server that the SSL/TLS is protecting. If the website to be protected will be https://www.example.com, then enter www.example.com at this prompt:
`Country Name (2 letter code) [XX]:` enter the two character country code where your site resides, example "US"
78
+
`Country Name (2 letter code) [XX]:` enter the two character country code where your site resides, for example "US"
80
79
81
-
`State or Province Name (full name) []:` enter the full official name of your state or province, example "Nebraska"
80
+
`State or Province Name (full name) []:` enter the full official name of your state or province, for example "Nebraska"
82
81
83
-
`Locality Name (eg, city) [Default City]:` enter the full city name, example "Omaha"
82
+
`Locality Name (eg, city) [Default City]:` enter the full city name, for example "Omaha"
84
83
85
-
`Organization Name (eg, company) [Default Company Ltd]:` If you want, you can enter an organization that this domain is a part of, or just hit 'Enter' to skip.
84
+
`Organization Name (eg, company) [Default Company Ltd]:` If you want, you can enter an organization that this domain is a part of, or just hit <kbd>ENTER</kbd> to skip.
86
85
87
-
`Organizational Unit Name (eg, section) []:` This would describe the division of the organization that your domain falls under. Again, you can just hit 'Enter' to skip.
86
+
`Organizational Unit Name (eg, section) []:` This would describe the division of the organization that your domain falls under. Again, you can just hit <kbd>ENTER</kbd> to skip.
88
87
89
-
`Common Name (eg, your name or your server's hostname) []:` Here, we have to enter our site hostname, example "www.example.com"
88
+
`Common Name (eg, your name or your server's hostname) []:` Here, you have to enter your site hostname, example "www.example.com"
90
89
91
-
`Email Address []:` This field is optional, you can decide to fill it out or just hit 'Enter' to skip.
90
+
`Email Address []:` This field is optional, you can decide to fill it out or just hit <kbd>ENTER</kbd> to skip.
92
91
93
-
Next, you will be asked to enter extra attributes which can be skipped by hitting 'Enter' through both:
92
+
Next, the procedure prompts you to enter extra attributes. Skipping these is possible by hitting <kbd>ENTER</kbd>:
94
93
95
94
```
96
95
Please enter the following 'extra' attributes
@@ -99,11 +98,11 @@ A challenge password []:
99
98
An optional company name []:
100
99
```
101
100
102
-
Now you should have generated your CSR.
101
+
Generating of your CSR is complete.
103
102
104
-
## Purchasing The Certificate
103
+
## Purchasing the certificate
105
104
106
-
Each certificate vendor will have basically the same procedure. You purchase the SSL and term (1 or 2 years, etc.) and then you submit your CSR. To do this, you will need to use the `more` command, and then copy the contents of your CSR file.
105
+
Each certificate vendor will have basically the same procedure. You purchase the SSL/TLS and term (1 or 2 years, etc.) and then you submit your CSR. To do this, you will need to use the `more` command, and then copy the contents of your CSR file.
107
106
108
107
`more example.com.csr`
109
108
@@ -131,8 +130,9 @@ HFOltYOnfvz6tOEP39T/wMo=
131
130
132
131
You want to copy everything including the "BEGIN CERTIFICATE REQUEST" and "END CERTIFICATE REQUEST" lines. Then paste these into the CSR field on the web site where you are purchasing the certificate.
133
132
134
-
You may have to perform other verification steps, depending on ownership of the domain, the registrar you are using, etc., before your certificate is issued. When it is issued, it should be issued along with an intermediate certificate from the provider, which you will use in the configuration as well.
133
+
Before issuing your certificate, You may have to perform other verification steps depending on domain ownership, the registrar you are using, etc.When issued, it will include an intermediate certificate from the provider, which you will also use in the configuration.
135
134
136
135
## Conclusion
137
136
138
-
Generating all of the bits and pieces for the purchase of a web site certificate is not terribly difficult and can be performed by the systems administrator or web site administrator using the above procedure.
137
+
Generating all of the bits and pieces for purchasing a web site certificate is not difficult using this procedure.
0 commit comments