Generating X.509 Certificates


X.509 certificates, in addition to private key files, are used to support authentication with digital certificates in a test that uses IPSec or TLS. After you have generated private keys using the test server's CA, you can generate an X.509 certificate for each private key.

The generateX509Certificates command generates the certificate file and places it in the directory accessed during the test: /home/cfguser/rsa. The command can be used with the following parameters:

IMPORTANT: Certificate generation can take several hours, depending on the number of certificates, and the amount of test server resources consumed will adversely affect test operations. Reserve the test server to prevent other users from running test sessions during certificate generation.

To generate an X.509 certificate file:

  1. SSH to the test server and log in as cfguser.

  2. Change to the CA directory: cd sseworks.

  3. Enter the generate command. If the default file names and starting number are acceptable, no parameters are required. As with the key files, the certificate file name is specified in the test definition. The input files used by the process must reside in the directories specified in the parameter definitions above.

    ##> generateX509Certificates --private MyPrivateKeys.pem --cout MyCerts.pem

  4. A confirmation message is displayed as the process begins and progress messages are printed as every 1000 certificates is generated. When the process is complete, a final time stamp is printed and the prompt is displayed as shown below.

    Creating X509 Certificates using the following data...
    Input:
    CA certificate file: /home/cfguser/sseworks/cacert.pem
    CA RSA Private key file: /home/cfguser/sseworks/private/caKey.pem
    CA RSA Private key password: 1234
    Signature Algorithm : signature algorithm
    Certificate Requestor file: /home/cfguser/sseworks/x509Requestors.txt
    Private RSA key file: /home/cfguser/rsa/MyPrivateKeys.pem
    Output:
    X509 Certificate file: /home/cfguser/rsa/MyCerts.pem

    Processing certificates  Time: Mon Jun 20 15:51:48
    processing certificate # 1000 Time: Mon Jun 20 15:53:02
    processing certificate # 2000 Time: Mon Jun 20 15:54:17
    processing certificate # 3000 Time: Mon Jun 20 15:55:31
    processing certificate # 4000 Time: Mon Jun 20 15:56:46
    processing certificate # 5000 Time: Mon Jun 20 15:58:00
    processing certificate # 6000 Time: Mon Jun 20 15:59:15
    processing certificate # 7000 Time: Mon Jun 20 16:00:29
    processing certificate # 8000 Time: Mon Jun 20 16:01:44
    processing certificate # 9000 Time: Mon Jun 20 16:02:58
    processing certificate # 10000 Time: Mon Jun 20 16:04:13
    processed 10000 certificates  Time: Mon Jun 20 16:04:13
    ##>

  1. If the test requires a DER format, convert the certificate file:

    1. Change to the rsa directory: cd /home/cfguser/rsa.

    2. Enter the conversion command: openssl x509 -inform PEM -outform DER -in <pem-file-name> -out <der-file-name>

      Using the example file above:

      ##> openssl x509 -inform PEM -outform DER -in MyCerts.pem -out MyCerts.der

  2. If the test requires PKCS#12 format, combine the private keys and certificates into one file:

    1. Change to the rsa directory: cd /home/cfguser/rsa.

    2. Enter the conversion command: openssl pkcs12 -export -in <pem-certificate-file-name> -inkey <pem-private-key-file-name> -out <pkcs12-certificate-and-key-file>

      Using the example files:

      ##> openssl pkcs12 -export -in MyCerts.pem -inkey MyPrivateKeys.pem -out MyKeys.p12

  3. Recycle the test server to register the new files.


 

Related Topics

  1. Generating Keys
  2. Managing Certificate Files
  3. Using Digital Certificates