Go to the first, previous, next, last section, table of contents.


3 Confguring the library at run time.

A number of functions in the library read from a configuration file. This file is searched for in /etc/gpkcs11.rc, $HOME/.gpkcs11.rc and gpkcs11.rc in the current directory in this order. If any of file later in this list found than a prior one it takes precedence over the formar one.

The Format of this configuration file is similar to the windows ini file and is seperated into sections. The pkcs interface library uses one section, but third party tokens may define additional section to use. A section is defined by giving its name enclosed in brackets ('[]') and continues until the end of the file or the start of a new section.

Each configuration line is made up of a name and value of a variable seperated by an equal sign ('='). The name may not contain any white space and is case sensitive. White space sourrounding the seperator is ignored and striped from the value as a string. The value contains all characters after leading white space to the end of the line.

Empty lines are ignored. Lines that begin with a hash mark ('#') are taken as comments and ignored as well.

[PKCS11-DLL]
TokenList = CEAY-TOKEN
#ExtraLibraryPath = /path/to/additional/libaries/needed/by/other/libs/
LoggingFile = /path/to/log_file_name
MemLoggingFile = /path/to/mem_log_file_name
LoggingLevel = 3
 
[CEAY-TOKEN]
TokenDLL = /path/to/your/libceay_tok.so.1.0.1
InitSym = ceayToken_init
PersistentDataFile = /home/lbe/.gpkcs_data
cryptoDll = /path/to/your/libcrypto.so.0.9.4
TokenList
Lists the section names of the individual tokens. For each token name the appropriate section will searchted for the TokenDLL and InitSym fields and gpkcs11 tries to initialize the tokens in the order they are listed in this field.
ExtraLibraryPath
If libraries load extra libraries in turn or need to load other external files from the path, the relevant directories may be added here. The exact format of a correct path definition may vary between system architectures. Please consult you machines documentation.
LoggingFile
Name of the logging file, where all log-massages are stored in. The default file is: /tmp/pkcs11.log resp. c:\\pkcs11.log You can change the default by setting the environmet variable GPKCS11_LOG.
MemLoggingFile
Name of the logging file, where all memory-log-massages are stored in. The default file is: /tmp/pkcs11.mem.log resp. c:\\pkcs11.mem.log You can change the default by setting the environmet variable GPKCS11_MEMLOG.
LoggingLevel
Verbosity of the logging. Currently the values between 0 and 3 are valid. Any message that has a lower priority than the logging level will not be printed. Message indicating fatal errors have the level 0.
TokenDLL
This is the first of the two only required fields in each token configuration section. It defines the name or the path of the library that contains the function of the token implementation. The library selection rules of the operating system apply. Please check your systems documentation.
InitSym
This is the start symbol of the library. It will be called by the functions in order to init the library and have it register itself with the gpkcs11 system.
PersistentRootDir
This is an field special to the ceay token and shows the use of arbitrary config fields by token implementations. This is the path into which the persistent storage file(s) will be written.

each entry of the DllSymbolicNameList is repeated on an individual line in the config files that states the path to the library. These pathes need to be absolute.


Go to the first, previous, next, last section, table of contents.