11.2. Usage
- Check the version of
tkstool
by running the following command:tkstool -V
tkstool -V
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This should return output similar to the following:tkstool: Version 1.0
tkstool: Version 1.0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create new software databases.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
A hardware HSM can be used instead of the software database if themodutil
utility is first used to insert the HSM slot and token into thesecmod.db
database.If an HSM is used, then the option-h
hsm_token must be added to each of commands below. - List the contents of the local software key database.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a transport key called
transport
.tkstool -T -d . -n transport
tkstool -T -d . -n transport
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - When prompted, fill in the database password, then type in some noise to seed the random number generator.
- The session key share and corresponding KCV are displayed. Write down both of these.
- Run the following command to produce an identical transport key; this is generally used within another set of databases which need to use identical transport keys. When this is run, multiple session key shares and KCVs are generated. Write down all of this information.
tkstool -I -d . -n verify_transport
tkstool -I -d . -n verify_transport
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Responses similar to the following appear:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - List the contents of the key database again.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the transport key to generate and wrap a master key, and store the master key in a file called
file
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - List the contents of the software key database again.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The order of the keys is not important, and some systems may display the keys in a different order. - Use the transport key to generate and unwrap a master key called
unwrapped_master
stored in a file calledfile
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - List the contents of the key database to show all keys.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Delete a key from the database.
tkstool -D -d . -n wrapped_master Enter Password or Pin for "NSS Certificate DB": tkstool: 1 key(s) called "wrapped_master" were deleted
tkstool -D -d . -n wrapped_master Enter Password or Pin for "NSS Certificate DB": tkstool: 1 key(s) called "wrapped_master" were deleted
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - List the contents of the key database again to show all keys.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow