Previous Topic: Smkeytool Examples for UNIX Platforms

Next Topic: Create and Manage the Key Database Using Smkeytool

Smkeytool Examples for Windows Platforms

Example: Create a key database

This example shows the command for creating an smkeydatabase:

smkeytool.bat -createDB -password smdb

Example: Add a private key and certificate

This example shows the command to add a private key and certificate to the smkeydatabase. The example assumes you are running the smkeytool from the directory where the certificates and keys are located, as follows:

smkeytool.bat -addPrivkey -password keypswd  -alias privkey1
-keyfile sampleprivkey.pkcs8" -certfile samplecert.crt"

If you are not running smkeytool from the directory where the certificates and keys are located, you need to specify the full path to directory where these items are located, as follows:

smkeytool.bat -addPrivkey -password keypswd -alias privkey1 -keyfile "c:\program 
files\ca\siteminder\certs\sampleprivkey.pkcs8"
-certfile "c:\program files\ca\siteminder\certs\samplecert.crt"

Example: Add an trusted CA certificate

This example shows the commands required to add a trusted certificate authority certificate:

Important! Before adding a trusted certificate, obtain a CA certificate from a certificate authority.

To add a trusted CA certificate:

  1. Check whether it already exists in the consuming authority database by entering:
    smkeytool.sh -listCerts
    
  2. To add the CA certificate enter:
    smkeytool.bat -addCert "c:\program files\ca\siteminder\certs\sampleCARoot.crt" -trustcacert
    
  3. (Optional) Restart the Policy Server to see the change to the key database immediately.

    If you do not restart the Policy Server, it takes some time before the Policy Server synchronize. The amount of time for key database to update automatically depends on the configured frequency of database updates. You can configure database updates by adjusting the DBUpdateFrequencyMinutes parameter in the smkeydatabase.properties file.


Copyright © 2010 CA. All rights reserved. Email CA about this topic