User Tools

Site Tools


пакет_openssl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
пакет_openssl [2026/02/01 08:22]
val [Создание параметра DH]
пакет_openssl [2026/06/09 12:36] (current)
val [Создание запроса на сертификат пользователя]
Line 80: Line 80:
 ===== Создание самоподписанного сертификата ===== ===== Создание самоподписанного сертификата =====
  
-  * *.corpX.un для wild card сертификата 
 ==== Создание приватного ключа ==== ==== Создание приватного ключа ====
 <​code>​ <​code>​
Line 106: Line 105:
 <​code>​ <​code>​
 openssl genrsa -out wild.key 2048 openssl genrsa -out wild.key 2048
-openssl req -new -x509 -days 3650 -key wild.key -out wild.crt -subj '/CN=*.corpX.un/​O=CKO/​C=RU'​ -addext '​subjectAltName=DNS:​*.corpX.un'​ +openssl req -new -x509 -days 3650 -key wild.key -out wild.crt -subj '/​CN=corpX.un/​O=CKO/​C=RU'​ -addext '​subjectAltName=DNS:​corpX.un,​DNS:​*.corpX.un' ​
- +
 </​code>​ </​code>​
 ==== Просмотр содержимого файла сертификата ==== ==== Просмотр содержимого файла сертификата ====
Line 118: Line 115:
 ... ...
  
 +# openssl crl2pkcs7 -nocrl -certfile wild.bmstu.ru.crt | openssl pkcs7 -print_certs -text -noout
 +</​code><​code>​
 +Certificate:​
 +...
 +Certificate:​
 +...
 +</​code><​code>​
 $ cat ~/​.kube/​config | grep client-certificate-data | cut -f2 -d : | tr -d ' ' | base64 -d | openssl x509 -text -out - $ cat ~/​.kube/​config | grep client-certificate-data | cut -f2 -d : | tr -d ' ' | base64 -d | openssl x509 -text -out -
- 
 </​code><​code>​ </​code><​code>​
 ... ...
Line 268: Line 271:
 Enter pass phrase for ca.key:​Pa$$w0rd Enter pass phrase for ca.key:​Pa$$w0rd
 ... ...
-Common Name (eg, YOUR name) []:corpX.un+Common Name (eg, YOUR name) []:corpX 
 +</​code>​ 
 +ИЛИ 
 +<​code>​ 
 +openssl req -new -x509 -days 3650 -key CA/ca.key -out /​var/​www/​html/​ca.crt -subj '/​C=RU/​ST=Moscow region/​L=Moscow/​O=cko/​OU=noc/​CN=corpX'​
 </​code>​ </​code>​
- 
 ==== Инициализация списка отозванных сертификатов ==== ==== Инициализация списка отозванных сертификатов ====
 <​code>​ <​code>​
Line 287: Line 293:
 ==== Создание запроса на сертификат ==== ==== Создание запроса на сертификат ====
  
-  * *.corpX.un ​для wild card сертификата+  * для wild card сертификата ​CN=corpX.un,​ DNS.2 = *.corpX.un
  
 <​code>​ <​code>​
Line 394: Line 400:
 </​code>​ </​code>​
  
-==== Создание запроса на сертификат ====+==== Создание запроса на сертификат ​пользователя ​====
 <​code>​ <​code>​
 $ openssl req -new -key user1.key -out user1.req $ openssl req -new -key user1.key -out user1.req
Line 410: Line 416:
 <​code>​ <​code>​
 freeipaclient$ openssl req -new -key user1.key -out user1.req -subj '/​O=CORPX.UN/​CN=user1/​emailAddress=user1@corpX.un/'​ freeipaclient$ openssl req -new -key user1.key -out user1.req -subj '/​O=CORPX.UN/​CN=user1/​emailAddress=user1@corpX.un/'​
 +
 +freeipaclient$ openssl req -new -key user1.key -out user1.req -subj '/​O=cko/​CN=user1/'​
 </​code>​ </​code>​
  
пакет_openssl.1769923339.txt.gz · Last modified: 2026/02/01 08:22 by val