This project is read-only.

Configuration files

The behavior of the simulator is controlled by a configuration file. When running under Windows, that is an XML file called ThalesParameters.xml. Under Linux, that is a text file called ThalesMonoParameters.txt. In both cases, the contents are semantically the same. This section describes the parameters as those are found in the XML configuration file.

The contents of the XML configuration file are the following:
<?xml version="1.0" encoding="utf-8" ?> 

<Racal>
   <Parameters>
	<!-- Port number for the simulator's TCP listener -->
	<Port value="9998" />
    
    	<!-- Port number for the simulator's console commands listener -->
    	<ConsolePort value="9997" />
		
	<!-- Max TCP connections allowed -->
	<MaxConnections value="5" />
		
	<!-- Full file name of the LMK storage file -->
	<LMKStorageFile value=" " />
	
	<!-- Directory that contains VB sources to compile and use as racal commands
	     in runtime -->
	<VBSourceDirectory value=".\Runtime" />

    	<!-- Directory where XML host command definitions reside -->
    	<XMLHostDefinitionsDirectory value="..\..\..\ThalesCore\XMLDefs\HostCommands" />
		
	<!-- Log level -->
	<LogLevel value="5" />
	
	<!-- Set to True to check LMK key parity before running a host command -->
	<CheckLMKParity value="True"/>
		
	<!-- Set to the length of a clear PIN -->
	<ClearPINLength value="4"/>
		
	<!-- Determine the firmware number to return on HSM status commands -->
	<FirmwareNumber value="0007-E000" />
		
	<!-- Determine the DSP firmware number to return on HSM status commands -->
	<DSPFirmwareNumber value="0001" />
		
	<!-- Set to True to start the simulator in the Authorized State -->
	<StartInAuthorizedState value="True" />

        <!-- Set to True if we'll be using double-length ZMKs. This is configured
             using the CS HSM command. -->
	<DoubleLengthZMKs value="True" />

        <!-- Set to True to force an old behavior of certain commands. -->
        <LegacyMode value="False" />

       <!-- Set to True to force the simulator to expect an ending trailer equal to 0x19 and a trailing header. -->
       <ExpectTrailers value="False" />

       <!-- Indicates the length of the message header. -->
       <HeaderLength value="4" />

       <!-- Indicates whether we should use EBCDIC instead of ASCII. -->
       <EBCDIC value="False" />
		
   <Parameters>
</Racal>

The parameters defined are the following:
  • Port: This defines the TCP port on which the simulator will listen on for host command requests.
  • ConsolePort: This defines the TCP port on which the simulator will listen on for console command requests.
  • MaxConnections: Specifies the maximum number of concurrent connections available to receive host commands.
  • LMKStorageFile: This is the full file name of the text file used to store the LMK keys. If empty, the simulator will create a new file under the current directory named LMKSTORAGE.TXT with default values. If you plan to use the simulator in more than one place, it is a good idea to leave this parameter empty and use the default LMK set because any keys created will be interchangeable between different simulator instances that run under different computers.
  • VBSourceDirectory: Specifies the directory name in which the simulator will look for Visual Basic source code files that implement host commands. If found, these files are compiled on-the-fly and are loaded by the simulator.
  • XMLHostDefinitionsDirectory: This is the directory where all XML-based definitions of the host command formats are stored.
  • LogLevel: Defines the logging level of the simulator. Valid values are 0 (no logging), 1 (log errors), 2 (log warnings), 3 (log informational messages), 4 (log verbose messages) and 5 (log everything). As the numbers ascend, each level increases includes the amount of information specified by the previous level and adds some more to it.
  • CheckLMKParity: Flag indicating whether the simulator should check the LMK key set for parity errors as part of processing commands. Valid values are True and False.
  • ClearPINLength: Specifies the default PIN length.
  • FirmwareNumber: Specifies the firmware number echoed back to callers as part of host command requests.
  • DSPFirmwareNumber: Specifies the DSP firmware number echoed back to callers as part of host command requests.
  • StartInAuthorizedState: Flag indicating whether the simulator will start in the authorized state or not. Valid values are True and False.
  • DoubleLengthZMKs: Flag indicating whether the simulator will allow/accept single-length Zone Master Keys as part of processing host commands. Valid values are True and False. Note that if this flag is set to False, all commands that accept an encrypted ZMK will only allow a single-length key. Likewise, if this flag is set to True, the aforementioned commands will only accept a double-length ZMK.
  • LegacyMode: Flag that forces the simulator to use an old behavior on certain commands. Currently, only the OC command is affected by this flag. Set to True to force an old command behavior or False to have the default behavior.
  • ExpectTrailers: Flag that forces the simulator to expect trailers on the host command messages.
  • HeaderLength: Value that indicates the length of the message header (default is 4).
  • EBCDIC: Set to True to expect and send data using EBCDIC instead of ASCII.

During start-up the simulator tries to find and read the ThalesParameters.xml file. If that fails, the simulator will then try to find the ThalesMonoParameters.txt file. If that also fails, the simulator will use default values and continue.

Last edited Nov 25, 2011 at 9:13 PM by nickntg, version 7

Comments

nickntg Jul 3, 2011 at 11:35 AM 
The IP address and subnet mask are part of the computer network configuration.

Gandalf Jul 3, 2011 at 11:07 AM 
Hi,

I am new to the Thales HSM Simulator. Is there a parameter for setting the Simulator IP address. The default is 127.0.0.1 (how can I change this? Do I have to change it in the source code and rebuild?) Thanks.