Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
5.2. Creating Certificate Signing Requests
- Generating CSRs using command line utilities
- Generating CSRs inside a supporting browser
- Generating CSRs inside an application, such as the installer of a server
- Command-line utilities
- Server-Side Key Generation
5.2.1. Generating CSRs Using Command-Line Utilities Link kopierenLink in die Zwischenablage kopiert!
certutil: Supports creating PKCS #10 requests.PKCS10Client: Supports creating PKCS #10 requests.CRMFPopClient: Supports creating CRMF requests.pki client-cert-request: Supports both PKCS#10 and CRMF requests.
5.2.1.1. Creating a CSR Using certutil Link kopierenLink in die Zwischenablage kopiert!
certutil utility to create a CSR.
certutil, see:
- The certutil(1) man page
- The output of the
certutil --helpcommand
5.2.1.1.1. Using certutil to Create a CSR with EC Keys Link kopierenLink in die Zwischenablage kopiert!
certutil utility to create an Elliptic Curve (EC) key pair and CSR:
- Change to the certificate database directory of the user or entity for which the certificate is being requested, for example:
cd /user_or_entity_database_directory/
$ cd /user_or_entity_database_directory/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the binary CSR and store it in the
/user_or_entity_database_directory/request.csrfile:certutil -d . -R -k ec -q nistp256 -s "CN=subject_name" -o /user_or_entity_database_directory/request-bin.csr
$ certutil -d . -R -k ec -q nistp256 -s "CN=subject_name" -o /user_or_entity_database_directory/request-bin.csrCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the required NSS database password when prompted.For further details about the parameters, see the certutil(1) man page. - Convert the created binary format CSR to PEM format:
BtoA /user_or_entity_database_directory/request-bin.csr /user_or_entity_database_directory/request.csr
$ BtoA /user_or_entity_database_directory/request-bin.csr /user_or_entity_database_directory/request.csrCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Optionally, verify that the CSR file is correct:
cat /user_or_entity_database_directory/request.csr MIICbTCCAVUCAQAwKDEQMA4GA1UEChMHRXhhbXBsZTEUMBIGA1UEAxMLZXhhbXBs ...
$ cat /user_or_entity_database_directory/request.csr MIICbTCCAVUCAQAwKDEQMA4GA1UEChMHRXhhbXBsZTEUMBIGA1UEAxMLZXhhbXBs ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow This is a PKCS#10 PEM certificate request.
5.2.1.1.2. Using certutil to Create a CSR With User-defined Extensions Link kopierenLink in die Zwischenablage kopiert!
certutil utility.
- Change to the certificate database directory of the user or entity for which the certificate is being requested, for example:
cd /user_or_entity_database_directory/
$ cd /user_or_entity_database_directory/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the CSR with user-defined Key Usage extension as well as user-defined Extended Key Usage extension and store it in the
/user_or_entity_database_directory/request.csrfile:certutil -d . -R -k rsa -g 1024 -s "CN=subject_name" --keyUsage keyEncipherment,dataEncipherment,critical --extKeyUsage timeStamp,msTrustListSign,critical -a -o /user_or_entity_database_directory/request.csr
$ certutil -d . -R -k rsa -g 1024 -s "CN=subject_name" --keyUsage keyEncipherment,dataEncipherment,critical --extKeyUsage timeStamp,msTrustListSign,critical -a -o /user_or_entity_database_directory/request.csrCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the required NSS database password when prompted.For further details about the parameters, see the certutil(1) man page. - Optionally, verify that the CSR file is correct:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This is a PKCS#10 PEM certificate request.
5.2.1.2. Creating a CSR Using PKCS10Client Link kopierenLink in die Zwischenablage kopiert!
PKCS10Client utility to create a CSR.
PKCS10Client, see:
- The PKCS10Client(1) man page
- The output of the
PKCS10Client --helpcommand
5.2.1.2.1. Using PKCS10Client to Create a CSR Link kopierenLink in die Zwischenablage kopiert!
PKCS10Client utility to create an Elliptic Curve (EC) key pair and CSR:
- Change to the certificate database directory of the user or entity for which the certificate is being requested, for example:
cd /user_or_entity_database_directory/
$ cd /user_or_entity_database_directory/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the CSR and store it in the
/user_or_entity_database_directory/example.csrfile:PKCS10Client -d . -p NSS_password -a ec -c nistp256 -o /user_or_entity_database_directory/example.csr -n "CN=subject_name"
$ PKCS10Client -d . -p NSS_password -a ec -c nistp256 -o /user_or_entity_database_directory/example.csr -n "CN=subject_name"Copy to Clipboard Copied! Toggle word wrap Toggle overflow For further details about the parameters, see the PKCS10Client(1) man page. - Optionally, verify that the CSR is correct:
cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----
$ cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2.1.2.2. Using PKCS10Client to Create a CSR for SharedSecret-based CMC Link kopierenLink in die Zwischenablage kopiert!
PKCS10Client utility to create an RSA key pair and CSR for SharedSecret-based CMC. Use it only with the CMC Shared Secret authentication method which is, by default, handled by the caFullCMCSharedTokenCert and caECFullCMCSharedTokenCert profiles.
- Change to the certificate database directory of the user or entity for which the certificate is being requested, for example:
cd /user_or_entity_database_directory/
$ cd /user_or_entity_database_directory/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the CSR and store it in the
/user_or_entity_database_directory/example.csrfile:PKCS10Client -d . -p NSS_password -o /user_or_entity_database_directory/example.csr -y true -n "CN=subject_name"
$ PKCS10Client -d . -p NSS_password -o /user_or_entity_database_directory/example.csr -y true -n "CN=subject_name"Copy to Clipboard Copied! Toggle word wrap Toggle overflow For further details about the parameters, see the PKCS10Client(1) man page. - Optionally, verify that the CSR is correct:
cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----
$ cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2.1.3. Creating a CSR Using CRMFPopClient Link kopierenLink in die Zwischenablage kopiert!
CRMFPopClient utility to create a CSR.
CRMFPopClient, see the CRMFPopClient(1) man page.
5.2.1.3.1. Using CRMFPopClient to Create a CSR with Key Archival Link kopierenLink in die Zwischenablage kopiert!
CRMFPopClient utility to create an RSA key pair and a CSR with the key archival option:
- Change to the certificate database directory of the user or entity for which the certificate is being requested, for example:
cd /user_or_entity_database_directory/
$ cd /user_or_entity_database_directory/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Retrieve the KRA transport certificate:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Export the KRA transport certificate:
pki ca-cert-show 0x7 --output kra.transport
$ pki ca-cert-show 0x7 --output kra.transportCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the CSR and store it in the
/user_or_entity_database_directory/example.csrfile:CRMFPopClient -d . -p password -n "cn=subject_name" -q POP_SUCCESS -b kra.transport -w "AES/CBC/PKCS5Padding" -v -o /user_or_entity_database_directory/example.csr
$ CRMFPopClient -d . -p password -n "cn=subject_name" -q POP_SUCCESS -b kra.transport -w "AES/CBC/PKCS5Padding" -v -o /user_or_entity_database_directory/example.csrCopy to Clipboard Copied! Toggle word wrap Toggle overflow To create an Elliptic Curve (EC) key pair and CSR, pass the-a ec -t falseoptions to the command.For further details about the parameters, see the CRMFPopClient(1) man page. - Optionally, verify that the CSR is correct:
cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----
$ cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2.1.3.2. Using CRMFPopClient to Create a CSR for SharedSecret-based CMC Link kopierenLink in die Zwischenablage kopiert!
CRMFPopClient utility to create an RSA key pair and CSR for SharedSecret-based CMC. Use it only with the CMC Shared Secret authentication method which is, by default, handled by the caFullCMCSharedTokenCert and caECFullCMCSharedTokenCert profiles.
- Change to the certificate database directory of the user or entity for which the certificate is being requested, for example:
cd /user_or_entity_database_directory/
$ cd /user_or_entity_database_directory/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Retrieve the KRA transport certificate:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Export the KRA transport certificate:
pki ca-cert-show 0x7 --output kra.transport
$ pki ca-cert-show 0x7 --output kra.transportCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the CSR and store it in the
/user_or_entity_database_directory/example.csrfile:CRMFPopClient -d . -p password -n "cn=subject_name" -q POP_SUCCESS -b kra.transport -w "AES/CBC/PKCS5Padding" -y -v -o /user_or_entity_database_directory/example.csr
$ CRMFPopClient -d . -p password -n "cn=subject_name" -q POP_SUCCESS -b kra.transport -w "AES/CBC/PKCS5Padding" -y -v -o /user_or_entity_database_directory/example.csrCopy to Clipboard Copied! Toggle word wrap Toggle overflow To create an EC key pair and CSR, pass the-a ec -t falseoptions to the command.For further details about the parameters, see the output of theCRMFPopClient --helpcommand. - Optionally, verify that the CSR is correct:
cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----
$ cat /user_or_entity_database_directory/example.csr -----BEGIN CERTIFICATE REQUEST----- MIICzzCCAbcCAQAwgYkx ... -----END CERTIFICATE REQUEST-----Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2.1.4. Creating a CSR using client-cert-request in the PKI CLI Link kopierenLink in die Zwischenablage kopiert!
pkicommand-line tool can also be used with the client-cert-request command to generate a CSR. However, unlike the previously discussed tools, CSR generated with pki are submitted directly to the CA. Both PKCS#10 or CRMF requests can be generated.
pki -d user token db directory -P https -p 8443 -h host.test.com -c user token db passwd client-cert-request "uid=test2" --length 4096 --type pkcs10
pki -d user token db directory -P https -p 8443 -h host.test.com -c user token db passwd client-cert-request "uid=test2" --length 4096 --type pkcs10
pki -d user token db directory -P https -p 8443 -h host.test.com -c user token db passwd client-cert-request "uid=test2" --length 4096 --type crmf
pki -d user token db directory -P https -p 8443 -h host.test.com -c user token db passwd client-cert-request "uid=test2" --length 4096 --type crmf
ca-cert-request-approve command.
pki -d agent token db directory -P https -p 8443 -h host.test.com -c agent token db passwd -n <CA agent cert nickname> ca-cert-request-approve request id
pki -d agent token db directory -P https -p 8443 -h host.test.com -c agent token db passwd -n <CA agent cert nickname> ca-cert-request-approve request id
pki client-cert-request --help command.
5.2.2. Generating CSRs Using Server-Side Key Generation Link kopierenLink in die Zwischenablage kopiert!
CRMFPopClient (see CRMFPopClient --help) or pki (see pki client-cert-request --help) could be used as a workaround.
Note
5.2.2.1. Functionality Highlights Link kopierenLink in die Zwischenablage kopiert!
- Certificate request keys are generated on the KRA (Note: a KRA must be installed to work with the CA)
- The profile default plugin,
serverKeygenUserKeyDefaultImpl, provides selection to enable or disable key archival (i.e. the enableArchival parameter) - Support for both RSA and EC keys
- Support for both manual (agent) approval and automatic approval (e.g. directory password-based)
5.2.2.2. Enrolling a Certificate Using Server-Side Keygen Link kopierenLink in die Zwischenablage kopiert!
Manual User Dual-Use Certificate Enrollment Using server-side Key generation
Figure 5.1. Server-Side Keygen Enrollment that requires agent manual approval
Directory-authenticated User Dual-Use Certificate Enrollment Using server-side Key generation
Figure 5.2. Server-Side Keygen Enrollment that will be automatically approved upon successful LDAP uid/pwd authentication
Important
- In case of manual approval, the PKCS#12 file will be returned to the CA agent that approves the request; the agent is then expected to forward the PKCS#12 file to the user.
- In case of automatic approval, the PKCS#12 file will be returned to the user who submitted the request
Figure 5.3. Enrollment manually approved by an agent
pkcs12util to import this file into their own user internal cert/key database for each application. E.g. the Firefox nss database of the user.
5.2.2.3. Key Recovery Link kopierenLink in die Zwischenablage kopiert!
5.2.2.4. Additional Information Link kopierenLink in die Zwischenablage kopiert!
5.2.2.4.1. KRA Request Records Link kopierenLink in die Zwischenablage kopiert!
Note
- One for the request type asymkeyGenRequestThis request type cannot be filtered using List Requests on the KRA agent page; you can select Show All Requests to see them listed.
- One for the request type recovery
5.2.2.4.2. Audit Records Link kopierenLink in die Zwischenablage kopiert!
- SERVER_SIDE_KEYGEN_ENROLL_KEYGEN_REQUEST
- SERVER_SIDE_KEYGEN_ENROLL_KEY_RETRIEVAL_REQUEST
- SERVER_SIDE_KEYGEN_ENROLL_KEYGEN_REQUEST_PROCESSED
- SERVER_SIDE_KEYGEN_ENROLL_KEY_RETRIEVAL_REQUEST_PROCESSED (not yet implemented)