Using the csi-tool.jar utility

The csi-tool.jar is a command line utility, with arguments to carry out various activities. For example, if there is sensitive data in the configuration file, csi.xml, you can use the encmessage argument to encrypt the data and copy the encrypted data back into the configuration file.

StepsUsing csi-tool.jar

  1. Navigate to the following directory:

    SYBASE\tomcat\common\lib (Tomcat)

    If csi-tool.jar is executed directly, you must be in this directory, because it must be in the same directory as commons-logging.jar.

  2. Run the tool using one of these methods:

    java -jar csi-tool.jar
    

    or

    java -classpath csi-tool.jar com.sybase.security.
    tools.CSITool
    

    Usage instructions for all task names display on the window. Alternatively, you can enter the following to get detailed argument descriptions for a specific task name:

    java -jar csi-tool.jar taskname help
    
  3. Issue your command, using the usage information. Table 7-4 shows required and optional arguments.

    Table 7-4: csi-tool.jar arguments

    Argument name

    Argument description

    Argument type

    Argument default value

    Required arguments

    keyStoreAlias

    Specify the alias name in the keystore

    string

    keyStoreAliasPassword

    Specify the alias password

    password

    keyStoreLocation

    Specify the path to a keystore

    readable file

    keyStorePassword

    Specify the password to access the keystore

    password

    text

    The text to be encrypted or decrypted

    string

    encmessage

    Encrypt or decrypt a text string

    execdbscript

    Execute a database script.

    Optional arguments

    cipherMode

    Indicate encrypt or decrypt operation (encrypt/decrypt)

    choice

    encrypt

    cipherProvider

    Specify the name of cipher provider

    string

    cipherTransformation

    Specify the transformation to be used by cipher

    string

    AES

    cipherStoreProvider

    Specify the keystore provider

    string

    keyStoreType

    Specify the keystore type

    string

    useCertificate

    Specify whether the key or certificate associated with an alias in the keystore is to be used

    boolean

    false

    keyStoreProvider

    charSet

StepsEncrypting a string using csi-tool.jar

Use the encmessage argument to encrypt a string of text using specified options. This is useful for encrypting and decrypting sensitive configuration parameters in the CSI configuration file.

  1. Set up the csi-tool.jar environment and run the tool using instructions in “Using csi-tool.jar”.

  2. Issue your command, using the usage information in Table 7-4. For example, to encrypt the following message string:

    encmessage text user_password
    

    An encrypted message string displays.

  3. You can cut and paste the encrypted message string into the destination file.