--dirsrv-cert-file — путь к одному или нескольким файлам, содержащим:
--dirsrv-pin — пароль для доступа к приватному ключу (требуется только для PKCS#12);
--http-cert-file —путь к одному или нескольким файлам, содержащим:
--http-pin — пароль для доступа к приватному ключу (требуется только для PKCS#12);
--ca-cert-file — путь к одному или нескольким файлам в формате PEM, содержащим сертификат(ы) CA, выдавшего сертификаты для:
Примечание
--dirsrv-cert-file и --http-cert-file.
--ca-cert-file.
--pkinit-cert-file — путь к файлу сертификата;
--pkinit-pin — пароль для доступа к приватному ключу;;
--no-pkinit — отключает настройку PKINIT. Если сертификат PKINIT не предоставлен, FreeIPA настроит KDC без поддержки PKINIT.
--dirsrv-cert-file и --http-cert-file можно указывать несколько раз, чтобы передать отдельные файлы (например, сертификат, ключ и промежуточный CA).
--dirsrv-cert-file, --http-cert-file и --ca-cert-file, должна содержать полную цепочку сертификатов от серверного сертификата до корневого CA, включительно. Без этого установка завершится ошибкой.
Предупреждение
# echo $HOSTNAME
ipa.example.test
# mkdir ~/test_ca
password.txt с паролем к закрытому ключу (длина пароля должна быть не меньше 8 символов):
# echo "SECret.123" > ~/test_ca/password.txt
# certutil -d ~/test_ca -N -f ~/test_ca/password.txt
# head -c20 /dev/random > ~/test_ca/noise.txt
# export CERT_SERIAL=1
#SKID="0x`openssl rand -hex 20`"#echo $SKID0xfa012b30b9407b0750b786ff5ed9f49ce3998622 #certutil -d ~/test_ca -S -n "CA" -s "CN=Certificate Authority" -x -t CT,,C -1 -2 -5 -m $CERT_SERIAL -v 120 -z ~/test_ca/noise.txt -f ~/test_ca/password.txt --extSKID
echo $SKID):
0 - Digital Signature 1 - Non-repudiation 5 - Cert signing key 9 - done Is this a critical extension [y/N]? y Is this a CA certificate [y/N]? y Enter the path length constraint, enter to skip [<0 for unlimited path] 0 Is this a critical extension [y/N]? y Enter value for the key identifier fields,enter to omit: 0xfa012b30b9407b0750b786ff5ed9f49ce3998622 Is this a critical extension [y/N]? n 5 - SSL CA 6 - S/MIME CA 7 - Object Signing CA 9 - done Is this a critical extension [y/N]? n
# head -c20 /dev/random > ~/test_ca/noise.txt
echo $SKID):
#SKID="0x`openssl rand -hex 20`"#echo $SKID0xb17caf72b46288bcc9c887c89894dc917e06f724 #certutil -d ~/test_ca -R -s CN=$HOSTNAME,O=IPA -o /tmp/servercert.req -k rsa -g 2048 -z ~/test_ca/noise.txt -f ~/test_ca/password.txt -a --extSKID --extSAN dns:ipa.example.testGenerating key. This may take a few moments... Adding Subject Key ID extension. Enter value for the key identifier fields,enter to omit: 0xb17caf72b46288bcc9c887c89894dc917e06f724 Is this a critical extension [y/N]? n
#export CERT_SERIAL=$(($CERT_SERIAL + 1))#certutil -d ~/test_ca -C -c "CA" -i /tmp/servercert.req -o /tmp/servercert.pem -m $CERT_SERIAL -v 120 -f ~/test_ca/password.txt -1 -5 -8 ipa.example.test -a
Примечание
-8 указывает certutil добавить расширение Subject Alternative Name (SAN) в сертификат.
ipa-server-install завершится ошибкой:
The server certificate in /root/test_ca/servercert.p12 is not valid: invalid for server ipa.example.testпоскольку сертификат будет считаться недействительным для указанного имени хоста.
0 - Digital Signature 2 - Key encipherment 9 - done Is this a critical extension [y/N]? n 1 - SSL Server 9 - done Is this a critical extension [y/N]? n
Примечание