Ubuntu Server Guide Changes, errors and bugs
Generating a Certificate Signing Request (CSR)
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
Generating a Certificate Signing Request (CSR)
Whether you are getting a certificate from a CA or generating your own self-signed certificate, the first step is to generate a key. If the certificate will be used by service daemons, such as Apache, Postfix, Dovecot, etc., a key without a passphrase is often appropriate. Not having a passphrase allows the services to start without manual intervention, usually the preferred way to start a daemon. This section will cover generating a key with a passphrase, and one without. The non-passphrase key will then be used to generate a certificate that can be used with various service daemons. Warning Running your secure service without a passphrase is convenient because you will not need to enter the passphrase every time you start your secure service. But it is insecure and a compromise of the key means a compromise of the server as well. To generate the keys for the Certificate Signing Request (CSR) run the following command from a terminal prompt: o p e n s s l g e n r s a −d e s 3 −out s e r v e r . key 2048 G e n e r a t i n g RSA p r i v a t e key , 2048 b i t l o n g modulus . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + .......++++++ e i s 65537 ( 0 x10001 ) Enter p a s s p h r a s e f o r s e r v e r . key : You can now enter your passphrase. For best security, it should at least contain eight characters. The minimum length when specifying −des3 is four characters. As a best practice it should include numbers and/or punctuation and not be a word in a dictionary. Also remember that your passphrase is case-sensitive. Re-type the passphrase to verify. Once you have re-typed it correctly, the server key is generated and stored in the server .key file. Now create the insecure key, the one without a passphrase, and shuffle the key names: o p e n s s l r s a −i n s e r v e r . key −out s e r v e r . key . i n s e c u r e mv s e r v e r . key s e r v e r . key . s e c u r e mv s e r v e r . key . i n s e c u r e s e r v e r . key The insecure key is now named server .key, and you can use this file to generate the CSR without passphrase. To create the CSR, run the following command at a terminal prompt: o p e n s s l r e q −new −key s e r v e r . key −out s e r v e r . c s r It will prompt you enter the passphrase. If you enter the correct passphrase, it will prompt you to enter Company Name, Site Name, Email Id, etc. Once you enter all these details, your CSR will be created and it will be stored in the server . csr file. You can now submit this CSR file to a CA for processing. The CA will use this CSR file and issue the certificate. On the other hand, you can create self-signed certificate using this CSR. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling