Command Line Tools Guide
Red Hat Certificate System                                                            

Previous
Contents
Index
Next

Chapter 2

CS Migration Utility


If you have a previous installation of Red Hat Certificate System (CS), Netscape Certificate Management System (CMS), or iPlanet Certificate Management System (iCMS, also known as SunTM ONE Certificate Server), you can use the CS Migration Utility for migrating its data to CMS 6.0 or later versions.

Note: This chapter was "incorrectly" entitled "CMS Upgrade Utility" in previous releases of the software.

This chapter has fifteen sections. The first two sections provide some background and an overview of the current version of the CS Migration Utility, respectively. The third section provides general, as well as version/subsystem specific, caveats related to migration. The next eleven sections explain the steps involved in migration. The final section provides a detailed example of migrating a previous CMS 6.1 (SP 4) installation running on a Solaris 8 machine to a CS 7.1 installation running on a Red Hat Enterprise Linux (RHEL) 4 machine.

To go to a specific section, click one of the options below:

History

This table summarizes all CS/CMS/iCMS releases through CS 7.1:

Table 2-1 Summary of CS releases
Release date
Product Name
Service Packs
1/24/1997
Netscape Certificate Server 1.0
1.01, 1.02, 1.03,
and 1.0 (SP 1)
06/24/1999
Netscape Certificate Management System 4.1
4.1 (SP 1)
08/02/2000
Netscape Certificate Management System 4.2
4.1 (SP 1) and 4.1 (SP 1a)
03/29/2001
NetscapeCertificate Management System 4.2 (SP 2)
 
10/10/2001
NetscapeCertificate Management System 4.5
 
03/28/2002
NetscapeCertificate Management System 6.0
Netscape CMS 6.01
06/03/2002
iPlanet Certificate Management System 4.7
4.7 (SP 1)
03/12/2003
Netscape Certificate Management System 6.1
6.1 (SP 1), 6.1 (SP 2),
6.1 (SP 3), 6.1 (SP 3.1),
and 6.1 (SP 4)
06/17/2003
Netscape Certificate Management System 6.2
6.2 (SP 1)
11/30/2004
Netscape Certificate Management System 7.0
 
05/27/2005
Red Hat Certificate System 7.1
 

Every version of CS/CMS/iCMS has been built with some capability to extract data from a previous version and migrate this data to the newest version:

Overview

While the CS Migration Utility consists of numerous standalone platform-independent programs, only two are actually required for any one version of CS/CMS/iCMS: one program to convert an LDIF data file exported from an existing previous version into a "normalized" LDIF text file, and another program to convert this "normalized" LDIF text file into an LDIF data file that can be imported into CMS 6.0 or later versions.

CS Migration export utilities consist of 41ToTxt, 42ToTxt, 42SP2ToTxt, 45ToTxt, 47ToTxt, 60ToTxt, 61ToTxt, 62ToTxt, 70ToTxt, and 71ToTxt.. Each CS Migration export utility contains the following files:

Note: Each compilation shell script is dependent on a specific version of the Java software development kit as defined in the comments.
Note: Each compilation batch script is dependent on a specific version of the Java software development kit as defined in the comments.

CS Migration import utilities consist of TxtTo60, TxtTo61, TxtTo62, TxtTo70, and TxtTo71. Each CS Migration import utility contains the following files:

Note: Each compilation shell script is dependent upon a specific version of the Java software development kit as defined in the comments.
Note: Each compilation batch script is dependent upon a specific version of the Java software development kit as defined in the comments.

The following table defines the CS Migration export programs and corresponding import programs. An X indicates compatibility between the export and import programs.

Table 2-2 CS Migration Compatibility Matrix
 
         CS Migration import Package
 
CS Migration export Package
TxtTo60
TxtTo61
TxtTo62
TxtTo70
TxtTo71
41ToTxt
X
X
X
X
X
42ToTxt
X
X
X
X
X
42SP2ToTxt
X
X
X
X
X
45ToTxt
X
X
X
X
X
47ToTxt
X
X
X
X
X
60ToTxt
X
X
X
X
X
61ToTxt
 
X
X
X
X
62ToTxt
 
 
X
X
X
70ToTxt
 
 
 
X
X
71ToTxt
 
 
 
 
X

In every case, with the exception of CMS 4.2 (SP 2) since it was actually its own stand-alone major version, the major version number of the CS Migration export/import package may be applied to all service packs (SP) of that version (this also applies to installations which may contain individual "hot-fixes", which are individual bug fixes that were made after a service pack had been released). For example, the 42ToTxt export package should be utilized for CMS 4.2, 4.2 (SP 1), and 4.2 (SP 1a) (regardless whether or not any of these versions contained any individual "hot-fixes"). In the case of CMS 6.01, the 60ToTxt program should be used to export data, and the TxtTo60 program should be used to import data.

