此内容没有您所选择的语言版本。
22.2. Setting up the CA on the New Host
After you have exported the data from the existing Directory Server and Certificate System instances in Section 22.1, “Exporting Data from the Previous System”, set up the certificate authority (CA) on the new host:
- Set up Directory Server. See Section 6.5, “Installing Red Hat Directory Server”.
- Enable the Certificate System repository. See Section 6.6, “Attaching a Red Hat Subscription and Enabling the Certificate System Package Repository”.
- Install the pki-ca package:
yum install pki-ca
# yum install pki-ca
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you require additional features, such as the Certificate System console, install the corresponding packages. For details, see Section 7.2, “Certificate System Packages”. - When setting up the CA on a host that uses an IPv6 address, apply the steps described in Section 11.2, “Enabling IPv6 for a Subsystem”.
- Depending on your environment, this step differs.
- When using a hardware security module (HSM):Create a deployment configuration file, for example
/root/pki-CA-deployment.txt
, with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For descriptions of the parameters used in the previous example, see Table 22.1, “pkispawn Parameter Descriptions” at the end of this step. - When not using a hardware security module (HSM):
- Verify that the PKCS #12 file contains the CA signing certificate and key. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that the file can additionally contain other certificates and keys. - Verify the trust flags of the CA signing certificate in the output of the previous step. Reset the flags if they are not set to
CTu,Cu,Cu
or if they are missing:pki pkcs12-cert-mod caSigningCert cert-pki-tomcat CA \ --pkcs12-file /tmp/cs_bak/ca.p12 \ --pkcs12-password-file /tmp/cs_bak/pkcs12_password.txt \ --trust-flags "CTu,Cu,Cu"
# pki pkcs12-cert-mod caSigningCert cert-pki-tomcat CA \ --pkcs12-file /tmp/cs_bak/ca.p12 \ --pkcs12-password-file /tmp/cs_bak/pkcs12_password.txt \ --trust-flags "CTu,Cu,Cu"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove all other certificates and keys, except the CA signing certificate and key, from the PKCS #12 file. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - If the CA being migrated is an intermediate CA, remove the root CA certificate from the PKCS #12 file. For example:
pki pkcs12-cert-del ca-pki-ca \ --pkcs12-file /tmp/cs_bak/ca.p12 \ --pkcs12-password-file /tmp/cs_bak/pkcs12_password.txt
# pki pkcs12-cert-del ca-pki-ca \ --pkcs12-file /tmp/cs_bak/ca.p12 \ --pkcs12-password-file /tmp/cs_bak/pkcs12_password.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a deployment configuration file, for example
/root/pki-CA-deployment.txt
, with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For descriptions of the parameters used in the previous example, see Table 22.1, “pkispawn Parameter Descriptions”.
Expand Table 22.1. pkispawn Parameter Descriptions Parameters and SettingsDescriptionpki_hsm_*
andpki_token_*
Enables communication with the HSM. Only set these parameters when setting up a CA with HSM.pki_existing=True
Sets to use the existing CA mechanism.pki_ca_signing_nickname
The CA signing nickname must be exactly the same as used in the previous installation, otherwise the installer cannot find the signing key.pki_ca_signing_*
Sets the paths to the certificate signing request (CSR) and the certificate files copied from the existing machine.pki_pkcs12_*
Sets the path to the PKCS #12 file and the password used to decrypt the file. Do not set this parameter when deploying a CA with HSM.pki_ds_base_dn
Sets the Directory Server base distinguished name (DN). The value must be the same as on the previous CA. You can find this value on the previous host in theinternaldb.basedn
parameter in the/var/lib/instance_name/conf/CS.cfg
file.pki_serial_number_range_start
The serial number is critical. The value must be higher than the last number used in the previous CA. To display which numbers are already used, see the old CA's agent interface. This parameter is set in hex format without the leading0x
prefix. The value used in the examples (4e
) is78
in decimal.pki_request_number_range_start
The request number is critical. The value must be higher than the last number used in the previous CA. To display which numbers are already used, see the old CA's agent interface. The value is set in decimal format.pki_master_crl_enable=False
Prevents the initial creation and publishing of a certificate revocation list (CRL) during the setup. Instead, the CRL will be imported from the old data during the database migration.pki_cert_chain_path
andpki_cert_chain_nickname
Set these parameters only if the old CA is an intermediate CA. In this case, set the parameters to the path to the root CA certificate file and the nickname to use when storing the certificate in the network security services (NSS) database.pki_ca_signing_record_create=False
Disables the recreation of the CA signing record at the end of thepkispawn
process. This enables you to import the old database.pki_ca_signing_serial_number
Sets the serial number of the CA signing certificate in decimal. This is to delete the initially created signing certificate database record and import it through the ldif data import instead; in a sequential serial number scheme, it should be the decimal representation of the value set in pki_serial_number_range_start. E.g.: pki_serial_number_range_start=100 pki_ca_signing_serial_number=256For further details and parameter descriptions, see the pkispawn(8) man page. - Create the new CA using the deployment configuration file. For example:
pkispawn -s CA -f /root/pki-CA-deployment.txt
# pkispawn -s CA -f /root/pki-CA-deployment.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the CA signing key ID is the same in the existing and in the new CA. For example:
grep "internal=" /var/lib/instance_name/conf/password.conf | \ awk -F= '{print $2;}' > internal.txt
# grep "internal=" /var/lib/instance_name/conf/password.conf | \ awk -F= '{print $2;}' > internal.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow certutil -K -d /var/lib/instance_name/alias/ -f internal.txt
# certutil -K -d /var/lib/instance_name/alias/ -f internal.txt ... < 2> rsa 7bd4dc662670ebe08a35086b054175559608ac20 caSigningCert ca-pki-ca ...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow