Fix status message warnings for unsupported socket options.
[pwmd.git] / doc / pwmd.html
blobc1d14a7b2536a4958d2ab4aae1269fc7b7184609
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>PWMD Manual</title>
8 <meta name="description" content="PWMD Manual">
9 <meta name="keywords" content="PWMD Manual">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="#Top" rel="start" title="Top">
14 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
15 <link href="dir.html#Top" rel="up" title="(dir)">
16 <style type="text/css">
17 <!--
18 a.summary-letter {text-decoration: none}
19 blockquote.indentedblock {margin-right: 0em}
20 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
21 blockquote.smallquotation {font-size: smaller}
22 div.display {margin-left: 3.2em}
23 div.example {margin-left: 3.2em}
24 div.lisp {margin-left: 3.2em}
25 div.smalldisplay {margin-left: 3.2em}
26 div.smallexample {margin-left: 3.2em}
27 div.smalllisp {margin-left: 3.2em}
28 kbd {font-style: oblique}
29 pre.display {font-family: inherit}
30 pre.format {font-family: inherit}
31 pre.menu-comment {font-family: serif}
32 pre.menu-preformatted {font-family: serif}
33 pre.smalldisplay {font-family: inherit; font-size: smaller}
34 pre.smallexample {font-size: smaller}
35 pre.smallformat {font-family: inherit; font-size: smaller}
36 pre.smalllisp {font-size: smaller}
37 span.nolinebreak {white-space: nowrap}
38 span.roman {font-family: initial; font-weight: normal}
39 span.sansserif {font-family: sans-serif; font-weight: normal}
40 ul.no-bullet {list-style: none}
41 -->
42 </style>
45 </head>
47 <body lang="en">
48 <h1 class="settitle" align="center">PWMD Manual</h1>
53 <a name="Top"></a>
54 <div class="header">
55 <p>
56 Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
57 </div>
58 <h1 class="node-heading">Top</h1>
61 <table class="menu" border="0" cellspacing="0">
62 <tr><td align="left" valign="top">&bull; <a href="#Introduction" accesskey="1">Introduction</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Overview of pwmd.
63 </td></tr>
64 <tr><td align="left" valign="top">&bull; <a href="#Access-Control" accesskey="2">Access Control</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ACL of a single XML element.
65 </td></tr>
66 <tr><td align="left" valign="top">&bull; <a href="#Cache-Control" accesskey="3">Cache Control</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Key and data file cache handling.
67 </td></tr>
68 <tr><td align="left" valign="top">&bull; <a href="#Invoking" accesskey="4">Invoking</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Command line options.
69 </td></tr>
70 <tr><td align="left" valign="top">&bull; <a href="#Configuration" accesskey="5">Configuration</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuration file options.
71 </td></tr>
72 <tr><td align="left" valign="top">&bull; <a href="#Commands" accesskey="6">Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Protocol commands.
73 </td></tr>
74 <tr><td align="left" valign="top">&bull; <a href="#Status-Messages" accesskey="7">Status Messages</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Status lines and their meaning.
75 </td></tr>
76 <tr><td align="left" valign="top">&bull; <a href="#Target-Attribute" accesskey="8">Target Attribute</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">A kind of symbolic link.
77 </td></tr>
78 <tr><td align="left" valign="top">&bull; <a href="#Other-Attributes" accesskey="9">Other Attributes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Other attributes specially handled by pwmd.
79 </td></tr>
80 <tr><td align="left" valign="top">&bull; <a href="#Key-Expiration">Key Expiration</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What to do when a key expires.
81 </td></tr>
82 <tr><td align="left" valign="top">&bull; <a href="#Signals">Signals</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Signals known to pwmd.
83 </td></tr>
84 <tr><td align="left" valign="top">&bull; <a href="#Concept-Index">Concept Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Index of concepts.
85 </td></tr>
86 </table>
88 <hr>
89 <a name="Introduction"></a>
90 <div class="header">
91 <p>
92 Next: <a href="#Access-Control" accesskey="n" rel="next">Access Control</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
93 </div>
94 <a name="Overview-of-pwmd"></a>
95 <h2 class="chapter">1 Overview of <code>pwmd</code></h2>
102 <p><em>Password Manager Daemon</em> (or <code>pwmd</code>) is a server that
103 applications connect to and send commands to put and get data
104 that is stored in an OpenPGP encrypted XML document. It mimics a
105 filesystem in a lot of ways including per element ACL&rsquo;s, but also has
106 the advantage of remote connections over TLS and a document cache. The
107 document cache is needed for a data file encrypted with keys stored on a
108 smartcard.
109 </p>
110 <p>The server uses the Assuan protocol (See <a href="http://www.gnupg.org/documentation/manuals/assuan/Implementation.html#Implementation">(assuan)Implementation</a>) which
111 is the same used by <code>gpg-agent</code>, <code>pinentry</code> and
112 <code>scdaemon</code>. It also uses <cite>libgpg-error</cite> for error reporting with
113 <var>GPG_ERR_SOURCE_USER_1</var> being the error source.
114 </p>
116 <p>The XML document uses the following DTD:
117 </p>
118 <div class="example">
119 <pre class="example"> &lt;?xml version=&quot;1.0&quot;?&gt;
120 &lt;!DOCTYPE pwmd [
121 &lt;!ELEMENT pwmd (element*)&gt;
122 &lt;!ATTLIST element _name CDATA #REQUIRED&gt;
123 ]&gt;
124 </pre></div>
126 <p>The <code>pwmd</code> element is the document root node while all other elements
127 of the document have the name <code>element</code> with an attribute <code>_name</code>
128 whose value uniquely identifies the element at the current element tree depth.
129 It is done this way to avoid XML parsing errors for commonly used
130 characters. A URL for example would be an invalid XML element
131 since the URI contains a &lsquo;<samp>:</samp>&rsquo; which is also the XML
132 namespace separator.
133 </p>
134 <p>As mentioned, an element name must be unique for the current element tree
135 depth. You cannot have two elements containing the same <code>_name</code> attribute
136 value. <code>pwmd</code> will stop searching for an element of an <em>element
137 path</em> at the first match then continue searching for the next element of the
138 element path beginning at the child node of the matched element.
139 </p>
140 <p>An <em>element path</em> is a <code>TAB</code> delimited character string where each
141 <code>TAB</code> separates each element in the path. For example, the element path
142 <code>a<code>TAB</code>b<code>TAB</code>c</code> has the following XML document structure:
143 </p>
144 <div class="example">
145 <pre class="example"> &lt;pwmd&gt;
146 &lt;element _name=&quot;a&quot;&gt;
147 &lt;element _name=&quot;b&quot;&gt;
148 &lt;element _name=&quot;c&quot;&gt;
149 [... element value or content ...]
150 &lt;/element&gt;
151 &lt;/element&gt;
152 &lt;/element&gt;
153 &lt;/pwmd&gt;
154 </pre></div>
156 <p>The only restriction of an element name is that it contain no whitespace
157 characters.
158 </p>
159 <hr>
160 <a name="Access-Control"></a>
161 <div class="header">
163 Next: <a href="#Cache-Control" accesskey="n" rel="next">Cache Control</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
164 </div>
165 <a name="Access-Control-1"></a>
166 <h2 class="chapter">2 Access Control</h2>
168 <p>Like a filesystem has an ACL to grant or limit access to directories or
169 files for a specific user or group, <code>pwmd</code> can limit a local user,
170 group or a TLS connection to a specific element path. This is done by
171 storing an ACL in the element attribute <var>_acl</var>. Its syntax is
172 similar to the <var>allowed</var> configuration parameter (see <a href="#Configuration">Configuration</a>)
173 with the exception that a TLS fingerprint hash is prefixed with a
174 <code>#</code>.
175 </p>
176 <p>Access is denied for all users that are not in the ACL of an element
177 with the exception of an invoking user (see the <var>invoking_user</var>). The
178 connected client must be in the ACL for each element in an element path
179 otherwise an error is returned. As an example:
180 </p>
181 <div class="example">
182 <pre class="example">&lt;element _name=&quot;test&quot; _acl=&quot;username,-@wheel,root,#ABCDEF&quot;&gt;
183 &lt;element _name=&quot;child&quot;/&gt;
184 &lt;/element&gt;
185 </pre></div>
187 <p>The user <code>username</code> would be allowed access to the <code>test</code> element
188 but not if it is a member of the <code>wheel</code> group although, the <code>root</code>
189 user, who may be a member of the <code>wheel</code> group, is allowed. The SHA-256
190 TLS fingerprint hash <code>#ABCDEF</code> is also allowed. No users other than an
191 <var>invoking_user</var> are allowed access to the <code>child</code> element.
192 </p>
193 <p>The first user listed in the ACL is considered the owner of the
194 element. This determines which clients may modify an <var>_acl</var> attribute and
195 store content for an element. An <var>invoking_user</var> may always modify an
196 ACL.
197 </p>
198 <hr>
199 <a name="Cache-Control"></a>
200 <div class="header">
202 Next: <a href="#Invoking" accesskey="n" rel="next">Invoking</a>, Previous: <a href="#Access-Control" accesskey="p" rel="prev">Access Control</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
203 </div>
204 <a name="Cache-Control-1"></a>
205 <h2 class="chapter">3 Cache Control</h2>
209 <p>While <code>pwmd</code> has its own cache settings for an XML document,
210 <code>gpg-agent</code> has cache settings for the keys used for crypto operations
211 of a data file. Specifically the <samp>ignore-cache-for-signing</samp>,
212 <samp>default-cache-ttl</samp> and <samp>max-cache-ttl</samp> options. These
213 <code>gpg-agent</code> options may need to be adjusted depending on your usage
214 needs. For example, the <code>OPEN</code> command may not require a passphrase to
215 open a data file do to the gpg-agent having a cached key even though the
216 <code>ISCACHED</code> command returns an error indicating the data file is not
217 cached; which usually means a passphrase would be required.
218 </p>
219 <p>A copy-on-write operation is done for commands that modify the document; the
220 client that invoked the command will work on a copy of the in-memory document.
221 The first client to <code>SAVE</code> the changes to disk will require other clients
222 to reopen the data file do to the checksum being updated.
223 </p>
224 <hr>
225 <a name="Invoking"></a>
226 <div class="header">
228 Next: <a href="#Configuration" accesskey="n" rel="next">Configuration</a>, Previous: <a href="#Cache-Control" accesskey="p" rel="prev">Cache Control</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
229 </div>
230 <a name="Invoking-pwmd"></a>
231 <h2 class="chapter">4 Invoking <code>pwmd</code></h2>
234 <p><code>pwmd</code> uses GpgME for encryption, decryption and signing of the
235 OpenPGP data file. GpgME itself makes use of <code>gpg</code> for these
236 operations so some configuration of <code>gpg</code> may be needed. Pwmd spawns
237 a separate <code>gpg-agent</code> process when <var>gpg_homedir</var>
238 (see <a href="#Configuration">Configuration</a>) is not set to an instance of an already running
239 gpg-agent. Any <code>gpg</code> configuration options that you need set should be
240 put in <var>~/.pwmd/.gnupg/gpg.conf</var> or the <var>gpg.conf</var> file located in
241 <var>gpg_homedir</var>. The same is true for the <var>gpg-agent.conf</var> file to set
242 any required <code>gpg-agent</code> options.
243 </p>
244 <p>It is recommended to pass the <samp>--allow-preset-passphrase</samp>
245 option to <code>gpg-agent</code>. Doing so allows <code>pwmd</code>
246 cache pushing on startup. It is also recommended to pass the
247 <samp>--allow-loopback-pinentry</samp> to <code>gpg-agent</code> (this is the default
248 as of gnupg-2.1.15). This option allows a passphrase to be inquired from
249 <code>pwmd</code> when a <code>pinentry</code> is unavailable to the client
250 (see <a href="#TLS">TLS</a>).
251 </p>
252 <p>If you would like to use a keypair from your default gnupg keyring located in
253 ~/.gnupg, but would still like to use a separate gpg-agent process (the
254 default), you would need to first export the public key from the default
255 keyring then import it into the keyring that pwmd uses. You can do this by
256 first exporting the public key, then use the <samp>--homedir ~/.pwmd/.gnupg</samp>
257 option of <code>gpg</code> to import it into the new keyring. For private keys,
258 you would need to copy the private key associated with the exported public key
259 to <var>~/.pwmd/.gnupg/private-keys-v1.d</var>. If the private key is stored on
260 a smartcard you can also use the <code>KEYINFO --learn</code> command
261 (see <a href="#KEYINFO">KEYINFO</a>).
262 </p>
263 <a name="index-Running-pwmd"></a>
264 <p><code>pwmd</code> is executed as follows:
265 </p>
266 <div class="example">
267 <pre class="example">pwmd <var>options</var> [ file1 ] [ &hellip; ]
268 </pre></div>
270 <p>Non-option arguments are data files to cache upon startup. When the data file
271 requires a passphrase for decryption a <code>pinentry</code> will prompt either
272 on the current TTY or from an X11 window when the <code>DISPLAY</code>
273 environment variable is set. See <a href="#Pinentry">Pinentry</a>.
274 </p>
275 <a name="index-Options"></a>
276 <a name="index-Arguments"></a>
277 <p>The following command line options are supported:
278 </p>
279 <a name="index-Getting-help"></a>
280 <dl compact="compact">
281 <dt>&lsquo;<samp>--debug protocol:level[,protocol:level]</samp>&rsquo;</dt>
282 <dd><p>Enable debugging output. This option can output sensitive information such as
283 passphrases and secret keys so care should be taken where the output gets
284 written to. The <var>protocol</var> is a single character representing the protocol
285 to log. Use <code>a</code> for <code>libassuan</code> with <var>level</var> being one or more
286 character flags: <code>i</code> for init, <code>x</code> for context, <code>e</code> for engine,
287 <code>d</code> for data, <code>s</code> for system IO or <code>c</code> for control. To debug
288 <code>gpgme</code> use <code>g</code> as the <var>protocol</var> with <var>level</var> being an
289 integer from <code>1</code> to <code>9</code>. To enable <acronym>TLS</acronym> debugging output
290 use <code>t</code> as the <var>protocol</var> with <var>level</var> being an integer from
291 <code>1</code> to <code>9</code>. A value over <code>10</code> will enable all <acronym>TLS</acronym>
292 debugging output with <code>1</code> being the default.
293 </p>
294 </dd>
295 <dt>&lsquo;<samp>--homedir directory</samp>&rsquo;</dt>
296 <dd><p>The root directory where pwmd will store its data and temporary files. The
297 default is <samp>~/.pwmd</samp>.
298 </p>
299 </dd>
300 <dt>&lsquo;<samp>--rcfile, -f rcfile</samp>&rsquo;</dt>
301 <dd><p>Specify an alternate configuration file. The default is
302 <samp>~/.pwmd/config</samp>.
303 </p>
304 </dd>
305 <dt>&lsquo;<samp>--kill</samp>&rsquo;</dt>
306 <dd><p>Terminate an existing instance of pwmd. The process to terminate is determined
307 from the <samp>--homedir</samp> and <samp>--rcfile</samp> options.
308 </p>
309 </dd>
310 <dt>&lsquo;<samp>--import, -I filename|-</samp>&rsquo;</dt>
311 <dd><p>Imports the XML <var>filename</var>. When <var>filename</var> is <code>-</code> the
312 XML is read from stdin. The XML file should be in conformance to
313 the <code>pwmd</code> DTD (see <a href="#Introduction">Introduction</a>). You will be prompted for
314 a passphrase to encrypt with. The output is written to the filename specified
315 with <samp>--outfile</samp>. To make use of the imported data, place the output
316 file in <samp>~/.pwmd/data</samp>.
317 </p>
318 </dd>
319 <dt>&lsquo;<samp>--output, -o filename|-</samp>&rsquo;</dt>
320 <dd><p>When importing, write the encrypted data file to <var>filename</var>. When
321 <var>filename</var> is <code>-</code> output will be written to stdout.
322 </p>
323 </dd>
324 <dt>&lsquo;<samp>--passphrase-file, -k filename&quot;</samp>&rsquo;</dt>
325 <dd><p>Obtain the passphrase to use when importing from the specified <var>filename</var>.
326 </p>
327 </dd>
328 <dt>&lsquo;<samp>--keyid fingerprint[,fingerprint]</samp>&rsquo;</dt>
329 <dd><p>Specifies the fingerprint of the encryption key to use as a recipient when
330 importing. When not specified a new key-pair will be created.
331 </p>
332 </dd>
333 <dt>&lsquo;<samp>--sign-keyid fingerprint</samp>&rsquo;</dt>
334 <dd><p>Specifies the fingerprint of the signing key to use for signing of the data
335 file when importing. When not specified the signing key of the generated
336 key-pair or the signing key of the <samp>--keyid</samp> option will be used.
337 </p>
338 </dd>
339 <dt>&lsquo;<samp>--symmetric, -s</samp>&rsquo;</dt>
340 <dd><p>Use symmetric or conventional encryption rather than pubic key encryption when
341 importing. Signing is still possible by using the <samp>--sign-keyid</samp>
342 option. By default no signing is done when specifying this option.
343 </p>
344 </dd>
345 <dt>&lsquo;<samp>--userid string</samp>&rsquo;</dt>
346 <dd><p>When importing, the user id used to identify the generated key. This should be
347 in the form <code>First Last &lt;email&gt;</code>.
348 </p>
349 </dd>
350 <dt>&lsquo;<samp>--algo string</samp>&rsquo;</dt>
351 <dd><p>When importing, the algorithm to use when generating the new key pair. The
352 default is determined by <code>gpg</code>.
353 </p>
354 </dd>
355 <dt>&lsquo;<samp>--expire seconds</samp>&rsquo;</dt>
356 <dd><p>When importing, the time, in seconds since epoch, when the generated key will
357 expire. Specifying <code>0</code> will never expire the key. The default is three
358 years.
359 </p>
360 </dd>
361 <dt>&lsquo;<samp>--no-passphrase</samp>&rsquo;</dt>
362 <dd><p>When importing, don&rsquo;t require a passphrase for the generated key.
363 </p>
364 </dd>
365 <dt>&lsquo;<samp>--disable-dump</samp>&rsquo;</dt>
366 <dd><p>Disable the <code>XPATH</code>, <code>XPATHATTR</code>, <code>LIST</code> and <code>DUMP</code>
367 protocol commands (see <a href="#Commands">Commands</a>). This overrides any
368 <var>disable_list_and_dump</var> configuration parameter (see <a href="#Configuration">Configuration</a>).
369 </p>
370 </dd>
371 <dt>&lsquo;<samp>--no-fork, -n</samp>&rsquo;</dt>
372 <dd><p>Run as a foreground process and do not fork into the background.
373 </p>
374 </dd>
375 <dt>&lsquo;<samp>--ignore, --force</samp>&rsquo;</dt>
376 <dd><p>Ignore cache pushing failures on startup. By default, <code>pwmd</code> will exit
377 if an error occurred do to an invalid passphrase or other error.
378 </p>
379 </dd>
380 <dt>&lsquo;<samp>--version</samp>&rsquo;</dt>
381 <dd><p>Show the version, copyright and compile time features and exit.
382 </p>
383 </dd>
384 <dt>&lsquo;<samp>--help</samp>&rsquo;</dt>
385 <dd><p>Print a summary of options.
386 </p></dd>
387 </dl>
390 <hr>
391 <a name="Configuration"></a>
392 <div class="header">
394 Next: <a href="#TLS" accesskey="n" rel="next">TLS</a>, Previous: <a href="#Invoking" accesskey="p" rel="prev">Invoking</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
395 </div>
396 <a name="pwmd-configuration-file-options"></a>
397 <h2 class="chapter">5 <code>pwmd</code> configuration file options</h2>
400 <p>If no configuration file is specified with the <code>pwmd</code> <samp>-f</samp>
401 command line option, <code>pwmd</code> will read <samp>~/.pwmd/config</samp> if it
402 exists, and if not, will use defaults. Blank lines and lines beginning with
403 &lsquo;<samp>#</samp>&rsquo; are ignored. Some parameters may have data file specific settings by
404 placing them in a file section. A file section is declared by surrounding the
405 filename with braces (i.e., &lsquo;<samp>[filename]</samp>&rsquo;). Global options may be
406 specified in the <code>global</code> section &lsquo;<samp>e.g., [global]</samp>&rsquo; and are the
407 default options for new or unspecified file sections.
408 </p>
409 <p>A tilde <code>~</code> will be expanded to the home directory of the user starting
410 <code>pwmd</code> when contained in a parameter whose value is a filename.
411 </p>
412 <a name="index-Reloading-the-configuration-file"></a>
413 <p>The configuration file can be reloaded by sending the <em>SIGHUP</em> signal to
414 a <code>pwmd</code> process. Some security sensitive settings may not be changed
415 until <code>pwmd</code> is restarted.
416 </p>
417 <a name="index-Global-configuration-options"></a>
418 <p>The following options are only for use in the <code>[global]</code> section:
419 </p>
420 <dl compact="compact">
421 <dt>&lsquo;<samp>socket_path = /path/to/socket</samp>&rsquo;</dt>
422 <dd><p>Listen on the specified socket. The default is <samp>~/.pwmd/socket</samp>.
423 </p>
424 </dd>
425 <dt>&lsquo;<samp>socket_perms = octal_mode</samp>&rsquo;</dt>
426 <dd><p>Permissions to set after creating the socket. This will override any
427 <cite>umask(2)</cite> setting.
428 </p>
429 </dd>
430 <dt>&lsquo;<samp>backlog = integer</samp>&rsquo;</dt>
431 <dd><p>The number of connections to queue. When this limit is reached then new
432 connections will be refused. The default is <code>128</code>.
433 </p>
434 </dd>
435 <dt>&lsquo;<samp>invoking_user = [-!]user,[-!]@group,[-!]#SHA-256,...</samp>&rsquo;</dt>
436 <dd><p>This parameter is not to be confused with setuid or setguid upon startup. It&rsquo;s
437 syntax is the same as the <code>allowed</code> parameter except that it is a list of
438 local usernames, group names and TLS fingerprint hashes that may use the
439 <code>XPATH</code>, <code>XPATHATTR</code> and <code>DUMP</code> commands (except when
440 disabled with the <code>disable_list_and_dump</code> option) and also who may modify
441 elements that have no <code>_acl</code> attribute or is not listed in an
442 <code>_acl</code>. It is similar to the system administrator root account but for a
443 data file and element paths (see <a href="#Access-Control">Access Control</a>). The default is the user
444 the executes <code>pwmd</code>.
445 </p>
446 </dd>
447 <dt>&lsquo;<samp>invoking_file = filename</samp>&rsquo;</dt>
448 <dd><p>A file containing one entry per line. An entry has the same syntax as the
449 <code>invoking_user</code> parameter. When both this parameter and the
450 <code>invoking_user</code> parameter are specified then the <code>invoking_user</code>
451 parameter will behave as if the <code>invoking_file</code> entries have been
452 appended to the <code>invoking_user</code> parameter value.
453 </p>
454 </dd>
455 <dt>&lsquo;<samp>strict_open = boolean</samp>&rsquo;</dt>
456 <dd><p>When <code>true</code>, disallow creation of a new data file when the current client
457 is not an <code>invoking_user</code>. The default is <code>false</code>.
458 </p>
459 </dd>
460 <dt>&lsquo;<samp>strict_kill = boolean</samp>&rsquo;</dt>
461 <dd><p>When <code>false</code>, the <code>KILL</code> command (see <a href="#KILL">KILL</a>) will allow killing
462 another client that is not of the same <code>UID</code> or TLS fingerprint of
463 the current client and when not an <code>invoking_user</code>. The default us
464 <code>false</code>.
465 </p>
466 </dd>
467 <dt>&lsquo;<samp>allowed = [-!]user,[-!]@group,[+,][-!]#SHA-256,...</samp>&rsquo;</dt>
468 <dd><p>A comma separated list of local user names, group names or TLS
469 fingerprint SHA-256 hashes (in the case of a remote client) who are
470 allowed to connect. Groups should be prefixed with a &lsquo;<samp>@</samp>&rsquo;. When not
471 specified only the user who started <code>pwmd</code> may connect. A username,
472 group name or hash may also be prefixed with a <code>-</code> or <code>!</code> to prevent
473 access to a specific user or group in the list. The order of the list is
474 important since a user may be a member of multiple groups.
475 </p>
476 <p>This parameter may also be specified in a filename section to allow or deny a
477 client to <code>OPEN</code> (see <a href="#OPEN">OPEN</a>) a data file. It also affects the cache
478 commands <code>CLEARCACHE</code> (see <a href="#CLEARCACHE">CLEARCACHE</a>) and <code>CACHETIMEOUT</code>
479 (see <a href="#CACHETIMEOUT">CACHETIMEOUT</a>). When not specified in a file section, any user that
480 can connect may also open any filename (provided they can decrypt it).
481 </p>
482 <p>The following example would deny all users in group <code>primary</code> but
483 allow <code>username</code> who may be a member of <code>primary</code>. It will also
484 allow any TLS client except for the client with TLS fingerprint hash
485 <code>#ABCDEF</code>:
486 </p>
487 <div class="example">
488 <pre class="example">allowed=-@primary,username,+,!#ABCDEF
489 </pre></div>
491 </dd>
492 <dt>&lsquo;<samp>allowed_file = filename</samp>&rsquo;</dt>
493 <dd><p>A file containing one entry per line. An entry has the same syntax as the
494 <code>allowed</code> parameter. When both this parameter and the <code>allowed</code>
495 parameter are specified then the <code>allowed_file</code> entries will be appended
496 to the <code>allowed</code> parameter value.
497 </p>
498 </dd>
499 <dt>&lsquo;<samp>encrypt_to = boolean</samp>&rsquo;</dt>
500 <dd><p>When <code>true</code> and <code>SAVE</code>&rsquo;ing a data file, allow <code>gpg</code> to
501 append it&rsquo;s configured key to the list of recipients. The default is
502 <code>false</code> meaning that only keys specified with <code>SAVE</code>
503 <samp>--keyid</samp> are recipients.
504 </p>
505 </dd>
506 <dt>&lsquo;<samp>always_trust = boolean</samp>&rsquo;</dt>
507 <dd><p>When <code>true</code>, allow encrypting to untrusted recipients or public
508 encryption keys. The default is <code>false</code>.
509 </p>
510 </dd>
511 <dt>&lsquo;<samp>gpg_homedir = path</samp>&rsquo;</dt>
512 <dd><p>The location where <code>gpg</code> will store its public and private keys and
513 configuration. The default is <samp>HOMEDIR/.gnupg</samp> where <var>HOMEDIR</var> is the
514 default (<samp>~/.pwmd</samp>) or the value specified on the command line with the
515 <samp>--homedir</samp> command line option (see <a href="#Invoking">Invoking</a>). If you want to use
516 your standard <code>gpg</code> keyring then set this to <samp>~/.gnupg</samp>. Note
517 that a new instance of <code>gpg-agent</code> will be started when <em>not</em>
518 using the standard keyring and that any configuration options for
519 <code>gpg-agent</code> will need to placed in
520 <samp>HOMEDIR/.gnupg/gpg-agent.conf</samp>.
521 </p>
522 </dd>
523 <dt>&lsquo;<samp>disable_mlockall = boolean</samp>&rsquo;</dt>
524 <dd><p>When set to <code>false</code>, <cite>mlockall(2)</cite> will be called on startup. This
525 will use more physical memory but may also be more secure since no swapping to
526 disk will occur. The default is <var>true</var>. If possible, use an encrypted swap
527 file or partition and leave this set to <var>true</var>.
528 </p>
529 </dd>
530 <dt>&lsquo;<samp>log_path = /path/to/logfile</samp>&rsquo;</dt>
531 <dd><p>Logs informational messages to the specified file. The default is
532 <samp>~/.pwmd/log</samp>.
533 </p>
534 </dd>
535 <dt>&lsquo;<samp>enable_logging = boolean</samp>&rsquo;</dt>
536 <dd><p>Enable or disable logging to <var>log_path</var>. The default is <code>false</code>.
537 </p>
538 </dd>
539 <dt>&lsquo;<samp>log_keepopen = boolean</samp>&rsquo;</dt>
540 <dd><p>When set to <code>false</code>, the log file specified with <var>log_path</var> will be
541 closed after writing each line. The default is <code>true</code>.
542 </p>
543 </dd>
544 <dt>&lsquo;<samp>syslog = boolean</samp>&rsquo;</dt>
545 <dd><p>Enable logging to <cite>syslog(8)</cite> with facility <em>LOG_DAEMON</em> and priority
546 <em>LOG_INFO</em>. The default is <code>false</code>.
547 </p>
548 </dd>
549 <dt>&lsquo;<samp>log_level = level</samp>&rsquo;</dt>
550 <dd><p>When <code>0</code>, only connections and errors are logged. When <code>1</code>, data
551 file recipients and signers are logged during <code>OPEN</code> (see <a href="#OPEN">OPEN</a>) and
552 <code>SAVE</code> (see <a href="#SAVE">SAVE</a>). When <code>2</code>, client commands are also logged.
553 The default is <code>0</code>.
554 </p>
555 </dd>
556 <dt>&lsquo;<samp>kill_scd = boolean</samp>&rsquo;</dt>
557 <dd><p>Attempt to kill <code>scdaemon</code> after a client disconnects. The default is
558 <code>false</code>.
559 </p>
560 </dd>
561 <dt>&lsquo;<samp>disable_list_and_dump = boolean</samp>&rsquo;</dt>
562 <dd><p>When <code>true</code>, the <code>XPATH</code>, <code>XPATHATTR</code>, <code>LIST</code> and
563 <code>DUMP</code> protocol commands (see <a href="#Commands">Commands</a>) will be disabled.
564 </p>
565 </dd>
566 <dt>&lsquo;<samp>cache_push = file1,file2</samp>&rsquo;</dt>
567 <dd><p>A comma separated list of filenames that will be pushed into the file cache
568 upon startup. <code>pwmd</code> will prompt for the passphrase for each file
569 unless specified with <var>passphrase_file</var> parameter in a matching file
570 section.
571 </p>
572 </dd>
573 <dt>&lsquo;<samp>priority = integer</samp>&rsquo;</dt>
574 <dd><p>The priority, or niceness, of the server. The default is inherited from the
575 parent process.
576 </p>
577 </dd>
578 <dt>&lsquo;<samp>lock_timeout = integer</samp>&rsquo;</dt>
579 <dd><p>The default timeout in tenths of a second before giving up waiting for a file
580 lock and returning an error. The default is <code>50</code>.
581 </p>
582 </dd>
583 </dl>
585 <a name="index-Data-file-configuration-options"></a>
586 <p>The following options are defaults for new files when specified in the
587 &lsquo;<samp>global</samp>&rsquo; section. When placed in a data file section they are options
588 specific to that data file only.
589 </p>
590 <dl compact="compact">
591 <dt>&lsquo;<samp>require_save_key = boolean</samp>&rsquo;</dt>
592 <dd><p>Require the passphrase needed for signing before writing changes of the
593 document to disk reguardless of the key cache status. The default is
594 <code>true</code>. This option compliments <code>gpg-agent</code> option
595 <samp>--ignore-cache-for-signing</samp> and is used as a fail-safe.
596 </p>
597 </dd>
598 <dt>&lsquo;<samp>backup = boolean</samp>&rsquo;</dt>
599 <dd><p>Whether to create a backup of the data file when saving. The backup filename
600 has the <samp>.backup</samp> extension appended to the opened file. The default is
601 <code>true</code>.
602 </p>
603 </dd>
604 <dt>&lsquo;<samp>cache_timeout = seconds</samp>&rsquo;</dt>
605 <dd><p>The number of seconds to keep the cache entry for this file. If <code>-1</code>, the
606 cache entry is kept forever. If <code>0</code>, each time an encrypted file is
607 <code>OPEN</code>ed (see <a href="#OPEN">OPEN</a>) a passphrase will be required. The default
608 is <code>600</code> or 10 minutes.
609 </p>
610 </dd>
611 <dt>&lsquo;<samp>xfer_progress = bytes</samp>&rsquo;</dt>
612 <dd><p>Commands that send data lines to the client will also send the <code>XFER</code>
613 status message (see <a href="#Status-Messages">Status Messages</a>) after the specified number of bytes
614 have been sent. The number of bytes is rounded to <var>ASSUAN_LINELENGTH</var> or
615 <code>1002</code> bytes. The default is <code>8196</code>.
616 </p>
617 </dd>
618 <dt>&lsquo;<samp>passphrase_file = /path/to/filename</samp>&rsquo;</dt>
619 <dd><p>Obtain the passphrase to open the data file from <var>filename</var>. If specified
620 in the &lsquo;<samp>global</samp>&rsquo; section then the <var>passphrase_file</var> is a default for
621 all data files. Note that if a client changes the passphrase for this data
622 file then the <var>passphrase_file</var> will need to be updated with the new
623 passphrase.
624 </p>
625 </dd>
626 <dt>&lsquo;<samp>recursion_depth = integer</samp>&rsquo;</dt>
627 <dd><p>The maximum number of times to resolve a <code>target</code> attribute for an
628 element in an element path (see <a href="#Target-Attribute">Target Attribute</a>). An error is returned
629 when this value is exceeded. The default is <code>100</code> but can be disabled by
630 setting to <code>0</code> (<em>not recommended</em>).
631 </p>
632 </dd>
633 <dt>&lsquo;<samp>allowed = [-]user,[-]@group,[!]#TLSFINGERPRINT,...</samp>&rsquo;</dt>
634 <dd><p>Same parameter value as the <code>allowed</code> parameter mentioned above in
635 the &lsquo;<samp>[global]</samp>&rsquo; section but grants or denies a client from opening a
636 specific data file. The default is to allow any client that is allowed to
637 connect.
638 </p>
639 </dd>
640 </dl>
641 <table class="menu" border="0" cellspacing="0">
642 <tr><td align="left" valign="top">&bull; <a href="#TLS" accesskey="1">TLS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remote connections over TLS.
643 </td></tr>
644 <tr><td align="left" valign="top">&bull; <a href="#Pinentry" accesskey="2">Pinentry</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuration file and defaults.
645 </td></tr>
646 </table>
648 <hr>
649 <a name="TLS"></a>
650 <div class="header">
652 Next: <a href="#Pinentry" accesskey="n" rel="next">Pinentry</a>, Previous: <a href="#Configuration" accesskey="p" rel="prev">Configuration</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
653 </div>
654 <a name="Configuring-remote-connections-over-TLS_002e"></a>
655 <h2 class="chapter">6 Configuring remote connections over TLS.</h2>
656 <p>Remote connections can also be made to <code>pwmd</code> over TLS.
657 Authentication is done by using X.509 client certificates that are signed with
658 the same Certificate Authority (CA) as the server certificate.
659 </p>
660 <p>The CA certificate is expected to be found in
661 <samp>~/.pwmd/ca-cert.pem</samp> while the <code>pwmd</code> server certificate and key
662 file should be put in <samp>~/.pwmd/server-cert.pem</samp> and
663 <samp>~/.pwmd/server-key.pem</samp>, respectively.
664 </p>
665 <p>See the documentation of <code>certtool</code> or <code>openssl</code> for details
666 about creating self-signed certificates.
667 </p>
668 <p>The following TLS configuration options are available:
669 </p>
670 <dl compact="compact">
671 <dt>&lsquo;<samp>enable_tcp = boolean</samp>&rsquo;</dt>
672 <dd><p>Whether to enable TCP/TLS server support. If enabled, both TCP and the local
673 unix domain socket will listen for connections. The default is
674 <code>false</code>.
675 </p>
676 </dd>
677 <dt>&lsquo;<samp>tcp_port = integer</samp>&rsquo;</dt>
678 <dd><p>The TCP port to listen on when <var>enable_tcp</var> is <code>true</code>. The default is
679 <code>6466</code>.
680 </p>
681 </dd>
682 <dt>&lsquo;<samp>tcp_bind = string</samp>&rsquo;</dt>
683 <dd><p>The internet protocol to listen with. Must be one of <code>ipv4</code>, <code>ipv6</code>
684 or <code>any</code> to listen for both IPv4 and IPv6 connections. The default is
685 <code>any</code>.
686 </p>
687 </dd>
688 <dt>&lsquo;<samp>tcp_interface = string</samp>&rsquo;</dt>
689 <dd><p>Only useful if running as root.
690 </p>
691 </dd>
692 <dt>&lsquo;<samp>tls_timeout = seconds</samp>&rsquo;</dt>
693 <dd><p>The number of seconds to wait for a read() or write() call on a
694 TLS client file descriptor to complete before returning an
695 error. The default is <var>300</var>.
696 </p>
697 </dd>
698 <dt>&lsquo;<samp>keepalive_interval = seconds</samp>&rsquo;</dt>
699 <dd><p>Send a keepalive status message to an idle remote client. An idle
700 client is one that is not in a command. The purpose of this status
701 message is to disconnect a hung remote client and release any file mutex
702 locks so another client may open the same data file. The default is <code>60</code>.
703 </p>
704 </dd>
705 <dt>&lsquo;<samp>tcp_require_key = boolean</samp>&rsquo;</dt>
706 <dd><p>When <code>true</code>, require the remote client to provide the passphrase to open
707 a data file even if the file is cached. This option is a default for all
708 files when specified in the &lsquo;<samp>[global]</samp>&rsquo; section. The default is
709 <code>false</code>.
710 </p>
711 </dd>
712 <dt>&lsquo;<samp>tls_cipher_suite = string</samp>&rsquo;</dt>
713 <dd><p>The GnuTLS cipher suite and protocol to use. See the GnuTLS documentation for
714 information about the format of this string. The default is
715 <code>SECURE256:SECURE192:SECURE128:-VERS-SSL3.0:-VERS-TLS1.0</code>.
716 </p>
717 </dd>
718 <dt>&lsquo;<samp>tls_dh_params_file = filename</samp>&rsquo;</dt>
719 <dd><p>The PEM encoded filename containing DH parameters. If not specified
720 then DH algorithms will not be available to the client. See the
721 <code>openssl dhparam</code> or <code>certtool</code> manual pages for details about
722 generating this file.
723 </p>
724 <p>Note that SIGHUP will not reload this file once TLS support has been enabled.
725 You will need to restart <code>pwmd</code> for changes to take effect.
726 </p>
727 </dd>
728 <dt>&lsquo;<samp>tls_use_crl = boolean</samp>&rsquo;</dt>
729 <dd><p>When <code>true</code>, enabling reading of <samp>~/.pwmd/crl.pem</samp>. This
730 file is an X.509 Certificate Revocation List and can be used to deny clients
731 by adding client certificates to it. The default is <code>false</code>.
732 <code>pwmd</code> will need to be restarted to recognize any changes to this
733 file.
734 </p></dd>
735 </dl>
737 <hr>
738 <a name="Pinentry"></a>
739 <div class="header">
741 Next: <a href="#Commands" accesskey="n" rel="next">Commands</a>, Previous: <a href="#TLS" accesskey="p" rel="prev">TLS</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
742 </div>
743 <a name="Pinentry-configuration"></a>
744 <h2 class="chapter">7 Pinentry configuration</h2>
746 <p>The <code>pinentry</code> program is used to prompt the user for passphrase
747 input or as a confirmation dialog; it needs to know where to prompt for
748 the input, beit from a terminal or an X11 display.
749 </p>
750 <p>It is the responsibility of the client to tell <code>pinentry</code> about the
751 terminal or X11 display before requiring the input. This is done with the
752 <code>OPTION</code> command (see <a href="#OPTION">OPTION</a>) to either set or unset needed
753 <code>pwmd</code> environment variables and by using the
754 <code>gpg-connect-agent</code> program. Please read it&rsquo;s documentation about the
755 <em>UPDATESTARTUPTTY</em> command.
756 </p>
757 <hr>
758 <a name="Commands"></a>
759 <div class="header">
761 Next: <a href="#Status-Messages" accesskey="n" rel="next">Status Messages</a>, Previous: <a href="#Pinentry" accesskey="p" rel="prev">Pinentry</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
762 </div>
763 <a name="Protocol-commands-and-their-syntax"></a>
764 <h2 class="chapter">8 Protocol commands and their syntax</h2>
765 <table class="menu" border="0" cellspacing="0">
766 <tr><td align="left" valign="top">&bull; <a href="#ATTR" accesskey="1">ATTR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Modifying element attributes.
767 </td></tr>
768 <tr><td align="left" valign="top">&bull; <a href="#CACHETIMEOUT" accesskey="2">CACHETIMEOUT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Setting the cache timeout.
769 </td></tr>
770 <tr><td align="left" valign="top">&bull; <a href="#CLEARCACHE" accesskey="3">CLEARCACHE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Removing a cache entry.
771 </td></tr>
772 <tr><td align="left" valign="top">&bull; <a href="#COPY" accesskey="4">COPY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Copying an element.
773 </td></tr>
774 <tr><td align="left" valign="top">&bull; <a href="#DELETE" accesskey="5">DELETE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Deleting an element.
775 </td></tr>
776 <tr><td align="left" valign="top">&bull; <a href="#DELETEKEY" accesskey="6">DELETEKEY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Deleting a key from the key ring.
777 </td></tr>
778 <tr><td align="left" valign="top">&bull; <a href="#DUMP" accesskey="7">DUMP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Showing the XML document.
779 </td></tr>
780 <tr><td align="left" valign="top">&bull; <a href="#GENKEY" accesskey="8">GENKEY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generating a new key.
781 </td></tr>
782 <tr><td align="left" valign="top">&bull; <a href="#GET" accesskey="9">GET</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Getting the content of an element.
783 </td></tr>
784 <tr><td align="left" valign="top">&bull; <a href="#GETCONFIG">GETCONFIG</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Obtaining a configuration value.
785 </td></tr>
786 <tr><td align="left" valign="top">&bull; <a href="#GETINFO">GETINFO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Obtaining server and client information.
787 </td></tr>
788 <tr><td align="left" valign="top">&bull; <a href="#HELP">HELP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Showing available commands.
789 </td></tr>
790 <tr><td align="left" valign="top">&bull; <a href="#IMPORT">IMPORT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Creating elements from XML.
791 </td></tr>
792 <tr><td align="left" valign="top">&bull; <a href="#ISCACHED">ISCACHED</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Testing cache status.
793 </td></tr>
794 <tr><td align="left" valign="top">&bull; <a href="#KEYINFO">KEYINFO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Showing keys used for the current data file.
795 </td></tr>
796 <tr><td align="left" valign="top">&bull; <a href="#KILL">KILL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Terminating another client.
797 </td></tr>
798 <tr><td align="left" valign="top">&bull; <a href="#LIST">LIST</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Showing document elements.
799 </td></tr>
800 <tr><td align="left" valign="top">&bull; <a href="#LISTKEYS">LISTKEYS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Listing keys in the key ring.
801 </td></tr>
802 <tr><td align="left" valign="top">&bull; <a href="#LOCK">LOCK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Locking the current data file.
803 </td></tr>
804 <tr><td align="left" valign="top">&bull; <a href="#LS">LS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Showing available data files.
805 </td></tr>
806 <tr><td align="left" valign="top">&bull; <a href="#MOVE">MOVE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Moving an element.
807 </td></tr>
808 <tr><td align="left" valign="top">&bull; <a href="#NOP">NOP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Testing the connection.
809 </td></tr>
810 <tr><td align="left" valign="top">&bull; <a href="#OPEN">OPEN</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Opening a data file.
811 </td></tr>
812 <tr><td align="left" valign="top">&bull; <a href="#OPTION">OPTION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Setting various client parameters.
813 </td></tr>
814 <tr><td align="left" valign="top">&bull; <a href="#PASSWD">PASSWD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing the passphrase for a key.
815 </td></tr>
816 <tr><td align="left" valign="top">&bull; <a href="#REALPATH">REALPATH</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Resolving an element.
817 </td></tr>
818 <tr><td align="left" valign="top">&bull; <a href="#RENAME">RENAME</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Renaming an element.
819 </td></tr>
820 <tr><td align="left" valign="top">&bull; <a href="#RESET">RESET</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Resetting the client state.
821 </td></tr>
822 <tr><td align="left" valign="top">&bull; <a href="#SAVE">SAVE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Saving document changes to disk.
823 </td></tr>
824 <tr><td align="left" valign="top">&bull; <a href="#STORE">STORE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Modifying the content of an element.
825 </td></tr>
826 <tr><td align="left" valign="top">&bull; <a href="#UNLOCK">UNLOCK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Removing a data file lock.
827 </td></tr>
828 <tr><td align="left" valign="top">&bull; <a href="#XPATH">XPATH</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Modifying more than one element.
829 </td></tr>
830 <tr><td align="left" valign="top">&bull; <a href="#XPATHATTR">XPATHATTR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Modifying more than one element&rsquo;s attributes.
831 </td></tr>
832 </table>
833 <hr>
834 <a name="ATTR"></a>
835 <div class="header">
837 Next: <a href="#CACHETIMEOUT" accesskey="n" rel="next">CACHETIMEOUT</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
838 </div>
839 <a name="Modifying-element-attributes_002e"></a>
840 <h2 class="chapter">9 Modifying element attributes.</h2>
841 <a name="index-ATTR-command"></a>
842 <p>Syntax:
843 </p><div class="example">
844 <pre class="example">ATTR [--inquire] SET|GET|DELETE|LIST [&lt;attribute&gt;] element[&lt;TAB&gt;child[..]] ..
845 </pre></div>
847 <dl compact="compact">
848 <dt>ATTR SET attribute element[&lt;TAB&gt;child[..]] [value]</dt>
849 <dd><p>Stores or updates an <var>attribute</var> name and optional <var>value</var> of an
850 element. When no <var>value</var> is specified any existing value will be removed.
851 <br><br>
852 </p></dd>
853 <dt>ATTR DELETE attribute element[&lt;TAB&gt;child[..]]</dt>
854 <dd><p>Removes an attribute from an element. If <var>attribute</var> is <code>_name</code>
855 or <code>target</code> an error is returned. Use the <code>DELETE</code> command
856 (see <a href="#DELETE">DELETE</a>) instead.
857 <br><br>
858 </p></dd>
859 <dt>ATTR LIST element[&lt;TAB&gt;child[..]]</dt>
860 <dd><p>Retrieves a newline separated list of attributes names and values
861 from the specified element. Each attribute name and value is space delimited.
862 <br><br>
863 </p></dd>
864 <dt>ATTR GET attribute element[&lt;TAB&gt;child[..]]</dt>
865 <dd><p>Retrieves the value of an <var>attribute</var> from an element.
866 </p></dd>
867 </dl>
868 <br><br>
869 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
870 arguments are retrieved via a server <em>INQUIRE</em>.
871 <br><br>
872 See <a href="#Target-Attribute">Target Attribute</a>, for details about this special attribute and also
873 see <a href="#Other-Attributes">Other Attributes</a> for other attributes that are handled specially
874 by <code>pwmd</code>.
875 </p>
877 <hr>
878 <a name="CACHETIMEOUT"></a>
879 <div class="header">
881 Next: <a href="#CLEARCACHE" accesskey="n" rel="next">CLEARCACHE</a>, Previous: <a href="#ATTR" accesskey="p" rel="prev">ATTR</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
882 </div>
883 <a name="Setting-the-cache-timeout_002e"></a>
884 <h2 class="chapter">10 Setting the cache timeout.</h2>
885 <a name="index-CACHETIMEOUT-command"></a>
886 <p>Syntax:
887 </p><div class="example">
888 <pre class="example">CACHETIMEOUT &lt;seconds&gt;
889 </pre></div>
891 <p>The time in <var>seconds</var> until the currently opened data file will be
892 removed from the cache. <code>-1</code> will keep the cache entry forever,
893 <code>0</code> will require the passphrase for each <code>OPEN</code> command
894 (see <a href="#OPEN">OPEN</a>) or <code>SAVE</code> (see <a href="#SAVE">SAVE</a>) command. See <a href="#Configuration">Configuration</a>,
895 and the <code>cache_timeout</code> parameter.
896 </p>
898 <hr>
899 <a name="CLEARCACHE"></a>
900 <div class="header">
902 Next: <a href="#COPY" accesskey="n" rel="next">COPY</a>, Previous: <a href="#CACHETIMEOUT" accesskey="p" rel="prev">CACHETIMEOUT</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
903 </div>
904 <a name="Removing-a-cache-entry_002e"></a>
905 <h2 class="chapter">11 Removing a cache entry.</h2>
906 <a name="index-CLEARCACHE-command"></a>
907 <p>Syntax:
908 </p><div class="example">
909 <pre class="example">CLEARCACHE [&lt;filename&gt;]
910 </pre></div>
912 <p>Clears a file cache entry for all or the specified <var>filename</var>. Note that
913 this will also clear any <code>gpg-agent</code> cached keys which may cause
914 problems if another data file shares the same keys as <var>filename</var>.
915 <br><br>
916 When clearing all cache entries a permissions test is done against the
917 current client based on the <var>allowed</var> configuration parameter in a
918 <var>filename</var> section. Both a cache entry may be cleared and an error
919 returned depending on cached data files and client permissions.
920 </p>
922 <hr>
923 <a name="COPY"></a>
924 <div class="header">
926 Next: <a href="#DELETE" accesskey="n" rel="next">DELETE</a>, Previous: <a href="#CLEARCACHE" accesskey="p" rel="prev">CLEARCACHE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
927 </div>
928 <a name="Copying-an-element_002e"></a>
929 <h2 class="chapter">12 Copying an element.</h2>
930 <a name="index-COPY-command"></a>
931 <p>Syntax:
932 </p><div class="example">
933 <pre class="example">COPY [--inquire] source[&lt;TAB&gt;child[..]] dest[&lt;TAB&gt;child[..]]
934 </pre></div>
936 <p>Copies the entire element tree starting from the child node of the source
937 element, to the destination element path. If the destination element path
938 does not exist then it will be created; otherwise it is overwritten.
939 <br><br>
940 Note that attributes from the source element are merged into the
941 destination element when the destination element path exists. When an
942 attribute of the same name exists in both the source and destination
943 elements then the destination attribute will be updated to the source
944 attribute value.
945 <br><br>
946 When the <samp>--inquire</samp> option is passed then all remaining non-option
947 arguments are retrieved via a server <em>INQUIRE</em>.
948 </p>
950 <hr>
951 <a name="DELETE"></a>
952 <div class="header">
954 Next: <a href="#DELETEKEY" accesskey="n" rel="next">DELETEKEY</a>, Previous: <a href="#COPY" accesskey="p" rel="prev">COPY</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
955 </div>
956 <a name="Deleting-an-element_002e"></a>
957 <h2 class="chapter">13 Deleting an element.</h2>
958 <a name="index-DELETE-command"></a>
959 <p>Syntax:
960 </p><div class="example">
961 <pre class="example">DELETE [--inquire] element[&lt;TAB&gt;child[..]]
962 </pre></div>
964 <p>Removes the specified element path and all of its children. This may break
965 an element with a <code>target</code> attribute (see <a href="#Target-Attribute">Target Attribute</a>) that
966 refers to this element or any of its children.
967 <br><br>
968 When the <samp>--inquire</samp> option is passed then all remaining non-option
969 arguments are retrieved via a server <em>INQUIRE</em>.
970 </p>
972 <hr>
973 <a name="DELETEKEY"></a>
974 <div class="header">
976 Next: <a href="#DUMP" accesskey="n" rel="next">DUMP</a>, Previous: <a href="#DELETE" accesskey="p" rel="prev">DELETE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
977 </div>
978 <a name="Deleting-a-key-from-the-key-ring_002e"></a>
979 <h2 class="chapter">14 Deleting a key from the key ring.</h2>
980 <a name="index-DELETEKEY-command"></a>
981 <p>Syntax:
982 </p><div class="example">
983 <pre class="example">DELETEKEY &lt;keyid&gt;
984 </pre></div>
986 <p>Deletes the secret key associated with key <var>keyid</var> from the keyring.
987 Note that when the key is deleted, the current or other data files using
988 this key will no longer be able to be opened.
989 </p>
991 <hr>
992 <a name="DUMP"></a>
993 <div class="header">
995 Next: <a href="#GENKEY" accesskey="n" rel="next">GENKEY</a>, Previous: <a href="#DELETEKEY" accesskey="p" rel="prev">DELETEKEY</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
996 </div>
997 <a name="Showing-the-XML-document_002e"></a>
998 <h2 class="chapter">15 Showing the XML document.</h2>
999 <a name="index-DUMP-command"></a>
1000 <p>Syntax:
1001 </p><div class="example">
1002 <pre class="example">DUMP
1003 </pre></div>
1005 <p>Shows the in memory <abbr>XML</abbr> document with indenting. See <a href="#XPATH">XPATH</a>, for
1006 dumping a specific node.
1007 </p>
1009 <hr>
1010 <a name="GENKEY"></a>
1011 <div class="header">
1013 Next: <a href="#GET" accesskey="n" rel="next">GET</a>, Previous: <a href="#DUMP" accesskey="p" rel="prev">DUMP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1014 </div>
1015 <a name="Generating-a-new-key_002e"></a>
1016 <h2 class="chapter">16 Generating a new key.</h2>
1017 <a name="index-GENKEY-command"></a>
1018 <p>Syntax:
1019 </p><div class="example">
1020 <pre class="example">GENKEY --subkey-of=fpr | --userid=&quot;str&quot; [--no-expire | --expire=N] [--algo=&quot;str&quot;] [--no-passphrase] [--usage=&quot;default|sign|encrypt&quot;]
1021 </pre></div>
1023 <p>Generates a new key based on option arguments. One of
1024 <samp>--subkey-of</samp> or <samp>--userid</samp> is
1025 required. The <samp>--subkey-of</samp> option will generate a subkey for the key
1026 of the specified fingerprint.
1027 </p>
1029 <hr>
1030 <a name="GET"></a>
1031 <div class="header">
1033 Next: <a href="#GETCONFIG" accesskey="n" rel="next">GETCONFIG</a>, Previous: <a href="#GENKEY" accesskey="p" rel="prev">GENKEY</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1034 </div>
1035 <a name="Getting-the-content-of-an-element_002e"></a>
1036 <h2 class="chapter">17 Getting the content of an element.</h2>
1037 <a name="index-GET-command"></a>
1038 <p>Syntax:
1039 </p><div class="example">
1040 <pre class="example">GET [--inquire] element[&lt;TAB&gt;child[..]]
1041 </pre></div>
1043 <p>Retrieves the content of the specified element. The content is returned
1044 with a data response.
1045 <br><br>
1046 When the <samp>--inquire</samp> option is passed then all remaining non-option
1047 arguments are retrieved via a server <em>INQUIRE</em>.
1048 </p>
1050 <hr>
1051 <a name="GETCONFIG"></a>
1052 <div class="header">
1054 Next: <a href="#GETINFO" accesskey="n" rel="next">GETINFO</a>, Previous: <a href="#GET" accesskey="p" rel="prev">GET</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1055 </div>
1056 <a name="Obtaining-a-configuration-value_002e"></a>
1057 <h2 class="chapter">18 Obtaining a configuration value.</h2>
1058 <a name="index-GETCONFIG-command"></a>
1059 <p>Syntax:
1060 </p><div class="example">
1061 <pre class="example">GETCONFIG [filename] &lt;parameter&gt;
1062 </pre></div>
1064 <p>Returns the value of a <code>pwmd</code> configuration <var>parameter</var> with a
1065 data response. If no file has been opened then the value for <var>filename</var>
1066 or the default from the <var>global</var> section will be returned. If a file
1067 has been opened and no <var>filename</var> is specified, the value previously
1068 set with the <code>OPTION</code> command (see <a href="#OPTION">OPTION</a>) will be returned.
1069 </p>
1071 <hr>
1072 <a name="GETINFO"></a>
1073 <div class="header">
1075 Next: <a href="#HELP" accesskey="n" rel="next">HELP</a>, Previous: <a href="#GETCONFIG" accesskey="p" rel="prev">GETCONFIG</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1076 </div>
1077 <a name="Obtaining-server-and-client-information_002e"></a>
1078 <h2 class="chapter">19 Obtaining server and client information.</h2>
1079 <a name="index-GETINFO-command"></a>
1080 <p>Syntax:
1081 </p><div class="example">
1082 <pre class="example">GETINFO [--data] [--verbose] CACHE | CLIENTS | PID | USER | LAST_ERROR | VERSION
1083 </pre></div>
1085 <p>Get server and other information. The information is returned via a status
1086 message (see <a href="#Status-Messages">Status Messages</a>) unless otherwise noted or <samp>--data</samp>
1087 is specified.
1088 <br><br>
1089 <var>CACHE</var> returns the number of cached documents.
1090 <br><br>
1091 <var>CLIENTS</var> returns the number of
1092 connected clients via a status message or a list of connected clients when
1093 the <samp>--verbose</samp> parameter is used (implies <samp>--data</samp>). A
1094 verbose line of a client list contains
1095 space delimited
1096 fields: the thread ID, client name, opened file (<code>/</code> if none opened),
1097 IP address if remote, file lock status, whether the current client is self
1098 or not, client state (see below),
1099 user ID or TLS fingerprint of the connected client, username if the
1100 client is a local one else <code>-</code>, and finally the time stamp of when the
1101 client connected.
1102 <br><br>
1103 Client state <code>0</code> is an unknown client state, state <code>1</code> indicates
1104 the client has connected but hasn&rsquo;t completed initializing, state <code>2</code>
1105 indicates that the client is idle, state <code>3</code> means the
1106 client is in a command and state <code>4</code> means the client is disconnecting.
1107 <br><br>
1108 <var>PID</var> returns the process ID number of the server via a data response.
1109 <br><br>
1110 <var>VERSION</var> returns the server version number and compile-time features
1111 via a data response with each being space delimited.
1112 <br><br>
1113 <var>LAST_ERROR</var> returns a detailed description of the last failed command
1114 via a data response, when available.
1115 <br><br>
1116 <var>USER</var> returns the username or <abbr>TLS</abbr> hash of the connected client
1117 via a data response.
1118 </p>
1120 <hr>
1121 <a name="HELP"></a>
1122 <div class="header">
1124 Next: <a href="#IMPORT" accesskey="n" rel="next">IMPORT</a>, Previous: <a href="#GETINFO" accesskey="p" rel="prev">GETINFO</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1125 </div>
1126 <a name="Showing-available-commands_002e"></a>
1127 <h2 class="chapter">20 Showing available commands.</h2>
1128 <a name="index-HELP-command"></a>
1129 <p>Syntax:
1130 </p><div class="example">
1131 <pre class="example">HELP [--html] [&lt;COMMAND&gt;]
1132 </pre></div>
1134 <p>Show available commands or command specific help text.
1135 <br><br>
1136 The <samp>--html</samp> option will output the help text in HTML format.
1137 </p>
1139 <hr>
1140 <a name="IMPORT"></a>
1141 <div class="header">
1143 Next: <a href="#ISCACHED" accesskey="n" rel="next">ISCACHED</a>, Previous: <a href="#HELP" accesskey="p" rel="prev">HELP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1144 </div>
1145 <a name="Creating-elements-from-XML_002e"></a>
1146 <h2 class="chapter">21 Creating elements from XML.</h2>
1147 <a name="index-IMPORT-command"></a>
1148 <p>Syntax:
1149 </p><div class="example">
1150 <pre class="example">IMPORT [--root=element[&lt;TAB&gt;child[..]]]
1151 </pre></div>
1153 <p>This command uses a server <em>INQUIRE</em> to retrieve data from the client.
1154 <br><br>
1155 Like the <code>STORE</code> command (see <a href="#STORE">STORE</a>), but the <var>content</var>
1156 argument is raw <abbr>XML</abbr> data. The content is created as a child of
1157 the element path specified with the <samp>--root</samp> option or at the
1158 document root when not specified. Existing elements of the same name will
1159 be overwritten.
1160 <br><br>
1161 The content must begin with an <abbr>XML</abbr> element node. See <a href="#Introduction">Introduction</a>,
1162 for details.
1163 </p>
1165 <hr>
1166 <a name="ISCACHED"></a>
1167 <div class="header">
1169 Next: <a href="#KEYINFO" accesskey="n" rel="next">KEYINFO</a>, Previous: <a href="#IMPORT" accesskey="p" rel="prev">IMPORT</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1170 </div>
1171 <a name="Testing-cache-status_002e"></a>
1172 <h2 class="chapter">22 Testing cache status.</h2>
1173 <a name="index-ISCACHED-command"></a>
1174 <p>Syntax:
1175 </p><div class="example">
1176 <pre class="example">ISCACHED [--lock] [--agent [--sign]] &lt;filename&gt;
1177 </pre></div>
1179 <p>Determines the file cache status of the specified <var>filename</var>.
1180 The default is to test whether the filename is cached in memory. Passing
1181 option <samp>--agent</samp> will test the <code>gpg-agent</code> cache for at most
1182 one cached key used for opening the data file (see <a href="#OPEN">OPEN</a>). To test if
1183 a signing key is cached, pass <samp>--sign</samp> along with <samp>--agent</samp>.
1184 Both the <samp>--agent</samp> and <samp>--sign</samp> options require an opened data
1185 file.
1186 <br><br>
1187 An <em>OK</em> response is returned if the specified <var>filename</var> is found
1188 in the cache. If not found in the cache but exists on the filesystem
1189 then <code>GPG_ERR_NO_DATA</code> is returned. Otherwise a filesystem error is
1190 returned.
1191 <br><br>
1192 The <samp>--lock</samp> option will lock the file mutex of <var>filename</var> when
1193 the file exists; it does not need to be opened nor cached. The lock will be
1194 released when the client exits or sends the <code>UNLOCK</code> command
1195 (see <a href="#UNLOCK">UNLOCK</a>). When this option is passed the current data file is closed.
1196 </p>
1198 <hr>
1199 <a name="KEYINFO"></a>
1200 <div class="header">
1202 Next: <a href="#KILL" accesskey="n" rel="next">KILL</a>, Previous: <a href="#ISCACHED" accesskey="p" rel="prev">ISCACHED</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1203 </div>
1204 <a name="Showing-keys-used-for-the-current-data-file_002e"></a>
1205 <h2 class="chapter">23 Showing keys used for the current data file.</h2>
1206 <a name="index-KEYINFO-command"></a>
1207 <p>Syntax:
1208 </p><div class="example">
1209 <pre class="example">KEYINFO [--learn]
1210 </pre></div>
1212 <p>Returns a new line separated list of key ID&rsquo;s that the currently opened
1213 data file has recipients and signers for. If the key is a signing key it
1214 will be prefixed with an <code>S</code>. If the file is a new one, or has no
1215 signers in the case of being symmetrically encrypted, the error code
1216 <code>GPG_ERR_NO_DATA</code> is returned.
1217 <br><br>
1218 When the <samp>--learn</samp> option is passed, keys on a smartcard will be
1219 imported.
1220 </p>
1222 <hr>
1223 <a name="KILL"></a>
1224 <div class="header">
1226 Next: <a href="#LIST" accesskey="n" rel="next">LIST</a>, Previous: <a href="#KEYINFO" accesskey="p" rel="prev">KEYINFO</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1227 </div>
1228 <a name="Terminating-another-client_002e"></a>
1229 <h2 class="chapter">24 Terminating another client.</h2>
1230 <a name="index-KILL-command"></a>
1231 <p>Syntax:
1232 </p><div class="example">
1233 <pre class="example">KILL &lt;thread_id&gt;
1234 </pre></div>
1236 <p>Terminates the client identified by <var>thread_id</var> and releases any file
1237 lock or other resources it has held. See <code>GETINFO</code> (see <a href="#GETINFO">GETINFO</a>)
1238 for details about listing connected clients. An <code>invoking_user</code>
1239 (see <a href="#Configuration">Configuration</a>) may kill any client while others may only kill
1240 clients of the same <code>UID</code> or <abbr>TLS</abbr> fingerprint.
1241 </p>
1243 <hr>
1244 <a name="LIST"></a>
1245 <div class="header">
1247 Next: <a href="#LISTKEYS" accesskey="n" rel="next">LISTKEYS</a>, Previous: <a href="#KILL" accesskey="p" rel="prev">KILL</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1248 </div>
1249 <a name="Showing-document-elements_002e"></a>
1250 <h2 class="chapter">25 Showing document elements.</h2>
1251 <a name="index-LIST-command"></a>
1252 <p>Syntax:
1253 </p><div class="example">
1254 <pre class="example">LIST [--inquire] [--recurse] [element[&lt;TAB&gt;child[..]]]
1255 </pre></div>
1257 <p>If no element path is given then a newline separated list of root elements
1258 is returned with a data response. If given, then children of the specified
1259 element path are returned.
1260 <br><br>
1261 Each element path
1262 returned will have zero or more flags appened to it. These flags are
1263 delimited from the element path by a single space character. A flag itself
1264 is a single character. Flag <code>P</code> indicates that access to the element
1265 is denied. Flag <code>+</code> indicates that there are child nodes of
1266 the current element path. Flag <code>E</code> indicates that an element of the
1267 element path contained in a <var>target</var> attribute could not be found. Flag
1268 <code>O</code> indicates that a <var>target</var> attribute recursion limit was reached
1269 (see <a href="#Configuration">Configuration</a>). Flag <code>T</code>, followed by a single space character,
1270 then an element path, is the element path of the <var>target</var> attribute
1271 contained in the current element.
1272 <br><br>
1273 When a specified element path contains an error, beit from the final
1274 element in the path or any previous element, the path is still shown but
1275 will contain the error flag for the element with the error. Determining
1276 the actual element which contains the error is up to the client. This can be
1277 done by traversing the final element up to parent elements that contain the
1278 same error flag.
1279 <br><br>
1280 The option <samp>--recurse</samp> may be used to list the entire element tree
1281 for a specified element path or the entire tree for all root elements.
1282 <br><br>
1283 When the <samp>--inquire</samp> option is passed then all remaining non-option
1284 arguments are retrieved via a server <em>INQUIRE</em>.
1285 </p>
1287 <hr>
1288 <a name="LISTKEYS"></a>
1289 <div class="header">
1291 Next: <a href="#LOCK" accesskey="n" rel="next">LOCK</a>, Previous: <a href="#LIST" accesskey="p" rel="prev">LIST</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1292 </div>
1293 <a name="Listing-keys-in-the-key-ring_002e"></a>
1294 <h2 class="chapter">26 Listing keys in the key ring.</h2>
1295 <a name="index-LISTKEYS-command"></a>
1296 <p>Syntax:
1297 </p><div class="example">
1298 <pre class="example">LISTKEYS [--secret-only] [pattern[,&lt;pattern&gt;]]
1299 </pre></div>
1301 <p>Returns a new line separated list of key information matching a comma
1302 separated list of <var>pattern</var>&rsquo;s. When option <samp>--secret-only</samp> is
1303 specified, only keys matching <var>pattern</var> that also have a secret key
1304 available will be returned.
1305 </p>
1307 <hr>
1308 <a name="LOCK"></a>
1309 <div class="header">
1311 Next: <a href="#LS" accesskey="n" rel="next">LS</a>, Previous: <a href="#LISTKEYS" accesskey="p" rel="prev">LISTKEYS</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1312 </div>
1313 <a name="Locking-the-current-data-file_002e"></a>
1314 <h2 class="chapter">27 Locking the current data file.</h2>
1315 <a name="index-LOCK-command"></a>
1316 <p>Syntax:
1317 </p><div class="example">
1318 <pre class="example">LOCK
1319 </pre></div>
1321 <p>Locks the mutex associated with the opened file. This prevents other clients
1322 from sending commands to the same opened file until the client
1323 that sent this command either disconnects or sends the <code>UNLOCK</code>
1324 command. See <a href="#UNLOCK">UNLOCK</a>.
1325 </p>
1327 <hr>
1328 <a name="LS"></a>
1329 <div class="header">
1331 Next: <a href="#MOVE" accesskey="n" rel="next">MOVE</a>, Previous: <a href="#LOCK" accesskey="p" rel="prev">LOCK</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1332 </div>
1333 <a name="Showing-available-data-files_002e"></a>
1334 <h2 class="chapter">28 Showing available data files.</h2>
1335 <a name="index-LS-command"></a>
1336 <p>Syntax:
1337 </p><div class="example">
1338 <pre class="example">LS
1339 </pre></div>
1341 <p>Returns a newline separated list of data files stored in the data directory
1342 <samp>HOMEDIR/data</samp> (see <a href="#Invoking">Invoking</a>) with a data response.
1343 </p>
1345 <hr>
1346 <a name="MOVE"></a>
1347 <div class="header">
1349 Next: <a href="#NOP" accesskey="n" rel="next">NOP</a>, Previous: <a href="#LS" accesskey="p" rel="prev">LS</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1350 </div>
1351 <a name="Moving-an-element_002e"></a>
1352 <h2 class="chapter">29 Moving an element.</h2>
1353 <a name="index-MOVE-command"></a>
1354 <p>Syntax:
1355 </p><div class="example">
1356 <pre class="example">MOVE [--inquire] source[&lt;TAB&gt;child[..]] [dest[&lt;TAB&gt;child[..]]]
1357 </pre></div>
1359 <p>Moves the source element path to the destination element path. If the
1360 destination is not specified then it will be moved to the root node of the
1361 document. If the destination is specified and exists then it will be
1362 overwritten; otherwise non-existing elements of the destination element
1363 path will be created.
1364 <br><br>
1365 When the <samp>--inquire</samp> option is passed then all remaining non-option
1366 arguments are retrieved via a server <em>INQUIRE</em>.
1367 </p>
1369 <hr>
1370 <a name="NOP"></a>
1371 <div class="header">
1373 Next: <a href="#OPEN" accesskey="n" rel="next">OPEN</a>, Previous: <a href="#MOVE" accesskey="p" rel="prev">MOVE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1374 </div>
1375 <a name="Testing-the-connection_002e"></a>
1376 <h2 class="chapter">30 Testing the connection.</h2>
1377 <a name="index-NOP-command"></a>
1378 <p>Syntax:
1379 </p><div class="example">
1380 <pre class="example">NOP
1381 </pre></div>
1383 <p>This command does nothing. It is useful for testing the connection for a
1384 timeout condition.
1385 </p>
1387 <hr>
1388 <a name="OPEN"></a>
1389 <div class="header">
1391 Next: <a href="#OPTION" accesskey="n" rel="next">OPTION</a>, Previous: <a href="#NOP" accesskey="p" rel="prev">NOP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1392 </div>
1393 <a name="Opening-a-data-file_002e"></a>
1394 <h2 class="chapter">31 Opening a data file.</h2>
1395 <a name="index-OPEN-command"></a>
1396 <p>Syntax:
1397 </p><div class="example">
1398 <pre class="example">OPEN [--lock] &lt;filename&gt;
1399 </pre></div>
1401 <p>Opens <var>filename</var>. When the <var>filename</var> is not found on the
1402 file-system then a new in-memory document will be created. If the file is
1403 found, it is looked for in the file cache and when found no passphrase will
1404 be required to open it. When not cached, <cite>pinentry(1)</cite> will be used to
1405 retrieve the passphrase for decryption unless <samp>disable-pinentry</samp>
1406 (see <a href="#OPTION">OPTION</a>) was specified in which case <code>pwmd</code> will
1407 <em>INQUIRE</em> the client for the passphrase. Note than when configuration
1408 option <samp>strict_open</samp> is enabled and the client is not an
1409 <samp>invoking_user</samp>, an error will be returned when the data file does
1410 not exist.
1411 <br><br>
1412 When the <samp>--lock</samp> option is passed then the file mutex will be
1413 locked as if the <code>LOCK</code> command (see <a href="#LOCK">LOCK</a>) had been sent after the
1414 file had been opened.
1415 </p>
1417 <hr>
1418 <a name="OPTION"></a>
1419 <div class="header">
1421 Next: <a href="#PASSWD" accesskey="n" rel="next">PASSWD</a>, Previous: <a href="#OPEN" accesskey="p" rel="prev">OPEN</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1422 </div>
1423 <a name="Setting-various-client-parameters_002e"></a>
1424 <h2 class="chapter">32 Setting various client parameters.</h2>
1425 <a name="index-OPTION-command"></a>
1426 <p>Syntax:
1427 </p><div class="example">
1428 <pre class="example">OPTION &lt;NAME&gt;=[&lt;VALUE&gt;]
1429 </pre></div>
1431 <p>Sets a client option <var>name</var> to <var>value</var>. The value for an option is
1432 kept for the duration of the connection with the exception of the
1433 <code>pinentry</code> options which are defaults for all future connections
1434 (see <a href="#Pinentry">Pinentry</a>). When <var>value</var> is empty the option is unset.
1435 <br><br>
1436 </p><dl compact="compact">
1437 <dt>DISABLE-PINENTRY</dt>
1438 <dd><p>Disable use of <code>pinentry</code> for passphrase retrieval. When <code>1</code>, a
1439 server inquire is sent to the client to obtain the passphrase. This option
1440 may be set as needed before the <code>OPEN</code> (see <a href="#OPEN">OPEN</a>), <code>PASSWD</code>
1441 (see <a href="#PASSWD">PASSWD</a>) and <code>SAVE</code> (see <a href="#SAVE">SAVE</a>) commands. Set to <code>0</code>
1442 to use a <code>pinentry</code>.
1443 <br><br>
1444 </p></dd>
1445 <dt>DISPLAY</dt>
1446 <dd><p>Set or unset the X11 display to use when prompting for a passphrase.
1447 <br><br>
1448 </p></dd>
1449 <dt>TTYNAME</dt>
1450 <dd><p>Set the terminal device path to use when prompting for a passphrase.
1451 <br><br>
1452 </p></dd>
1453 <dt>TTYTYPE</dt>
1454 <dd><p>Set the terminal type for use with <samp>TTYNAME</samp>.
1455 <br><br>
1456 </p></dd>
1457 <dt>NAME</dt>
1458 <dd><p>Associates the thread ID of the connection with the specified textual
1459 representation. Useful for debugging log messages. May not contain whitespace.
1460 <br><br>
1461 </p></dd>
1462 <dt>LOCK-TIMEOUT</dt>
1463 <dd><p>When not <code>0</code>, the duration in tenths of a second to wait for the file
1464 mutex which has been locked by another thread to be released before returning
1465 an error. When <code>-1</code> the error will be returned immediately.
1466 <br><br>
1467 </p></dd>
1468 <dt>CLIENT-STATE</dt>
1469 <dd><p>When set to <code>1</code> then client state status messages for other clients are
1470 sent to the current client. The default is <code>0</code>.
1471 </p></dd>
1472 </dl>
1475 <hr>
1476 <a name="PASSWD"></a>
1477 <div class="header">
1479 Next: <a href="#REALPATH" accesskey="n" rel="next">REALPATH</a>, Previous: <a href="#OPTION" accesskey="p" rel="prev">OPTION</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1480 </div>
1481 <a name="Changing-the-passphrase-for-a-key_002e"></a>
1482 <h2 class="chapter">33 Changing the passphrase for a key.</h2>
1483 <a name="index-PASSWD-command"></a>
1484 <p>Syntax:
1485 </p><div class="example">
1486 <pre class="example">PASSWD
1487 </pre></div>
1489 <p>Changes the passphrase of the secret key required to open the current
1490 data file. If the data file is symmetrically encrypted, the error
1491 <code>GPG_ERR_NOT_SUPPORTED</code> is returned. When symmetrically encrypted,
1492 the <code>SAVE</code> command (see <a href="#SAVE">SAVE</a>) should be used instead to prevent
1493 this command saving any unwanted changes to the <abbr>XML</abbr> document.
1494 <br><br>
1495 This command is not available to non-invoking clients
1496 (see <a href="#Access-Control">Access Control</a>).
1497 </p>
1499 <hr>
1500 <a name="REALPATH"></a>
1501 <div class="header">
1503 Next: <a href="#RENAME" accesskey="n" rel="next">RENAME</a>, Previous: <a href="#PASSWD" accesskey="p" rel="prev">PASSWD</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1504 </div>
1505 <a name="Resolving-an-element_002e"></a>
1506 <h2 class="chapter">34 Resolving an element.</h2>
1507 <a name="index-REALPATH-command"></a>
1508 <p>Syntax:
1509 </p><div class="example">
1510 <pre class="example">REALPATH [--inquire] element[&lt;TAB&gt;child[..]]
1511 </pre></div>
1513 <p>Resolves all <code>target</code> attributes of the specified element path and
1514 returns the result with a data response. See <a href="#Target-Attribute">Target Attribute</a>, for details.
1515 <br><br>
1516 When the <samp>--inquire</samp> option is passed then all remaining non-option
1517 arguments are retrieved via a server <em>INQUIRE</em>.
1518 </p>
1520 <hr>
1521 <a name="RENAME"></a>
1522 <div class="header">
1524 Next: <a href="#RESET" accesskey="n" rel="next">RESET</a>, Previous: <a href="#REALPATH" accesskey="p" rel="prev">REALPATH</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1525 </div>
1526 <a name="Renaming-an-element_002e"></a>
1527 <h2 class="chapter">35 Renaming an element.</h2>
1528 <a name="index-RENAME-command"></a>
1529 <p>Syntax:
1530 </p><div class="example">
1531 <pre class="example">RENAME [--inquire] element[&lt;TAB&gt;child[..]] &lt;value&gt;
1532 </pre></div>
1534 <p>Renames the specified <var>element</var> to the new <var>value</var>. If an element of
1535 the same name as the <var>value</var> already exists it will be overwritten.
1536 <br><br>
1537 When the <samp>--inquire</samp> option is passed then all remaining non-option
1538 arguments are retrieved via a server <em>INQUIRE</em>.
1539 </p>
1541 <hr>
1542 <a name="RESET"></a>
1543 <div class="header">
1545 Next: <a href="#SAVE" accesskey="n" rel="next">SAVE</a>, Previous: <a href="#RENAME" accesskey="p" rel="prev">RENAME</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1546 </div>
1547 <a name="Resetting-the-client-state_002e"></a>
1548 <h2 class="chapter">36 Resetting the client state.</h2>
1549 <a name="index-RESET-command"></a>
1550 <p>Syntax:
1551 </p><div class="example">
1552 <pre class="example">RESET
1553 </pre></div>
1555 <p>Closes the currently opened file but keeps any previously set client options
1556 (see <a href="#OPTION">OPTION</a>).
1557 </p>
1559 <hr>
1560 <a name="SAVE"></a>
1561 <div class="header">
1563 Next: <a href="#STORE" accesskey="n" rel="next">STORE</a>, Previous: <a href="#RESET" accesskey="p" rel="prev">RESET</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1564 </div>
1565 <a name="Saving-document-changes-to-disk_002e"></a>
1566 <h2 class="chapter">37 Saving document changes to disk.</h2>
1567 <a name="index-SAVE-command"></a>
1568 <p>Syntax:
1569 </p><div class="example">
1570 <pre class="example">SAVE [--sign-keyid=[&lt;fpr&gt;]] [--symmetric | --keyid=&lt;fpr&gt;[,..] | --inquire-keyid]
1571 </pre></div>
1573 <p>Writes the in-memory <abbr>XML</abbr> document to disk. The file written to is the
1574 file that was opened when using the <code>OPEN</code> command (see <a href="#OPEN">OPEN</a>).
1575 <br><br>
1576 If the file is a new one, one of <samp>--symmetric</samp>, <samp>--keyid</samp> or
1577 <samp>--inquire-keyid</samp> is required. When not <samp>--symmetric</samp>, option
1578 <samp>--sign-keyid</samp> is also required, but optional otherwise.
1579 <br><br>
1580 You can encrypt the data file to a recipient other than the one that it
1581 was originally encrypted with by passing the <samp>--keyid</samp> or
1582 <samp>--inquire-keyid</samp> option with a comma separated list of
1583 public encryption key fingerprints as its argument. Use the
1584 <code>LISTKEYS</code> command (see <a href="#LISTKEYS">LISTKEYS</a>) to show key information by
1585 pattern. The <samp>--sign-keyid</samp> option may also be used to sign the data
1586 file with an alternate key by specifying the fingerprint of a signing key.
1587 Only one signing key is supported unlike the <samp>--keyid</samp> option.
1588 A passphrase to decrypt the data file
1589 will be required when one or more of the original encryption keys or signing
1590 key are not found in either of these two options&rsquo; arguments or when the data
1591 file is symmetrically encrypted reguardless of the <code>require_save_key</code>
1592 configuration parameter. The original encryption keys and signing key will be
1593 used when neither of these options are specified.
1594 <br><br>
1595 The <samp>--keyid</samp> and <samp>--sign-keyid</samp> options are not available
1596 to non-invoking clients
1597 (see <a href="#Access-Control">Access Control</a>) when the recipients or signer do not match those
1598 that were used when the file was <code>OPEN</code>&rsquo;ed.
1599 <br><br>
1600 The <samp>--symmetric</samp> option specifies that a new data file be
1601 conventionally encrypted. These types of data files do not use a recipient
1602 public key but may optionally be signed by using the <samp>--sign-keyid</samp>
1603 option. To remove the signing key from a symmtrically encrypted data file,
1604 leave the option value empty.
1605 <br><br>
1606 Note that you cannot change encryption schemes once a data file has been
1607 saved.
1608 </p>
1610 <hr>
1611 <a name="STORE"></a>
1612 <div class="header">
1614 Next: <a href="#UNLOCK" accesskey="n" rel="next">UNLOCK</a>, Previous: <a href="#SAVE" accesskey="p" rel="prev">SAVE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1615 </div>
1616 <a name="Modifying-the-content-of-an-element_002e"></a>
1617 <h2 class="chapter">38 Modifying the content of an element.</h2>
1618 <a name="index-STORE-command"></a>
1619 <p>Syntax:
1620 </p><div class="example">
1621 <pre class="example">STORE element[&lt;TAB&gt;child[..]]&lt;TAB&gt;[content]
1622 </pre></div>
1624 <p>This command uses a server <em>INQUIRE</em> to retrieve data from the client.
1625 <br><br>
1626 Creates a new element path or modifies the <var>content</var> of an existing
1627 element. If only a single element is specified then a new root element is
1628 created. Otherwise, elements are <tt class="key">TAB</tt> delimited and the content will be
1629 set to the final <tt class="key">TAB</tt> delimited element. If no <var>content</var> is
1630 specified after the final <tt class="key">TAB</tt>, then the content of the existing
1631 element will be removed; or will be empty if creating a new element.
1632 <br><br>
1633 The only restriction of an element name is that it not contain whitespace
1634 characters. There is no other whitespace between the <tt class="key">TAB</tt> delimited
1635 elements. It is recommended that the content of an element be base64 encoded
1636 when it contains control or <tt class="key">TAB</tt> characters to prevent <abbr>XML</abbr>
1637 parsing and <code>pwmd</code> syntax errors.
1638 </p>
1640 <hr>
1641 <a name="UNLOCK"></a>
1642 <div class="header">
1644 Next: <a href="#XPATH" accesskey="n" rel="next">XPATH</a>, Previous: <a href="#STORE" accesskey="p" rel="prev">STORE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1645 </div>
1646 <a name="Removing-a-data-file-lock_002e"></a>
1647 <h2 class="chapter">39 Removing a data file lock.</h2>
1648 <a name="index-UNLOCK-command"></a>
1649 <p>Syntax:
1650 </p><div class="example">
1651 <pre class="example">UNLOCK
1652 </pre></div>
1654 <p>Unlocks the file mutex which was locked with the <code>LOCK</code> command or
1655 a commands&rsquo; <samp>--lock</samp> option (see <a href="#LOCK">LOCK</a>, see <a href="#OPEN">OPEN</a>,
1656 see <a href="#ISCACHED">ISCACHED</a>).
1657 </p>
1659 <hr>
1660 <a name="XPATH"></a>
1661 <div class="header">
1663 Next: <a href="#XPATHATTR" accesskey="n" rel="next">XPATHATTR</a>, Previous: <a href="#UNLOCK" accesskey="p" rel="prev">UNLOCK</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1664 </div>
1665 <a name="Modifying-more-than-one-element_002e"></a>
1666 <h2 class="chapter">40 Modifying more than one element.</h2>
1667 <a name="index-XPATH-command"></a>
1668 <p>Syntax:
1669 </p><div class="example">
1670 <pre class="example">XPATH [--inquire] &lt;expression&gt;[&lt;TAB&gt;[value]]
1671 </pre></div>
1673 <p>Evaluates an XPath <var>expression</var>. If no <var>value</var> argument is
1674 specified it is assumed the expression is a request to return a result.
1675 Otherwise, the result is set to the <var>value</var> argument and the document is
1676 updated. If there is no <var>value</var> after the <tt class="key">TAB</tt> character, the value
1677 is assumed to be empty and the document is updated. For example:
1678 </p><br>
1679 <div class="example">
1680 <pre class="example">XPATH //element[@_name='password']<span class="key">TAB</span>
1681 </pre></div>
1682 <br>
1683 <p>would clear the content of all <var>password</var> elements in the data file
1684 while leaving off the trailing <tt class="key">TAB</tt> would return all <var>password</var>
1685 elements in <abbr>XML</abbr> format.
1686 <br><br>
1687 When the <samp>--inquire</samp> option is passed then all remaining non-option
1688 arguments are retrieved via a server <em>INQUIRE</em>.
1689 <br><br>
1690 See <a href="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a> for <abbr>XPATH</abbr>
1691 expression syntax.
1692 </p>
1694 <hr>
1695 <a name="XPATHATTR"></a>
1696 <div class="header">
1698 Previous: <a href="#XPATH" accesskey="p" rel="prev">XPATH</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1699 </div>
1700 <a name="Modifying-more-than-one-element_0027s-attributes_002e"></a>
1701 <h2 class="chapter">41 Modifying more than one element&rsquo;s attributes.</h2>
1702 <a name="index-XPATHATTR-command"></a>
1703 <p>Syntax:
1704 </p><div class="example">
1705 <pre class="example">XPATHATTR [--inquire] SET|DELETE &lt;name&gt; &lt;expression&gt;[&lt;TAB&gt;[&lt;value&gt;]]
1706 </pre></div>
1708 <p>Like the <code>XPATH</code> command (see <a href="#XPATH">XPATH</a>) but operates on element
1709 attributes and does not return a result. For the <var>SET</var> operation the
1710 <var>value</var> is optional but the field is required. If not specified then
1711 the attribute value will be empty. For example:
1712 </p><br>
1713 <div class="example">
1714 <pre class="example">XPATHATTR SET password //element[@_name='password']<span class="key">TAB</span>
1715 </pre></div>
1716 <br>
1717 <p>would create a <var>password</var> attribute for each <var>password</var> element
1718 found in the document. The attribute value will be empty but still exist.
1719 <br><br>
1720 When the <samp>--inquire</samp> option is passed then all remaining non-option
1721 arguments are retrieved via a server <em>INQUIRE</em>.
1722 <br><br>
1723 See <a href="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a> for <abbr>XPATH</abbr>
1724 expression syntax.
1725 </p>
1728 <hr>
1729 <a name="Status-Messages"></a>
1730 <div class="header">
1732 Next: <a href="#Target-Attribute" accesskey="n" rel="next">Target Attribute</a>, Previous: <a href="#Commands" accesskey="p" rel="prev">Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1733 </div>
1734 <a name="Status-messages-and-their-meanings"></a>
1735 <h2 class="chapter">42 Status messages and their meanings</h2>
1736 <p>Some commands send status messages to inform the client about certain
1737 operations or as a progress indicator. Status messages begin with a
1738 <code>KEYWORD</code> followed by a status description for status messages that
1739 require it. What status messages are sent, when, and how often may depend on
1740 configuration settings (see <a href="#Configuration">Configuration</a>).
1741 </p>
1742 <table>
1743 <thead><tr><th width="20%">Message</th><th width="25%">Parameters</th><th width="55%">Description</th></tr></thead>
1744 <tr><td width="20%">CACHE
1745 <a name="index-CACHE"></a></td><td width="25%"><code>&lt;integer&gt;</code></td><td width="55%">The number of cached documents. Sent to each client after connecting
1746 (see <a href="#GETINFO">GETINFO</a>) and after every cache modification.</td></tr>
1747 <tr><td width="20%">CLIENTS
1748 <a name="index-CLIENTS"></a></td><td width="25%"><code>&lt;integer&gt;</code></td><td width="55%">The number of connected clients (see <a href="#GETINFO">GETINFO</a>). Sent to each client
1749 when another client either connects or disconnects.</td></tr>
1750 <tr><td width="20%">DECRYPT
1751 <a name="index-DECRYPT"></a></td><td width="25%"></td><td width="55%">Sent to the current client during a decrypt operation. How often this
1752 status message is sent is determined by the <code>keepalive_interval</code>
1753 (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1754 <tr><td width="20%">ENCRYPT
1755 <a name="index-ENCRYPT"></a></td><td width="25%"></td><td width="55%">Sent to the current client during an encrypt operation. How often this
1756 status message is sent is determined by the <code>keepalive_interval</code>
1757 (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1758 <tr><td width="20%">GENKEY
1759 <a name="index-GENKEY"></a></td><td width="25%"><code>[&lt;sigkey_fpr&gt; &lt;pubkey_fpr&gt;]</code></td><td width="55%">Sent to the current client during key generation. How often this
1760 status message is sent is determined by the <code>keepalive_interval</code>
1761 (see <a href="#Configuration">Configuration</a>) setting. The <var>sigkey_fpr</var> and <var>pubkey_fpr</var>
1762 parameters are added when key generation has completed.</td></tr>
1763 <tr><td width="20%">INQUIRE_MAXLEN
1764 <a name="index-INQUIRE_005fMAXLEN"></a></td><td width="25%"><code>&lt;bytes&gt;</code></td><td width="55%">Sent to the client from <code>gpg-agent</code> when inquiring data. This
1765 specifies the maximum number of bytes allowed for the client to send and
1766 should not be exceeded.</td></tr>
1767 <tr><td width="20%">KEEPALIVE
1768 <a name="index-KEEPALIVE"></a></td><td width="25%"></td><td width="55%">Sent to each idle client every <var>keepalive_interval</var>
1769 (see <a href="#Configuration">Configuration</a>) seconds.</td></tr>
1770 <tr><td width="20%">LOCKED
1771 <a name="index-LOCKED"></a></td><td width="25%"></td><td width="55%">Sent to the current client when another client is holding the lock for
1772 the mutex associated with a file. How often this status message is sent is
1773 determined by the <code>keepalive_interval</code> (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1774 <tr><td width="20%">NEWFILE
1775 <a name="index-NEWFILE"></a></td><td width="25%"></td><td width="55%">Sent to the current client when the opened (see <a href="#OPEN">OPEN</a>) file does not
1776 exist on the file-system.</td></tr>
1777 <tr><td width="20%">XFER
1778 <a name="index-XFER"></a></td><td width="25%"><code>&lt;sent&gt; &lt;total&gt;</code></td><td width="55%">Sent to the current client when transferring data. It has two space
1779 delimited arguments. The first being the current amount of bytes transferred
1780 and the other being the total bytes to be transferred.</td></tr>
1781 <tr><td width="20%">STATE
1782 <a name="index-STATE"></a></td><td width="25%"><code>&lt;client_id&gt; &lt;state&gt;</code></td><td width="55%">Sent to each client to indicate that <var>client_id</var> has changed to
1783 <var>state</var> (see <a href="#GETINFO">GETINFO</a> for client states). For a client to receive
1784 another clients state the option <var>CLIENT-STATE</var> must be set.
1785 See <a href="#OPTION">OPTION</a> command.</td></tr>
1786 <tr><td width="20%">EXPIRE
1787 <a name="index-EXPIRE"></a></td><td width="25%"><code>&lt;epoch_seconds&gt; &lt;epoch_future&gt;|0</code></td><td width="55%">Sent to the current client when <code>GET</code> (see <a href="#GET">GET</a>) encounters an
1788 <code>expire</code> (see <a href="#Other-Attributes">Other Attributes</a>) attribute that is in the past or when
1789 <code>STORE</code> (see <a href="#STORE">STORE</a>) updates the <code>expire</code> attribute from the
1790 <code>expire_increment</code> attribute value. The second field will be <code>0</code>
1791 when <code>GET</code> sends this status message. Otherwise the second field is the
1792 time the next expiry will be.</td></tr>
1793 <tr><td width="20%">PASSPHRASE_HINT
1794 <a name="index-PASSPHRASE_005fHINT"></a></td><td width="25%">&lt;keyid&gt; &lt;userid&gt;</td><td width="55%">Forwarded from <code>GpgME</code>. Contains information that is useful in a
1795 <code>pinentry</code>. Only sent when pinentry is disabled (see <a href="#OPTION">OPTION</a>).</td></tr>
1796 <tr><td width="20%">PASSPHRASE_INFO
1797 <a name="index-PASSPHRASE_005fINFO"></a></td><td width="25%">&lt;flags&gt; ...</td><td width="55%">Forwarded from <code>GpgME</code>. Contains information that is useful in a
1798 <code>pinentry</code>. Only sent when pinentry is disabled (see <a href="#OPTION">OPTION</a>).</td></tr>
1799 <tr><td width="20%">REHANDSHAKE
1800 <a name="index-REHANDSHAKE"></a></td><td width="25%"></td><td width="55%">Sent to each TLS client just before performing a cipher renegotiation
1801 after a SIGHUP signal was received.</td></tr>
1802 </table>
1804 <hr>
1805 <a name="Target-Attribute"></a>
1806 <div class="header">
1808 Next: <a href="#Other-Attributes" accesskey="n" rel="next">Other Attributes</a>, Previous: <a href="#Status-Messages" accesskey="p" rel="prev">Status Messages</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1809 </div>
1810 <a name="The-target-attribute"></a>
1811 <h2 class="chapter">43 The <code>target</code> attribute</h2>
1812 <a name="index-target-attribute"></a>
1813 <p>A <em>case sensitive</em> attribute named <code>target</code> is treated specially
1814 when found in each element of an element path. This attribute, like other
1815 element attributes, is created or modified with the <code>ATTR</code> command
1816 (see <a href="#ATTR">ATTR</a>). The value of this attribute is an existing element path
1817 somewhere in the document. If you are familiar with XML entities or
1818 maybe the HTML <code>id</code> or <code>target</code> attributes or a symbolic link
1819 in a file-system, you may find this attribute behaves similar to any of those.
1820 </p>
1821 <p>To create a <code>target</code> attribute use the following syntax:
1822 </p>
1823 <div class="example">
1824 <pre class="example">ATTR SET target element[<code>TAB</code>child[..]] element[<code>TAB</code>child[..]]
1825 </pre></div>
1827 <p>Note the single space between the two element paths. The first element path is
1828 where the <code>target</code> attribute will be created. If the element path does
1829 not exist then it will be created. This is the only time the <code>ATTR</code>
1830 (see <a href="#ATTR">ATTR</a>) command will create elements. The attribute is created in the
1831 final element of the element path.
1832 </p>
1833 <p>The second element path is the destination of where you want the first element
1834 path to resolve to. When an element path is passed as an argument to a
1835 protocol command <code>pwmd</code> looks for a <code>target</code> attribute when
1836 resolving each element and, if found, &quot;jumps&quot; to the attribute value and
1837 continues resolving any remaining elements a commands element path.
1838 </p>
1839 <p>When an element of a element path is removed that a <code>target</code> attribute
1840 resolves to then an error will occur when trying to access that element. You
1841 may need to either update the <code>target</code> attribute value with a new element
1842 path or remove the attribute entirely.
1843 </p>
1844 <p>Clients should be careful of creating <code>target</code> loops, or targets that
1845 resolve to themselves. See the <var>recursion_depth</var> (see <a href="#Configuration">Configuration</a>)
1846 configuration parameter for details.
1847 </p>
1848 <p>The <code>REALPATH</code> command (see <a href="#REALPATH">REALPATH</a>) can be used to show the element
1849 path after resolving all <code>target</code> attributes.
1850 </p>
1851 <p><em>Note that when setting this attribute any children of the element will
1852 be removed.</em>
1853 </p>
1855 <hr>
1856 <a name="Other-Attributes"></a>
1857 <div class="header">
1859 Next: <a href="#Key-Expiration" accesskey="n" rel="next">Key Expiration</a>, Previous: <a href="#Target-Attribute" accesskey="p" rel="prev">Target Attribute</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1860 </div>
1861 <a name="Other-special-attributes"></a>
1862 <h2 class="chapter">44 Other special attributes</h2>
1863 <a name="index-special-attributes"></a>
1864 <p>In addition to the <code>target</code> attribute (see <a href="#Target-Attribute">Target Attribute</a>), there
1865 are a few other attributes that are specially handled by <code>pwmd</code>. The
1866 first is the <code>_ctime</code> attribute which is set to the current time when an
1867 element is created. Next is the <code>_mtime</code> attribute which is created when
1868 an element is created and also updated when an element is modified. Both of
1869 these attributes may be removed but the <code>_mtime</code> attribute is
1870 automatically added again since removing an attribute is considered modifying
1871 an element. The <code>_acl</code> attribute controls access to the element, beit
1872 modifying or accessing element content, or descending into child elements.
1873 See <a href="#Access-Control">Access Control</a> for details. The <code>_name</code> attribute contains the
1874 name of an element.
1875 </p>
1876 <p>The above mentioned attributes are considered reserved attribute names.
1877 Reserved attributes are treated specially when a <code>target</code> attribute is
1878 found for the current element. The <code>ATTR LIST</code> command will show these
1879 attribute values for the current element and not the attribute values for the
1880 resolved <code>target</code> element. All other non-reserved attributes for the
1881 resolved <code>target</code> are appended to the <code>ATTR LIST</code> command output.
1882 Other <code>ATTR</code> commands (see <a href="#ATTR">ATTR</a>) behave as usual. You can, for example, <code>ATTR
1883 DELETE</code> a non-reserved attribute for an element that contains a <code>target</code>
1884 attribute. The resolved target elements&rsquo; attribute will be removed rather than
1885 the element containing the <code>target</code> attribute.
1886 </p>
1887 <p>Another specially handled attribute is the <code>expire</code> attribute. This
1888 attribute value, like the <code>_ctime</code> and <code>_mtime</code> attributes, is a
1889 timestamp. But this timestamp is usually in the future and for use with the
1890 <code>GET</code> (see <a href="#GET">GET</a>) and <code>STORE</code> (see <a href="#STORE">STORE</a>) commands. When the
1891 <code>GET</code> command is issued, it checks for an <code>expire</code> attribute an
1892 compares its&rsquo; value with the current time. If the <code>expire</code> timestamp is in
1893 the past then a status message is sent (see <a href="#Status-Messages">Status Messages</a>) to inform the
1894 client that the element content should be updated. When the content for an
1895 element containing an <code>expire</code> attribute is set when using the
1896 <code>STORE</code> command, the value of the <code>expire_increment</code> attribute is
1897 added to the current time and the <code>expire</code> attribute value is updated.
1898 When no <code>expire_increment</code> attribute is found, no modification is done of
1899 the <code>expire</code> attribute.
1900 </p>
1902 <hr>
1903 <a name="Key-Expiration"></a>
1904 <div class="header">
1906 Next: <a href="#Signals" accesskey="n" rel="next">Signals</a>, Previous: <a href="#Other-Attributes" accesskey="p" rel="prev">Other Attributes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1907 </div>
1908 <a name="Key-Expiration-1"></a>
1909 <h2 class="chapter">45 Key Expiration</h2>
1910 <a name="index-key-expiration"></a>
1911 <p>When a key used for signing a data file has expired there is no indication
1912 until the next <code>SAVE</code> command is sent. The command will fail since one
1913 cannot sign the data file with an expired key. The client will need to either
1914 use a different key for signing by either specifying an existing non-expired
1915 key, generate a new key, or change the expire time of the existing key with
1916 <code>gpg</code>.
1917 </p>
1918 <p>To change the expiration of the currently used signing key with <code>gpg</code>,
1919 use the <code>KEYINFO</code> command (see <a href="#KEYINFO">KEYINFO</a>) to obtain the fingerprint of
1920 the signing key of the current data file, then change the expire time with
1921 <code>gpg</code>:
1922 </p>
1923 <div class="example">
1924 <pre class="example">gpg --homedir ~/.pwmd/.gnupg --edit-key &lt;fingerprint&gt;
1925 </pre></div>
1927 <p>Then use the <code>expire</code> command to set the new key expire date. When
1928 finished, use the <code>save</code> command to save your changes.
1929 </p>
1931 <hr>
1932 <a name="Signals"></a>
1933 <div class="header">
1935 Next: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previous: <a href="#Key-Expiration" accesskey="p" rel="prev">Key Expiration</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1936 </div>
1937 <a name="Recognized-signals"></a>
1938 <h2 class="chapter">46 Recognized signals</h2>
1940 <p>Sending the <em>SIGHUP</em> signal to a <code>pwmd</code> process will reload the
1941 configuration file and sending <em>SIGUSR1</em> will clear the entire file
1942 cache.
1943 </p>
1946 <hr>
1947 <a name="Concept-Index"></a>
1948 <div class="header">
1950 Previous: <a href="#Signals" accesskey="p" rel="prev">Signals</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1951 </div>
1952 <a name="Concept-Index-1"></a>
1953 <h2 class="unnumbered">Concept Index</h2>
1956 <a name="SEC_Overview"></a>
1957 <h2 class="shortcontents-heading">Short Table of Contents</h2>
1959 <div class="shortcontents">
1960 <ul class="no-bullet">
1961 <li><a name="stoc-Overview-of-pwmd" href="#toc-Overview-of-pwmd">1 Overview of <code>pwmd</code></a></li>
1962 <li><a name="stoc-Access-Control-1" href="#toc-Access-Control-1">2 Access Control</a></li>
1963 <li><a name="stoc-Cache-Control-1" href="#toc-Cache-Control-1">3 Cache Control</a></li>
1964 <li><a name="stoc-Invoking-pwmd" href="#toc-Invoking-pwmd">4 Invoking <code>pwmd</code></a></li>
1965 <li><a name="stoc-pwmd-configuration-file-options" href="#toc-pwmd-configuration-file-options">5 <code>pwmd</code> configuration file options</a></li>
1966 <li><a name="stoc-Configuring-remote-connections-over-TLS_002e" href="#toc-Configuring-remote-connections-over-TLS_002e">6 Configuring remote connections over TLS.</a></li>
1967 <li><a name="stoc-Pinentry-configuration" href="#toc-Pinentry-configuration">7 Pinentry configuration</a></li>
1968 <li><a name="stoc-Protocol-commands-and-their-syntax" href="#toc-Protocol-commands-and-their-syntax">8 Protocol commands and their syntax</a></li>
1969 <li><a name="stoc-Modifying-element-attributes_002e" href="#toc-Modifying-element-attributes_002e">9 Modifying element attributes.</a></li>
1970 <li><a name="stoc-Setting-the-cache-timeout_002e" href="#toc-Setting-the-cache-timeout_002e">10 Setting the cache timeout.</a></li>
1971 <li><a name="stoc-Removing-a-cache-entry_002e" href="#toc-Removing-a-cache-entry_002e">11 Removing a cache entry.</a></li>
1972 <li><a name="stoc-Copying-an-element_002e" href="#toc-Copying-an-element_002e">12 Copying an element.</a></li>
1973 <li><a name="stoc-Deleting-an-element_002e" href="#toc-Deleting-an-element_002e">13 Deleting an element.</a></li>
1974 <li><a name="stoc-Deleting-a-key-from-the-key-ring_002e" href="#toc-Deleting-a-key-from-the-key-ring_002e">14 Deleting a key from the key ring.</a></li>
1975 <li><a name="stoc-Showing-the-XML-document_002e" href="#toc-Showing-the-XML-document_002e">15 Showing the XML document.</a></li>
1976 <li><a name="stoc-Generating-a-new-key_002e" href="#toc-Generating-a-new-key_002e">16 Generating a new key.</a></li>
1977 <li><a name="stoc-Getting-the-content-of-an-element_002e" href="#toc-Getting-the-content-of-an-element_002e">17 Getting the content of an element.</a></li>
1978 <li><a name="stoc-Obtaining-a-configuration-value_002e" href="#toc-Obtaining-a-configuration-value_002e">18 Obtaining a configuration value.</a></li>
1979 <li><a name="stoc-Obtaining-server-and-client-information_002e" href="#toc-Obtaining-server-and-client-information_002e">19 Obtaining server and client information.</a></li>
1980 <li><a name="stoc-Showing-available-commands_002e" href="#toc-Showing-available-commands_002e">20 Showing available commands.</a></li>
1981 <li><a name="stoc-Creating-elements-from-XML_002e" href="#toc-Creating-elements-from-XML_002e">21 Creating elements from XML.</a></li>
1982 <li><a name="stoc-Testing-cache-status_002e" href="#toc-Testing-cache-status_002e">22 Testing cache status.</a></li>
1983 <li><a name="stoc-Showing-keys-used-for-the-current-data-file_002e" href="#toc-Showing-keys-used-for-the-current-data-file_002e">23 Showing keys used for the current data file.</a></li>
1984 <li><a name="stoc-Terminating-another-client_002e" href="#toc-Terminating-another-client_002e">24 Terminating another client.</a></li>
1985 <li><a name="stoc-Showing-document-elements_002e" href="#toc-Showing-document-elements_002e">25 Showing document elements.</a></li>
1986 <li><a name="stoc-Listing-keys-in-the-key-ring_002e" href="#toc-Listing-keys-in-the-key-ring_002e">26 Listing keys in the key ring.</a></li>
1987 <li><a name="stoc-Locking-the-current-data-file_002e" href="#toc-Locking-the-current-data-file_002e">27 Locking the current data file.</a></li>
1988 <li><a name="stoc-Showing-available-data-files_002e" href="#toc-Showing-available-data-files_002e">28 Showing available data files.</a></li>
1989 <li><a name="stoc-Moving-an-element_002e" href="#toc-Moving-an-element_002e">29 Moving an element.</a></li>
1990 <li><a name="stoc-Testing-the-connection_002e" href="#toc-Testing-the-connection_002e">30 Testing the connection.</a></li>
1991 <li><a name="stoc-Opening-a-data-file_002e" href="#toc-Opening-a-data-file_002e">31 Opening a data file.</a></li>
1992 <li><a name="stoc-Setting-various-client-parameters_002e" href="#toc-Setting-various-client-parameters_002e">32 Setting various client parameters.</a></li>
1993 <li><a name="stoc-Changing-the-passphrase-for-a-key_002e" href="#toc-Changing-the-passphrase-for-a-key_002e">33 Changing the passphrase for a key.</a></li>
1994 <li><a name="stoc-Resolving-an-element_002e" href="#toc-Resolving-an-element_002e">34 Resolving an element.</a></li>
1995 <li><a name="stoc-Renaming-an-element_002e" href="#toc-Renaming-an-element_002e">35 Renaming an element.</a></li>
1996 <li><a name="stoc-Resetting-the-client-state_002e" href="#toc-Resetting-the-client-state_002e">36 Resetting the client state.</a></li>
1997 <li><a name="stoc-Saving-document-changes-to-disk_002e" href="#toc-Saving-document-changes-to-disk_002e">37 Saving document changes to disk.</a></li>
1998 <li><a name="stoc-Modifying-the-content-of-an-element_002e" href="#toc-Modifying-the-content-of-an-element_002e">38 Modifying the content of an element.</a></li>
1999 <li><a name="stoc-Removing-a-data-file-lock_002e" href="#toc-Removing-a-data-file-lock_002e">39 Removing a data file lock.</a></li>
2000 <li><a name="stoc-Modifying-more-than-one-element_002e" href="#toc-Modifying-more-than-one-element_002e">40 Modifying more than one element.</a></li>
2001 <li><a name="stoc-Modifying-more-than-one-element_0027s-attributes_002e" href="#toc-Modifying-more-than-one-element_0027s-attributes_002e">41 Modifying more than one element&rsquo;s attributes.</a></li>
2002 <li><a name="stoc-Status-messages-and-their-meanings" href="#toc-Status-messages-and-their-meanings">42 Status messages and their meanings</a></li>
2003 <li><a name="stoc-The-target-attribute" href="#toc-The-target-attribute">43 The <code>target</code> attribute</a></li>
2004 <li><a name="stoc-Other-special-attributes" href="#toc-Other-special-attributes">44 Other special attributes</a></li>
2005 <li><a name="stoc-Key-Expiration-1" href="#toc-Key-Expiration-1">45 Key Expiration</a></li>
2006 <li><a name="stoc-Recognized-signals" href="#toc-Recognized-signals">46 Recognized signals</a></li>
2007 <li><a name="stoc-Concept-Index-1" href="#toc-Concept-Index-1">Concept Index</a></li>
2009 </ul>
2010 </div>
2012 <a name="SEC_Contents"></a>
2013 <h2 class="contents-heading">Table of Contents</h2>
2015 <div class="contents">
2016 <ul class="no-bullet">
2017 <li><a name="toc-Overview-of-pwmd" href="#Introduction">1 Overview of <code>pwmd</code></a></li>
2018 <li><a name="toc-Access-Control-1" href="#Access-Control">2 Access Control</a></li>
2019 <li><a name="toc-Cache-Control-1" href="#Cache-Control">3 Cache Control</a></li>
2020 <li><a name="toc-Invoking-pwmd" href="#Invoking">4 Invoking <code>pwmd</code></a></li>
2021 <li><a name="toc-pwmd-configuration-file-options" href="#Configuration">5 <code>pwmd</code> configuration file options</a></li>
2022 <li><a name="toc-Configuring-remote-connections-over-TLS_002e" href="#TLS">6 Configuring remote connections over TLS.</a></li>
2023 <li><a name="toc-Pinentry-configuration" href="#Pinentry">7 Pinentry configuration</a></li>
2024 <li><a name="toc-Protocol-commands-and-their-syntax" href="#Commands">8 Protocol commands and their syntax</a></li>
2025 <li><a name="toc-Modifying-element-attributes_002e" href="#ATTR">9 Modifying element attributes.</a></li>
2026 <li><a name="toc-Setting-the-cache-timeout_002e" href="#CACHETIMEOUT">10 Setting the cache timeout.</a></li>
2027 <li><a name="toc-Removing-a-cache-entry_002e" href="#CLEARCACHE">11 Removing a cache entry.</a></li>
2028 <li><a name="toc-Copying-an-element_002e" href="#COPY">12 Copying an element.</a></li>
2029 <li><a name="toc-Deleting-an-element_002e" href="#DELETE">13 Deleting an element.</a></li>
2030 <li><a name="toc-Deleting-a-key-from-the-key-ring_002e" href="#DELETEKEY">14 Deleting a key from the key ring.</a></li>
2031 <li><a name="toc-Showing-the-XML-document_002e" href="#DUMP">15 Showing the XML document.</a></li>
2032 <li><a name="toc-Generating-a-new-key_002e" href="#GENKEY">16 Generating a new key.</a></li>
2033 <li><a name="toc-Getting-the-content-of-an-element_002e" href="#GET">17 Getting the content of an element.</a></li>
2034 <li><a name="toc-Obtaining-a-configuration-value_002e" href="#GETCONFIG">18 Obtaining a configuration value.</a></li>
2035 <li><a name="toc-Obtaining-server-and-client-information_002e" href="#GETINFO">19 Obtaining server and client information.</a></li>
2036 <li><a name="toc-Showing-available-commands_002e" href="#HELP">20 Showing available commands.</a></li>
2037 <li><a name="toc-Creating-elements-from-XML_002e" href="#IMPORT">21 Creating elements from XML.</a></li>
2038 <li><a name="toc-Testing-cache-status_002e" href="#ISCACHED">22 Testing cache status.</a></li>
2039 <li><a name="toc-Showing-keys-used-for-the-current-data-file_002e" href="#KEYINFO">23 Showing keys used for the current data file.</a></li>
2040 <li><a name="toc-Terminating-another-client_002e" href="#KILL">24 Terminating another client.</a></li>
2041 <li><a name="toc-Showing-document-elements_002e" href="#LIST">25 Showing document elements.</a></li>
2042 <li><a name="toc-Listing-keys-in-the-key-ring_002e" href="#LISTKEYS">26 Listing keys in the key ring.</a></li>
2043 <li><a name="toc-Locking-the-current-data-file_002e" href="#LOCK">27 Locking the current data file.</a></li>
2044 <li><a name="toc-Showing-available-data-files_002e" href="#LS">28 Showing available data files.</a></li>
2045 <li><a name="toc-Moving-an-element_002e" href="#MOVE">29 Moving an element.</a></li>
2046 <li><a name="toc-Testing-the-connection_002e" href="#NOP">30 Testing the connection.</a></li>
2047 <li><a name="toc-Opening-a-data-file_002e" href="#OPEN">31 Opening a data file.</a></li>
2048 <li><a name="toc-Setting-various-client-parameters_002e" href="#OPTION">32 Setting various client parameters.</a></li>
2049 <li><a name="toc-Changing-the-passphrase-for-a-key_002e" href="#PASSWD">33 Changing the passphrase for a key.</a></li>
2050 <li><a name="toc-Resolving-an-element_002e" href="#REALPATH">34 Resolving an element.</a></li>
2051 <li><a name="toc-Renaming-an-element_002e" href="#RENAME">35 Renaming an element.</a></li>
2052 <li><a name="toc-Resetting-the-client-state_002e" href="#RESET">36 Resetting the client state.</a></li>
2053 <li><a name="toc-Saving-document-changes-to-disk_002e" href="#SAVE">37 Saving document changes to disk.</a></li>
2054 <li><a name="toc-Modifying-the-content-of-an-element_002e" href="#STORE">38 Modifying the content of an element.</a></li>
2055 <li><a name="toc-Removing-a-data-file-lock_002e" href="#UNLOCK">39 Removing a data file lock.</a></li>
2056 <li><a name="toc-Modifying-more-than-one-element_002e" href="#XPATH">40 Modifying more than one element.</a></li>
2057 <li><a name="toc-Modifying-more-than-one-element_0027s-attributes_002e" href="#XPATHATTR">41 Modifying more than one element&rsquo;s attributes.</a></li>
2058 <li><a name="toc-Status-messages-and-their-meanings" href="#Status-Messages">42 Status messages and their meanings</a></li>
2059 <li><a name="toc-The-target-attribute" href="#Target-Attribute">43 The <code>target</code> attribute</a></li>
2060 <li><a name="toc-Other-special-attributes" href="#Other-Attributes">44 Other special attributes</a></li>
2061 <li><a name="toc-Key-Expiration-1" href="#Key-Expiration">45 Key Expiration</a></li>
2062 <li><a name="toc-Recognized-signals" href="#Signals">46 Recognized signals</a></li>
2063 <li><a name="toc-Concept-Index-1" href="#Concept-Index">Concept Index</a></li>
2065 </ul>
2066 </div>
2068 <hr>
2072 </body>
2073 </html>