Additionally, each CS/CMS/iCMS installation has existed on various platforms and may contain more than one type of subsystem, or even more than one instance of a particular type of subsystem. The various types of subsystems have consisted of a Certificate Authority (CA), a Data Recovery Manager (DRM), an Online Certificate Status Protocol (OCSP) Manager, a Registration Authority (RA), a Token Key Service (TKS), and a Token Processing System (TPS). The following table defines the various platforms, and types of subsystems, supported by various versions of CS/CMS/iCMS:

Table 2-3 CS/CMS/iCMS Subsystem Types and Platforms
Product (including service packs & "hot-fixes")
Subsystems
Platforms
Netscape Certificate Server 1.0
CA
Digital UNIX 3.2C/4.0B,
HP-UX 10.10,
IBM AIX 4.1.4/4.2,
IRIX 5.3/6.2,
Solaris 2.4/2.5.1,
Windows NT 3.51/4.0 [Intel],
Windows NT 4.0 [Alpha]
Netscape Certificate Management System 4.1
CA,
RA
Solaris 2.5.1/2.6,
Windows NT 4.0 (SP 4)
[with NTFS]
Netscape Certificate Management System 4.2
CA,
DRM,
RA
HP-UX B.11.00,
IBM AIX 4.3.2,
OSF/1 4.0D,
Solaris 2.6/2.7/8,
Windows NT 4.0 (SP 4/5/6),
Windows 2000
Netscape Certificate Management System 4.2 (SP 2)
CA,
DRM,
OCSP,
RA
Compaq Tru64 4.0D,
HP-UX B.11.00,
IBM AIX 4.3.3,
Solaris 2.6/2.7/8,
Windows NT 4.0 (SP 5/6)
Netscape Certificate Management System 4.5
CA,
DRM,
OCSP,
RA
Solaris 2.6/8,
Windows NT 4.0 (SP 6a),
Windows 2000 (SP 2)
iPlanet Certificate Management System 4.7
CA,
DRM,
OCSP,
RA
Solaris 8,
Windows NT 4.0 (SP 6a),
Windows 2000
Netscape Certificate Management System 6.0
CA,
DRM,
OCSP,
RA
Solaris 8,
Windows 2000 (SP 2)
Netscape Certificate Management System 6.01*
CA,
DRM,
OCSP,
RA
Red Hat Linux 7.2,
Red Hat Linux
Advanced Server 2.1,
Solaris 8
Netscape Certificate Management System 6.1
CA,
DRM,
OCSP,
RA
Solaris 8
Netscape Certificate Management System 6.2
CA,
DRM,
OCSP,
RA
Red Hat Linux
Advanced Server 2.1,
Solaris 8
Netscape Certificate Management System 7.0
CA,
DRM,
OCSP,
TKS,
TPS
Red Hat Linux
Advanced Server 2.1,
Solaris 8
Red Hat Certificate System 7.1
CA,
DRM,
OCSP,
TKS,
TPS
Red Hat Enterprise
Linux 3 (AS/ES),
Red Hat Enterprise
Linux 4 (AS/ES),
Solaris 9 [32-bit/64-bit]

* Although considered a service pack of CMS 6.0, CMS 6.01 is specified independently in this table due to its change of supported platforms.

Caveats regarding Migration

When migrating any subsystem from any platform, the following caveats apply:

Additionally, the following caveats apply to specific subsystems of specific versions of CS/CMS/iCMS:

Step 1: Before Migration

Before migrating from a CS 7.1/CMS 4.1, 4.2, 4.2 (SP 2), 4.5, 6.0, 6.1, 6.2, 7.0/iCMS 4.7 instance to the latest CS instance, you must back up your previous CS/CMS/iCMS instance.

If you are using a commercial backup program:

  1. Stop all server instances running in the old CS/CMS/iCMS installation - this includes all CS/CMS/iCMS, DS (including all internal DBs), and Admin Server instances of the old server that exist on this machine.
  2. Run the commercial backup facility to back up all data associated with this old CS/CMS/iCMS installation.

Otherwise, if you are using the backup facilities included with the old CS/CMS/iCMS installation:

  1. Run the CS/CMS/iCMS backup facility to back up all data associated with this old installation based upon the version specified below:
CMS 4.1, 4.2, 4.2 (SP 2), or 4.5:
For instructions to back up a CMS 4.1, 4.2, 4.2 (SP 2), or 4.5 instance, check the CMS Command-Line Tools Guide that was provided with the product; open the <server_root>/manual/en/cert/tools/backup.htm file.
iCMS 4.7:
For instructions to back up a iCMS 4.7 instance, check the documentation that was provided with the product.
CS 7.1/CMS 6.0, 6.1, 6.2, or 7.0:
For instructions to back up a CS 7.1/CMS 6.0, 6.1, 6.2, or 7.0 instance, see Chapter 7 "Backing Up and Restoring Data."
  1. Stop all server instances running in the old CS/CMS/iCMS installation - this includes all CS/CMS/iCMS, DS (including all internal DBs), and Admin Server instances of the old server that exist on this machine.

Step 2: Creation of a New CS Installation

  1. Create a new CS installation on your machine based upon your operating system (e. g. - CS 7.1):
RHEL 3, or RHEL 4:
 
  1. Download and install the <CS>.rpm as "root". For example:

    rpm -ivh <CS>.rpm
     
  2. As required for your particular installation, use operating system facilities to create any necessary user/groups, and change any file permissions necessary for the deployment of your new CS installation. If the CS installation is not to be run as "root", login as the non-"root" user.
     
  3. Go to the following directory:

    cd <new_server_root>
     
  4. Execute the following command:

    <new_server_root>/setup/setup

    Note:
    For simplicity's sake, this document assumes that the names of all new server instances match the names of the corresponding old server instances exactly (<old_CA_instance> = <new_CA_instance>, <old_DRM_instance>=<new_DRM_instance>, etc.). Although it is possible to change the names of migrated CS subsystem instances, greater care must be taken when extracting and renaming certain portions of the data. Fortunately, port numbers do not fall under this constraint, since they are only stored in the Configuration Directory Server and the "server.xml", neither of which present any difficulties during a migration.
     
Solaris 9 [64-bit], or Solaris 9 [32-bit]:
 
  1. As required for your particular installation, login as "root", and use operating system facilities to create any necessary user/groups, and change any file permissions necessary for the deployment of your new CS installation. If the CS installation is not to be run as "root", login as the non-"root" user.
     
  2. Download and decompress the compressed tarball. For example:

    gunzip <CS>.tar.gz
     
  3. Unpack the tarball. For example:

    tar -xvf <CS>.tar
     
  4. Execute the following command:

    ./setup

    Note:
    For simplicity's sake, this document assumes that the names of all new server instances match the names of the corresponding old server instances exactly (<old_CA_instance> = <new_CA_instance>, <old_DRM_instance>=<new_DRM_instance>, etc.). Although it is possible to change the names of migrated CS subsystem instances, greater care must be taken when extracting and renaming certain portions of the data. Fortunately, port numbers do not fall under this constraint, since they are only stored in the Configuration Directory Server and the "server.xml", neither of which present any difficulties during a migration.
  1. Configure the new CS instance.
If the instance to be configured is a DRM, perform steps a.) and b.), else proceed with step c.) below:
 
  1. Go to the following directory:

    cd <new_server_root>/cert-<new_DRM_instance>/config
     
  2. Edit the file called "CertSetup.cfg" and append the following line to the end of this file:

    kra.keySplitting=true

     
  3. Go to the following directory:

    cd <new_server_root>

     
  4. Execute the following command:

    startconsole

     
  5. Configure your desired subsystem.
     
  1. Optionally, if any additional CS instances need to be created:
     
    1. Use the console to create the new CS instance.

      Note:
      For simplicity's sake, this document assumes that the names of all new server instances match the names of the corresponding old server instances exactly (<old_CA_instance> = <new_CA_instance>, <old_DRM_instance>=<new_DRM_instance>, etc.). Although it is possible to change the names of migrated CS subsystem instances, greater care must be taken when extracting and renaming certain portions of the data. Fortunately, port numbers do not fall under this constraint, since they are only stored in the Configuration Directory Server and the "server.xml", neither of which present any difficulties during a migration.

      If the instance to be configured is a DRM, perform steps b.) and c.) in a separate window, else proceed with step d.):
       
    2. Go to the following directory:

      cd <new_server_root>/cert-<new-instance>/config
       
    3. Edit the file called "CertSetup.cfg" and append the following line to the end of this file:

      kra.keySplitting=true

       
    4. Configure this new subsystem
       
    5. Repeat this procedure for each CS subsystem desired

Step 3: Stopping all new CS instances

Prior to performing any migration, stop all new CS instances:

  1. For each new CS subsystem that resides on this machine, execute the specified commands:
cd <new_server_root>/cert-<new_instance>
stop-cert
  1. Execute the specified commands to stop the Administration Server:
cd <new_server_root>
stop-admin
  1. For each internal DB that resides on this machine, execute the specified commands:
cd <new_server_root>/slapd-<new_instance>-db
stop-slapd
  1. If a configuration directory resides on this machine, execute the specified commands:
cd <new_server_root>/slapd-<new_config_directory_instance>
stop-slapd

Step 4: Migration of Security Databases

Extract data from the old server's certificate (cert7.db/cert8.db) and key (key3.db) security databases and copy it into the new server's alias directory; perform this task for each CS/CMS/iCMS subsystem instance to be migrated.

First, select the section below that corresponds to the CS/CMS/iCMS version to be migrated. To go to the section of interest, click one of the options below:

CMS 4.1

CMS 4.1 [CA]

Determine if the migration to be performed involves software security databases, an HSM, or both. Click on the appropriate case out of the following four migration techniques that applies to your specific situation:

Case I: CMS 4.1 [CA] - Software (old server) --> Software (new server)
  1. Remove all security databases associated with each CS instance residing on the new server that is intended to have data migrated to it from an old CS/CMS/iCMS instance. For example:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt8.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  2. Transfer the certificate and key software security databases from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp <old_server_root>/cert-<old_CA_instance>/config/cert7.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    cp <old_server_root>/cert-<old_CA_instance>/config/key3.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
Note: Since <old_CA_instance>=<new_CA_instance>, no further references will be made to <old_CA_instance>.
  1. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  2. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-key3.db
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chmod 00600 cert-<new_CA_instance>-<new_hostname>-key3.db
     
    
  3. Convert the "cert7.db" to "cert8.db" by executing the specified command:
    <new_server_root>/bin/cert/tools/certutil.sh -L -X -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
        Server-Cert cert-<new_CA_instance> cu,cu,cu
     
        caSigningCert cert-<new_CA_instance> cu,cu,cu
     
    
Note: The certificate database will automatically be converted from "cert7.db" to "cert8.db" when this command is executed.
  1. Remove the "cert7.db" by executing the specified command:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    
  2. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=caSigningCert cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=caSigningCert 
cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    
Case II: CMS 4.1 [CA] - Software (old server) --> HSM (new server)
  1. Remove all security databases associated with each CS instance residing on the new server that is intended to have data migrated to it from an old CS/CMS/iCMS instance. For example:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt8.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  2. Transfer the certificate and key software security databases from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp <old_server_root>/cert-<old_CA_instance>/config/cert7.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    cp <old_server_root>/cert-<old_CA_instance>/config/key3.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-key3.db
     
    
Logout as "root" so that you are the <new_user> again.
chmod 00600 cert-<new_CA_instance>-<new_hostname>-cert7.db
 
chmod 00600 cert-<new_CA_instance>-<new_hostname>-key3.db
 

 
  1. List the contents of the old software security databases by executing the specified command:
    <new_server_root>/bin/cert/tools/certutil.sh -L -X -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
        Server-Cert cert-<old_CA_instance> cu,cu,cu
     
        caSigningCert cert-<old_CA_instance> cu,cu,cu
     
    
Note: The certificate database will automatically be converted from "cert7.db" to "cert8.db" when this command is executed.
  1. Extract the public/private key pairs of each entry from the old software security databases:
    <new_server_root>/bin/cert/tools/pk12util.sh -o ServerCert.p12 
    -n "Server-Cert cert-<old_CA_instance>" -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
     
     
    <new_server_root>/bin/cert/tools/pk12util.sh -o 
    caSigningCert.p12 -n "caSigningCert cert-<old_CA_instance>" -d . 
    -P cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
    Note: The old software security databases may contain additional public/private key 
    pairs that also need to be extracted using this command.
     
    
  2. Delete the old software security databases:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt8.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  3. Execute the specified command to register the new HSM in the new token database:
    <new_server_root>/bin/cert/modutil.sh -nocertdb -dbdir . -add 
    <new_HSM_token_name> -libfile 
    <new_HSM_library_path>/<new_HSM_library>
     
    
  4. Identify the new HSM slot name by executing the following command:
    <new_server_root>/bin/cert/tools/modutil.sh -dbdir . -nocertdb 
    -list
     
    
  5. Create new software security databases:
    <new_server_root>/bin/cert/tools/certutil.sh -N -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
  6. Import the public/private key pairs of each entry from the PKCS #12 files into the new HSM:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    caSigningCert.p12 -d . -P cert-<new_CA_instance>-<new_hostname>- 
    -h <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  7. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/caSigningCert.p12
     
    
  8. Set the trust bits on the public/private key pairs that were imported into the new HSM:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:Server-Cert cert-<new_CA_instance>" -t 
    "cu,cu,cu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:caSigningCert cert-<new_CA_instance>" -t 
    "CTu,CTu,CTu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
  9. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    
Case III: CMS 4.1 [CA] - HSM (old server) --> Software (new server)
  1. The pk12util.sh tool cannot be used to extract public/private key pairs from an HSM; this is primarily due to stipulations imposed by FIPS 140-1 which protect the private key portion of an entry. Instead, you should attempt to contact your old HSM vendor in order to extract the data from your old HSM. The extracted keys should not have any dependencies upon the old HSM such as nickname prefixes.
  2. Presuming that a method exists to extract the data into something portable such as PKCS #12 files, transfer this data from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/ServerCert.p12 
    <new_server_root>/alias/ServerCert.p12
     
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/caSigningCert.p1
    2 <new_server_root>/alias/caSigningCert.p12
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> ServerCert.p12
     
    chown <new_user>:<new_group> caSigningCert.p12
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 ServerCert.p12
     
    chmod 00600 caSigningCert.p12
     
    
  5. Import the public/private key pairs of each entry from the PKCS #12 files into the new software security databases:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    caSigningCert.p12 -d . -P cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  6. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/caSigningCert.p12
     
    
  7. Set the trust bits on the public/private key pairs that were imported into the new software security databases:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n "Server-Cert 
    cert-<new_CA_instance>" -t "cu,cu,cu" -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "caSigningCert cert-<new_CA_instance>" -t "CTu,CTu,CTu" -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
  8. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=caSigningCert cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=caSigningCert 
cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    
Case IV: CMS 4.1 [CA] - HSM (old server) --> HSM (new server)
  1. The pk12util.sh tool cannot be used to extract public/private key pairs from an HSM; this is primarily due to stipulations imposed by FIPS 140-1 which protect the private key portion of an entry. Instead, you should attempt to contact your old HSM vendor in order to extract the data from your old HSM. The extracted keys should not have any dependencies upon the old HSM such as nickname prefixes.
  2. Presuming that a method exists to extract the data into something portable such as PKCS #12 files, transfer this data from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/ServerCert.p12 
    <new_server_root>/alias/ServerCert.p12
     
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/caSigningCert.p1
    2 <new_server_root>/alias/caSigningCert.p12
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> ServerCert.p12
     
    chown <new_user>:<new_group> caSigningCert.p12
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 ServerCert.p12
     
    chmod 00600 caSigningCert.p12
     
    
  5. Execute the specified command to register the new HSM in the new token database:
    <new_server_root>/bin/cert/modutil.sh -nocertdb -dbdir . -add 
    <new_HSM_token_name> -libfile 
    <new_HSM_library_path>/<new_HSM_library>
     
    
  6. Identify the new HSM slot name by executing the following command:
<new_server_root>/bin/cert/tools/modutil.sh -dbdir . -nocertdb -list
  1. Import the public/private key pairs of each entry from the PKCS #12 files into the new HSM:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    caSigningCert.p12 -d . -P cert-<new_CA_instance>-<new_hostname>- 
    -h <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  2. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/caSigningCert.p12
     
    
  3. Set the trust bits on the public/private key pairs that were imported into the new HSM:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:Server-Cert cert-<new_CA_instance>" -t 
    "cu,cu,cu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:caSigningCert cert-<new_CA_instance>" -t 
    "CTu,CTu,CTu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
  4. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    

CMS 4.2

Click below to choose the subsystem to migrate:

CMS 4.2 [CA]

Determine if the migration to be performed involves software security databases, an HSM, or both. Click on the appropriate case out of the following four migration techniques that applies to your specific situation:

Case I: CMS 4.2 [CA] - Software (old server) --> Software (new server)
  1. Remove all security databases associated with each CS instance residing on the new server that is intended to have data migrated to it from an old CS/CMS/iCMS instance. For example:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt8.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  2. Transfer the certificate and key software security databases from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp <old_server_root>/cert-<old_CA_instance>/config/cert7.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    cp <old_server_root>/cert-<old_CA_instance>/config/key3.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    Note: Since <old_CA_instance>=<new_CA_instance>, no further 
    references will be made to <old_CA_instance>.
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-key3.db
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chmod 00600 cert-<new_CA_instance>-<new_hostname>-key3.db
     
    
  5. Convert the "cert7.db" to "cert8.db" by executing the specified command:
    <new_server_root>/bin/cert/tools/certutil.sh -L -X -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
    Server-Cert cert-<new_CA_instance> cu,cu,cu
    caSigningCert cert-<new_CA_instance> cu,cu,cu
Note: The certificate database will automatically be converted from "cert7.db" to "cert8.db" when this command is executed.
  1. Remove the "cert7.db" by executing the specified command:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    
  2. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=caSigningCert cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=caSigningCert 
cert-<new_CA_instance>
 
If, there is CA-DRM connectivity, then modify the following 
name/value pair:
 
ca.connector.KRA.nickName=caSigningCert cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    
Case II: CMS 4.2 [CA] - Software (old server) --> HSM (new server)
  1. Remove all security databases associated with each CS instance residing on the new server that is intended to have data migrated to it from an old CS/CMS/iCMS instance. For example:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt8.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  2. Transfer the certificate and key software security databases from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp <old_server_root>/cert-<old_CA_instance>/config/cert7.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    cp <old_server_root>/cert-<old_CA_instance>/config/key3.db 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chown <new_user>:<new_group> 
    cert-<new_CA_instance>-<new_hostname>-key3.db
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 cert-<new_CA_instance>-<new_hostname>-cert7.db
     
    chmod 00600 cert-<new_CA_instance>-<new_hostname>-key3.db
     
    
  5. List the contents of the old software security databases by executing the specified command:
    <new_server_root>/bin/cert/tools/certutil.sh -L -X -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
    Server-Cert cert-<old_CA_instance> cu,cu,cu
    caSigningCert cert-<old_CA_instance> cu,cu,cu
Note: The certificate database will automatically be converted from "cert7.db" to "cert8.db" when this command is executed.
  1. Extract the public/private key pairs of each entry from the old software security databases:
    <new_server_root>/bin/cert/tools/pk12util.sh -o ServerCert.p12 
    -n "Server-Cert cert-<old_CA_instance>" -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -o 
    caSigningCert.p12 -n "caSigningCert cert-<old_CA_instance>" -d . 
    -P cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
    Note: The old software security databases may contain additional public/private key 
    pairs that also need to be extracted using this command.
     
    
  2. Delete the old software security databases:
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt7.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ce
    rt8.db
     
    rm 
    <new_server_root>/alias/cert-<new_CA_instance>-<new_hostname>-ke
    y3.db
     
    
  3. Execute the specified command to register the new HSM in the new token database:
    <new_server_root>/bin/cert/modutil.sh -nocertdb -dbdir . -add 
    <new_HSM_token_name> -libfile 
    <new_HSM_library_path>/<new_HSM_library>
     
    
  4. Identify the new HSM slot name by executing the following command:
<new_server_root>/bin/cert/tools/modutil.sh -dbdir . -nocertdb -list
  1. Create new software security databases:
    <new_server_root>/bin/cert/tools/certutil.sh -N -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
  2. Import the public/private key pairs of each entry from the PKCS #12 files into the new HSM:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    caSigningCert.p12 -d . -P cert-<new_CA_instance>-<new_hostname>- 
    -h <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  3. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/caSigningCert.p12
     
    
  4. Set the trust bits on the public/private key pairs that were imported into the new HSM:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:Server-Cert cert-<new_CA_instance>" -t 
    "cu,cu,cu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:caSigningCert cert-<new_CA_instance>" -t 
    "CTu,CTu,CTu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
  5. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
If, there is CA-DRM connectivity, then modify the following 
name/value pair:
 
ca.connector.KRA.nickName=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    
Case III: CMS 4.2 [CA] - HSM (old server) --> Software (new server)
  1. The pk12util.sh tool cannot be used to extract public/private key pairs from an HSM; this is primarily due to stipulations imposed by FIPS 140-1 which protect the private key portion of an entry. Instead, you should attempt to contact your old HSM vendor in order to extract the data from your old HSM. The extracted keys should not have any dependencies upon the old HSM such as nickname prefixes.
  2. Presuming that a method exists to extract the data into something portable such as PKCS #12 files, transfer this data from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/ServerCert.p12 
    <new_server_root>/alias/ServerCert.p12
     
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/caSigningCert.p1
    2 <new_server_root>/alias/caSigningCert.p12
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> ServerCert.p12
     
    chown <new_user>:<new_group> caSigningCert.p12
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 ServerCert.p12
     
    chmod 00600 caSigningCert.p12
     
    
  5. Import the public/private key pairs of each entry from the PKCS #12 files into the new software security databases:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    caSigningCert.p12 -d . -P cert-<new_CA_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  6. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/caSigningCert.p12
     
    
  7. Set the trust bits on the public/private key pairs that were imported into the new software security databases:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n "Server-Cert 
    cert-<new_CA_instance>" -t "cu,cu,cu" -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "caSigningCert cert-<new_CA_instance>" -t "CTu,CTu,CTu" -d . -P 
    cert-<new_CA_instance>-<new_hostname>-
     
    
  8. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=caSigningCert cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=caSigningCert 
cert-<new_CA_instance>
 
If, there is CA-DRM connectivity, then modify the following 
name/value pair:
 
ca.connector.KRA.nickName=caSigningCert cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    servercertnickname="Server-Cert cert-<new_CA_instance>"
     
    
Case IV: CMS 4.2 [CA] - HSM (old server) --> HSM (new server)
  1. The pk12util.sh tool cannot be used to extract public/private key pairs from an HSM; this is primarily due to stipulations imposed by FIPS 140-1 which protect the private key portion of an entry. Instead, you should attempt to contact your old HSM vendor in order to extract the data from your old HSM. The extracted keys should not have any dependencies upon the old HSM such as nickname prefixes.
  2. Presuming that a method exists to extract the data into something portable such as PKCS #12 files, transfer this data from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/ServerCert.p12 
    <new_server_root>/alias/ServerCert.p12
     
    cp 
    <old_server_root>/cert-<old_CA_instance>/config/caSigningCert.p1
    2 <new_server_root>/alias/caSigningCert.p12
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> ServerCert.p12
     
    chown <new_user>:<new_group> caSigningCert.p12
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 ServerCert.p12
     
    chmod 00600 caSigningCert.p12
     
    
  5. Execute the specified command to register the new HSM in the new token database:
    <new_server_root>/bin/cert/modutil.sh -nocertdb -dbdir . -add 
    <new_HSM_token_name> -libfile 
    <new_HSM_library_path>/<new_HSM_library>
     
    
  6. Identify the new HSM slot name by executing the following command:
<new_server_root>/bin/cert/tools/modutil.sh -dbdir . -nocertdb -list
  1. Import the public/private key pairs of each entry from the PKCS #12 files into the new HSM:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    caSigningCert.p12 -d . -P cert-<new_CA_instance>-<new_hostname>- 
    -h <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  2. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/caSigningCert.p12
     
    
  3. Set the trust bits on the public/private key pairs that were imported into the new HSM:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:Server-Cert cert-<new_CA_instance>" -t 
    "cu,cu,cu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:caSigningCert cert-<new_CA_instance>" -t 
    "CTu,CTu,CTu" -d . -P cert-<new_CA_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
  4. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_CA_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
ca.signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
Duplicate the ca.signing.cacertnickname line and add it to the end of the file, replacing ca.signing.cacertnickname with ca.ocsp_signing.cacertnickname:
ca.ocsp_signing.cacertnickname=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
If, there is CA-DRM connectivity, then modify the following 
name/value pair:
 
ca.connector.KRA.nickName=<new_HSM_slot_name>:caSigningCert 
cert-<new_CA_instance>
 
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 3 lines):
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    servercertnickname="<new_HSM_slot_name>:Server-Cert 
    cert-<new_CA_instance>"
     
    

CMS 4.2 [DRM]

Determine if the migration to be performed involves software security databases, an HSM, or both. Click on the appropriate case out of the following four migration techniques that applies to your specific situation:

Case I: CMS 4.2 [DRM] - Software (old server) --> Software (new server)
  1. Remove all security databases associated with each CS instance residing on the new server that is intended to have data migrated to it from an old CS/CMS/iCMS instance. For example:
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert8.db
     
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-k
    ey3.db
     
    
     
    
  2. Transfer the certificate and key software security databases from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp <old_server_root>/cert-<old_DRM_instance>/config/cert7.db 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert7.db
     
    cp <old_server_root>/cert-<old_DRM_instance>/config/key3.db 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-k
    ey3.db
     
    Note: Since <old_DRM_instance>=<new_DRM_instance>, no further 
    references will be made to <old_DRM_instance>.
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> 
    cert-<new_DRM_instance>-<new_hostname>-cert7.db
     
    chown <new_user>:<new_group> 
    cert-<new_DRM_instance>-<new_hostname>-key3.db
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 cert-<new_DRM_instance>-<new_hostname>-cert7.db
     
    chmod 00600 cert-<new_DRM_instance>-<new_hostname>-key3.db
     
    
  5. Convert the "cert7.db" to "cert8.db" by executing the specified command:
    <new_server_root>/bin/cert/tools/certutil.sh -L -X -d . -P 
    cert-<new_DRM_instance>-<new_hostname>-
     
    
    Server-Cert cert-<new_DRM_instance> cu,cu,cu
    caSigningCert cert-<new_DRM_instance> CT,c,
    kraStorageCert cert-<new_DRM_instance> u,u,u
    kraTransportCert cert-<new_DRM_instance> u,u,u
Note: The certificate database will automatically be converted from "cert7.db" to "cert8.db" when this command is executed.
  1. Remove the "cert7.db" by executing the specified command:
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert7.db
     
    
  2. Update the appropriate new CS.cfg configuration file by executing the following commands:
    cd <new_server_root>/cert-<new_DRM_instance>/config
     
    
Edit the new CS.cfg, and modify the following name/value pairs:
kra.storageUnit.nickName=kraStorageCert cert-<new_DRM_instance>
 
kra.transportUnit.nickName=kraTransportCert 
cert-<new_DRM_instance>
 
Note: The caSigningCert is not referenced by the new CS.cfg.
  1. Within the same directory, update the appropriate new server.xml configuration file by editing the new server.xml (changing 2 lines):
    servercertnickname="Server-Cert cert-<new_DRM_instance>"
     
    servercertnickname="Server-Cert cert-<new_DRM_instance>"
     
    
Case II: CMS 4.2 [DRM] - Software (old server) --> HSM (new server)
  1. Remove all security databases associated with each CS instance residing on the new server that is intended to have data migrated to it from an old CS/CMS/iCMS instance. For example:
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert8.db
     
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-k
    ey3.db
     
    
  2. Transfer the certificate and key software security databases from the old server to the new server using cp, rcp, scp, mv, ftp, sftp, etc. For example, using cp:
    cp <old_server_root>/cert-<old_DRM_instance>/config/cert7.db 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert7.db
     
    cp <old_server_root>/cert-<old_DRM_instance>/config/key3.db 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-k
    ey3.db
     
    
  3. Login as the <new_user> on the machine hosting the new server, and change into the correct directory:
    cd <new_server_root>/alias/
     
    
  4. On Linux/UNIX systems, be sure to change all file ownership/permissions to the correct user and group ownership/permissions (you will need to have "root" permission to change file ownership):
    su
     
    chown <new_user>:<new_group> 
    cert-<new_DRM_instance>-<new_hostname>-cert7.db
     
    chown <new_user>:<new_group> 
    cert-<new_DRM_instance>-<new_hostname>-key3.db
     
    Logout as "root" so that you are the <new_user> again.
     
    chmod 00600 cert-<new_DRM_instance>-<new_hostname>-cert7.db
     
    chmod 00600 cert-<new_DRM_instance>-<new_hostname>-key3.db
     
    
  5. Convert the "cert7.db" to "cert8.db" by executing the specified command:
    <new_server_root>/bin/cert/tools/certutil.sh -L -X -d . -P 
    cert-<new_DRM_instance>-<new_hostname>-
     
    
    Server-Cert cert-<old_DRM_instance> cu,cu,cu
    caSigningCert cert-<old_DRM_instance> cT,c,
    kraStorageCert cert-<old_DRM_instance> u,u,u
    kraTransportCert cert-<old_DRM_instance> u,u,u
Note: The certificate database will automatically be converted from "cert7.db" to "cert8.db" when this command is executed.
  1. Extract the public/private key pairs of each entry from the old software security databases:
    <new_server_root>/bin/cert/tools/pk12util.sh -o ServerCert.p12 
    -n "Server-Cert cert-<old_DRM_instance>" -d . -P 
    cert-<new_DRM_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -o 
    kraStorageCert.p12 -n "kraStorageCert cert-<old_DRM_instance>" 
    -d . -P cert-<new_DRM_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -o 
    kraTransportCert.p12 -n "kraTransportCert 
    cert-<old_DRM_instance>" -d . -P 
    cert-<new_DRM_instance>-<new_hostname>-
     
    Enter Password or Pin for "NSS Certificate DB":********
     
    Enter password for PKCS12 file: ********
     
    Re-enter password: ********
     
    pk12util: PKCS12 EXPORT SUCCESSFUL
     
    Note: The old software security databases may contain additional public/private key 
    pairs that also need to be extracted using this command.
     
    
  2. Extract the public key of the following entry from the old software security databases and save the base-64 output to a file:
    <new_server_root>/bin/cert/tools/certutil.sh -L -n 
    "caSigningCert cert-<old_DRM_instance>" -d . -P 
    cert-<new_DRM_instance>-<new_hostname>- -a > caSigningCert.b64
     
    Note: The old software security databases may contain additional public keys that also 
    need to be extracted using this command.
     
    
  3. Delete the old software security databases:
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert7.db
     
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-c
    ert8.db
     
    rm 
    <new_server_root>/alias/cert-<new_DRM_instance>-<new_hostname>-k
    ey3.db
     
    
  4. Execute the specified command to register the new HSM in the new token database:
    <new_server_root>/bin/cert/modutil.sh -nocertdb -dbdir . -add 
    <new_HSM_token_name> -libfile 
    <new_HSM_library_path>/<new_HSM_library>
     
    
  5. Identify the new HSM slot name by executing the following command:
    <new_server_root>/bin/cert/tools/modutil.sh -dbdir . -nocertdb 
    -list
     
    
  6. Create new software security databases:
    <new_server_root>/bin/cert/tools/certutil.sh -N -d . -P 
    cert-<new_DRM_instance>-<new_hostname>-
     
    
  7. Import the public/private key pairs of each entry from the PKCS #12 files into the new HSM:
    <new_server_root>/bin/cert/tools/pk12util.sh -i ServerCert.p12 
    -d . -P cert-<new_DRM_instance>-<new_hostname>- -h 
    <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    kraStorageCert.p12 -d . -P 
    cert-<new_DRM_instance>-<new_hostname>- -h <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
    <new_server_root>/bin/cert/tools/pk12util.sh -i 
    kraTransportCert.p12 -d . -P 
    cert-<new_DRM_instance>-<new_hostname>- -h <new_HSM_slot_name>
     
    Enter Password or Pin for "<new_HSM_slot_name>":********
     
    Enter password for PKCS12 file: ********
     
    pk12util: PKCS12 IMPORT SUCCESSFUL
     
    
  8. Optionally, delete the PKCS #12 files:
    rm <new_server_root>/alias/ServerCert.p12
     
    rm <new_server_root>/alias/kraStorageCert.p12
     
    rm <new_server_root>/alias/kraTransportCert.p12
     
    
  9. Set the trust bits on the public/private key pairs that were imported into the new HSM:
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:Server-Cert cert-<new_DRM_instance>" -t 
    "cu,cu,cu" -d . -P cert-<new_DRM_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:kraStorageCert cert-<new_DRM_instance>" -t 
    "u,u,u" -d . -P cert-<new_DRM_instance>-<new_hostname>- -h 
    <new_HSM_token_name>
     
    
    <new_server_root>/bin/cert/tools/certutil.sh -M -n 
    "<new_HSM_slot_name>:kraTransportCert cert-<new_DRM_instanc