Community articleConfiguration settings in prefs.config on AIX, Linux, and Solaris
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

The API can use a configuration file called prefs.config to set several properties. If you are using the API in Java™, then you must set the location of the Java virtual machine. The default settings of the other properties are adequate for most purposes.

Important: If you chose to automatically deploy the API to WebSphere® Application Server when you installed the API, then the prefs.config file already exists. The installer creates the file and adds the location of the JVM for you, in the javaPath setting. You should verify that the javaPath setting is correct.


The prefs.config file can be in one or more of the following locations:

/home/<username>/.PureEdge/API 8.0/prefs/prefs.config
/etc/PureEdge/API 8.0/prefs/prefs.config


When determining the configuration, the API first looks at the configuration file in the user-specific directory, then the file in the /etc/PureEdge/API 8.0/prefs directory. The API will read both configuration files, but any settings in the user-specific directory will override settings in the/etc/PureEdge/API 8.0/prefs directory.

Note: When creating these directories, remember that paths which include spaces must be enclosed in quotation marks. Also, ensure that you create permissions to access these directories using chmod a+r.

After you have installed the API, create the prefs.config file if it does not already exist. The file uses tag value pairs to set the following properties:
TagSetting
overrideDefaultPathToNetscapeProfileThe path to your Netscape certificate store. If the path is not provided, the API will attempt to locate the certificate store automatically.
overrideDefaultPathToNetscapeSecurityLibrariesThe path to your Netscape security libraries. To determine this path, search for a directory that contains libnss3.so and libnspr4.so.
rsaSecurityEngineNamesA comma-separated list of security engines that the API will query for RSA signature support. The default setting in API version 3.5 and later is:

rsaSecurityEngineNames = Netscape,CryptoAPI


To query all signature engines that are supported by the API, use the * wildcard. For example:

rsaSecurityEngineNames = *


If you use the * wildcard, it must be the only entry. The * wildcard is the behavior of API versions 3.0.1 and earlier.

If you are using the API on i5/OS®, then you must either include the Java security engine in the list, or use the * wildcard. For example:

rsaSecurityEngineNames = Netscape,CryptoAPI,Java


If you specify an engine that is not supported on your platform, the API will ignore that entry.
javaPathThe path to your Java virtual machine.

If you are using the API from a C program, the javaPath can point to any JVM on your system.

If you are using the API from a Java program, the javaPath must point to the same JVM that the calling Java program uses.

If the calling program is running in an application server such as WebSphere Application Server, or in a portal server such as WebSphere Portal, the javaPath must point to the same JVM that the application server uses.
checkCRLDistribution PointsAn on or off value. If on, the API will check CRL distribution points whenever verifying a digital certificate. This requires Internet access, and will slow the verification process. If off, the API will only use locally stored CRLs to verify certificates.
javaOptionsA space delimited list of configuration options that will be passed to the Java VM when it is started by the API. By default, the API does not pass any configuration options.
javaIgnoreUnrecognizedAn on or off value. If on, the Java VM will ignore unrecognized options used in the javaOptions setting. If off, the Java VM will report unrecognized options in the javaOptions setting. Default is off.
domspooltodiskthresholdThe in-memory size of form enclosures, in bytes. Enclosures that are greater than this threshold are removed from memory and spooled to a temporary file in the system temp folder.

The default size is 32768 bytes. If you do not want enclosures to be spooled to disk, set the size to 0 (zero).

Note that the size is the space that the enclosure takes when in memory; its file size might be different.
schemasFolderAllows you to specify the path to the schemas folder for any external schemas required by an application or its forms. If no schemasFolder setting is specified, and an external schema is referenced, the API will look for a schemas folder in the same directory as the currently running application.
defaultDateFormatAllows you to specify the format to assume for ambiguous dates that are entered by users. Valid settings are: DayMonthYear, MonthDayYear, YearMonthDay

The default is MonthDayYear. For example, by default the date 01/02/09 will be interpreted as January 2, 2009.


To configure the API, open the prefs.config file in a text editor and set the preferences accordingly. If you do not include a particular setting, the default is used instead. For example, your prefs.config file might look like this:

   javaPath = /usr/java/jre/lib/sparc/libjava.so
   checkCRLDistributionPoints = off

In this case, the API will automatically detect the location of the Netscape Profile and will use the Java VM in the /usr/java/jre/lib/sparc/ directory. However, the API will not check CRL distribution points and will not send any configuration options to the Java VM.

Parent topic: Configuring the API on AIX, Linux, and Solaris