Генерация CSR-запроса для получения SSL сертификата
Генерируем свой key файл
openssl genrsa -des3 -out /root/serts/private.key 1024
Вводим парольную фразу ( ее не забывать ! )
electron:~# openssl genrsa -des3 -out /root/serts/private.key 1024
Generating RSA private key, 1024 bit long modulus
.++++++
..++++++
e is 65537 (0x10001)
Enter pass phrase for /root/serts/private.key:
Verifying — Enter pass phrase for /root/serts/private.key:
electron:~#
Генерация CSR-запроса
openssl req -new -key /root/serts/private.key -out /root/serts/request.csr
Вводим первой строкой по запросу парольную фразу из прошлого шага, а далее отвечаем на вопросы.
electron:~# openssl req -new -key /root/serts/private.key -out /root/serts/request.csr
Enter pass phrase for /root/serts/private.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]:RU
State or Province Name (full name) [Some-State]:XXxXX
Locality Name (eg, city) []:XXxXX
Organization Name (eg, company) [Internet Widgits Pty Ltd]:XXxXX
Organizational Unit Name (eg, section) []:Tech
Common Name (eg, YOUR name) []:Nick
Email Address []:xxx@xxx.ru
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:electron
An optional company name []:XXxXX
На выходе получаем key файл, необходимый для подключения SSL к апачу например и CSR файл для запроса SSL :
electron:~# ls /root/serts
private.key request.csr