1PKCS11.CONF(5) System Files PKCS11.CONF(5)
2
3
4
6 pkcs11.conf - Configuration files for PKCS#11 modules
7
9 The pkcs11.conf configuration files are a standard way to configure
10 PKCS#11 modules.
11
13 A complete configuration consists of several files. These files are
14 text files. Since p11-kit is built to be used in all sorts of
15 environments and at very low levels of the software stack, we cannot
16 make use of high level configuration APIs that you may find on a modern
17 desktop.
18
19 Each setting in the config file is specified consists of a name and a
20 value. The name is a simple string consisting of characters and dashes.
21 The name consists of alpha numeric characters, dot, hyphen and
22 underscore.
23
24 The value is specified after the name on the same line, separated from
25 it by a : (colon). White space between the name and value is ignored.
26
27 Blank lines are ignored. White space at the beginning or end of lines
28 is stripped. Lines that begin with a # character are ignored as
29 comments. Comments are not recognized when they come after a value on a
30 line.
31
32 A fictitious module configuration file might look like:
33
34 module: module.so
35 # Here is a comment
36
37 managed: true
38 setting.2: A long value with text.
39 x-custom : text
40
42 Each configured PKCS#11 module has its own config file. These files can
43 be placed in various locations.
44
45 The filename of the configuration file may consist of upper and
46 lowercase letters underscore, comma, dash and dots. The first
47 characters needs to be an alphanumeric, the filename should end with a
48 .module extension.
49
50 Most importantly each config file specifies the path of the PKCS#11
51 module to load. A module config file has the following fields:
52
53 module:
54 The filename of the PKCS#11 module to load. This should include an
55 extension like .so
56
57 If this value is blank, then the module will be ignored. This can
58 be used in the user configs to override loading of a module
59 specified in the system configuration.
60
61 If this is a relative path, then the module will be loaded from the
62 default module directory.
63
64 critical:
65 Set to yes if the module is critical and required to load. If a
66 critical module fails to load or initialize, then the loading
67 process for all registered modules will abort and return an error
68 code.
69
70 This argument is optional and defaults to no.
71
72 enable-in:
73 A comma and/or space separated list of names of programs that this
74 module should only be loaded in. The module will not be loaded for
75 other programs using p11-kit. The base name of the process
76 executable should be used here, for example seahorse, ssh.
77
78 This is not a security feature. The argument is optional. If not
79 present, then any process will load the module.
80
81 disable-in:
82 A comma and/or space separated list of names of programs that this
83 module should not be loaded in. The module will be loaded for any
84 other programs using p11-kit. The base name of the process
85 executable should be used here, for example firefox,
86 thunderbird-bin.
87
88 This is not a security feature. The argument is optional. If not
89 present, then any process will load the module.
90
91 managed:
92 Set to no if the module is not to be managed by p11-kit. Making a
93 module unmanaged is not recommended, and will cause problems if
94 multiple callers in a single process share a PKCS#11 module.
95
96 This argument is optional and defaults to yes.
97
98 priority:
99 The value should be an integer. When lists of modules are returned
100 to a caller of p11-kit, modules with a higher number are sorted
101 first. When applications search modules for certificates, keys and
102 trust policy information, this setting will affect what find first.
103
104 This argument is optional, and defaults to zero. Modules with the
105 same priority option will be sorted alphabetically.
106
107 remote:
108 Instead of loading the PKCS#11 module locally, run the module
109 remotely.
110
111 Specify a command to run, prefixed with | a pipe. The command must
112 speak the p11-kit remoting protocol on its standard in and standard
113 out. For example:
114
115 remote: |ssh user@remote p11-kit remote /path/to/module.so
116
117 Other forms of remoting will appear in later p11-kit releases.
118
119 trust-policy:
120 Set to yes to use use this module as a source of trust policy
121 information such as certificate anchors and black lists.
122
123 log-calls:
124 Set to yes to write a log to stderr of all the calls into the
125 module. This is only supported for managed modules.
126
127 This argument is optional and defaults to no.
128
129 Do not specify both enable-in and disable-in for the same module.
130
131 Other fields may be present, but it is recommended that field names
132 that are not specified in this document start with a x- prefix.
133
135 A global configuration may also be present. This file contains settings
136 that are not related to a single PKCS#11 module. The location(s) of the
137 global configuration are described below. The global configuration file
138 can contain the following fields:
139
140 user-config:
141 This will be equal to one of the following values: none, merge,
142 only.
143
144 managed:
145 Set to yes or no to force all modules to be managed or unmanaged by
146 p11-kit. Setting this setting in a global configuration file will
147 override the managed setting in the individual module configuration
148 files. Making modules unmanaged is not recommended, and will cause
149 problems if multiple callers in a single process share a PKCS#11
150 module.
151
152 This argument is optional.
153
154 log-calls:
155 Set to yes to write a log to stderr of all the calls into all
156 configured modules. This is only supported for managed modules.
157
158 This argument is optional.
159
160 Other fields may be present, but it is recommended that field names
161 that are not specified in this document start with a x- prefix.
162
164 Each configured PKCS#11 module has its own config file. These files are
165 placed in a directory. In addition a global config file exists. There
166 is a system configuration consisting of the various module config files
167 and a file for global configuration. Optionally each user can provide
168 additional configuration or override the system configuration.
169
170 The system global configuration file is usually in
171 /etc/pkcs11/pkcs11.conf and the user global configuration file is in
172 ~/.config/pkcs11/pkcs11.conf in the user's home directory.
173
174 The module config files are usually located in the /etc/pkcs11/modules
175 directory, with one configuration file per module. In addition the
176 ~/.config/pkcs11/modules directory can be used for modules installed by
177 the user.
178
179 Note that user configuration files are not loaded from the home
180 directory if running inside a setuid or setgid program.
181
182 The default system config file and module directory can be changed when
183 building p11-kit. Always lookup these paths using pkg-config.
184
186 p11-kit(8)
187
188 Further details available in the p11-kit online documentation at
189 http://p11-glue.freedesktop.org/doc/p11-kit/.
190
191
192
193p11-kit PKCS11.CONF(5)