GENKEY: Add --no-expire.
[pwmd.git] / doc / pwmd.html
blobac5f4c9cf92c2b9ff0d2ac12237306de01bbd226
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.4.90, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <title>PWMD Manual</title>
7 <meta name="description" content="PWMD Manual">
8 <meta name="keywords" content="PWMD Manual">
9 <meta name="resource-type" content="document">
10 <meta name="distribution" content="global">
11 <meta name="Generator" content="makeinfo">
12 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
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>Kill <code>scdaemon</code> after each <code>OPEN</code> (see <a href="#OPEN">OPEN</a>),
558 <code>SAVE</code> (see <a href="#SAVE">SAVE</a>) or <code>PASSWD</code> (see <a href="#PASSWD">PASSWD</a>) command. The
559 default is <code>false</code>.
560 </p>
561 </dd>
562 <dt>&lsquo;<samp>disable_list_and_dump = boolean</samp>&rsquo;</dt>
563 <dd><p>When <code>true</code>, the <code>XPATH</code>, <code>XPATHATTR</code>, <code>LIST</code> and
564 <code>DUMP</code> protocol commands (see <a href="#Commands">Commands</a>) will be disabled.
565 </p>
566 </dd>
567 <dt>&lsquo;<samp>cache_push = file1,file2</samp>&rsquo;</dt>
568 <dd><p>A comma separated list of filenames that will be pushed into the file cache
569 upon startup. <code>pwmd</code> will prompt for the passphrase for each file
570 unless specified with <var>passphrase_file</var> parameter in a matching file
571 section.
572 </p>
573 </dd>
574 <dt>&lsquo;<samp>priority = integer</samp>&rsquo;</dt>
575 <dd><p>The priority, or niceness, of the server. The default is inherited from the
576 parent process.
577 </p>
578 </dd>
579 <dt>&lsquo;<samp>lock_timeout = integer</samp>&rsquo;</dt>
580 <dd><p>The default timeout in tenths of a second before giving up waiting for a file
581 lock and returning an error. The default is <code>50</code>.
582 </p>
583 </dd>
584 </dl>
586 <a name="index-Data-file-configuration-options"></a>
587 <p>The following options are defaults for new files when specified in the
588 &lsquo;<samp>global</samp>&rsquo; section. When placed in a data file section they are options
589 specific to that data file only.
590 </p>
591 <dl compact="compact">
592 <dt>&lsquo;<samp>require_save_key = boolean</samp>&rsquo;</dt>
593 <dd><p>Require the passphrase needed for signing before writing changes of the
594 document to disk reguardless of the key cache status. The default is
595 <code>true</code>. This option compliments <code>gpg-agent</code> option
596 <samp>--ignore-cache-for-signing</samp> and is used as a fail-safe.
597 </p>
598 </dd>
599 <dt>&lsquo;<samp>backup = boolean</samp>&rsquo;</dt>
600 <dd><p>Whether to create a backup of the data file when saving. The backup filename
601 has the <samp>.backup</samp> extension appended to the opened file. The default is
602 <code>true</code>.
603 </p>
604 </dd>
605 <dt>&lsquo;<samp>cache_timeout = seconds</samp>&rsquo;</dt>
606 <dd><p>The number of seconds to keep the cache entry for this file. If <code>-1</code>, the
607 cache entry is kept forever. If <code>0</code>, each time an encrypted file is
608 <code>OPEN</code>ed (see <a href="#OPEN">OPEN</a>) a passphrase will be required. The default
609 is <code>600</code> or 10 minutes.
610 </p>
611 </dd>
612 <dt>&lsquo;<samp>xfer_progress = bytes</samp>&rsquo;</dt>
613 <dd><p>Commands that send data lines to the client will also send the <code>XFER</code>
614 status message (see <a href="#Status-Messages">Status Messages</a>) after the specified number of bytes
615 have been sent. The number of bytes is rounded to <var>ASSUAN_LINELENGTH</var> or
616 <code>1002</code> bytes. The default is <code>8196</code>.
617 </p>
618 </dd>
619 <dt>&lsquo;<samp>passphrase_file = /path/to/filename</samp>&rsquo;</dt>
620 <dd><p>Obtain the passphrase to open the data file from <var>filename</var>. If specified
621 in the &lsquo;<samp>global</samp>&rsquo; section then the <var>passphrase_file</var> is a default for
622 all data files. Note that if a client changes the passphrase for this data
623 file then the <var>passphrase_file</var> will need to be updated with the new
624 passphrase.
625 </p>
626 </dd>
627 <dt>&lsquo;<samp>recursion_depth = integer</samp>&rsquo;</dt>
628 <dd><p>The maximum number of times to resolve a <code>target</code> attribute for an
629 element in an element path (see <a href="#Target-Attribute">Target Attribute</a>). An error is returned
630 when this value is exceeded. The default is <code>100</code> but can be disabled by
631 setting to <code>0</code> (<em>not recommended</em>).
632 </p>
633 </dd>
634 <dt>&lsquo;<samp>allowed = [-]user,[-]@group,[!]#TLSFINGERPRINT,...</samp>&rsquo;</dt>
635 <dd><p>Same parameter value as the <code>allowed</code> parameter mentioned above in
636 the &lsquo;<samp>[global]</samp>&rsquo; section but grants or denies a client from opening a
637 specific data file. The default is to allow any client that is allowed to
638 connect.
639 </p>
640 </dd>
641 </dl>
642 <table class="menu" border="0" cellspacing="0">
643 <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.
644 </td></tr>
645 <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.
646 </td></tr>
647 </table>
649 <hr>
650 <a name="TLS"></a>
651 <div class="header">
653 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>
654 </div>
655 <a name="Configuring-remote-connections-over-TLS_002e"></a>
656 <h2 class="chapter">6 Configuring remote connections over TLS.</h2>
657 <p>Remote connections can also be made to <code>pwmd</code> over TLS.
658 Authentication is done by using X.509 client certificates that are signed with
659 the same Certificate Authority (CA) as the server certificate.
660 </p>
661 <p>The CA certificate is expected to be found in
662 <samp>~/.pwmd/ca-cert.pem</samp> while the <code>pwmd</code> server certificate and key
663 file should be put in <samp>~/.pwmd/server-cert.pem</samp> and
664 <samp>~/.pwmd/server-key.pem</samp>, respectively.
665 </p>
666 <p>See the documentation of <code>certtool</code> or <code>openssl</code> for details
667 about creating self-signed certificates.
668 </p>
669 <p>The following TLS configuration options are available:
670 </p>
671 <dl compact="compact">
672 <dt>&lsquo;<samp>enable_tcp = boolean</samp>&rsquo;</dt>
673 <dd><p>Whether to enable TCP/TLS server support. If enabled, both TCP and the local
674 unix domain socket will listen for connections. The default is
675 <code>false</code>.
676 </p>
677 </dd>
678 <dt>&lsquo;<samp>tcp_port = integer</samp>&rsquo;</dt>
679 <dd><p>The TCP port to listen on when <var>enable_tcp</var> is <code>true</code>. The default is
680 <code>6466</code>.
681 </p>
682 </dd>
683 <dt>&lsquo;<samp>tcp_bind = string</samp>&rsquo;</dt>
684 <dd><p>The internet protocol to listen with. Must be one of <code>ipv4</code>, <code>ipv6</code>
685 or <code>any</code> to listen for both IPv4 and IPv6 connections. The default is
686 <code>any</code>.
687 </p>
688 </dd>
689 <dt>&lsquo;<samp>tcp_interface = string</samp>&rsquo;</dt>
690 <dd><p>Only useful if running as root.
691 </p>
692 </dd>
693 <dt>&lsquo;<samp>tls_timeout = seconds</samp>&rsquo;</dt>
694 <dd><p>The number of seconds to wait for a read() or write() call on a
695 TLS client file descriptor to complete before returning an
696 error. The default is <var>300</var>.
697 </p>
698 </dd>
699 <dt>&lsquo;<samp>keepalive_interval = seconds</samp>&rsquo;</dt>
700 <dd><p>Send a keepalive status message to an idle remote client. An idle
701 client is one that is not in a command. The purpose of this status
702 message is to disconnect a hung remote client and release any file mutex
703 locks so another client may open the same data file. The default is <code>60</code>.
704 </p>
705 </dd>
706 <dt>&lsquo;<samp>tcp_require_key = boolean</samp>&rsquo;</dt>
707 <dd><p>When <code>true</code>, require the remote client to provide the passphrase to open
708 a data file even if the file is cached. This option is a default for all
709 files when specified in the &lsquo;<samp>[global]</samp>&rsquo; section. The default is
710 <code>false</code>.
711 </p>
712 </dd>
713 <dt>&lsquo;<samp>tls_cipher_suite = string</samp>&rsquo;</dt>
714 <dd><p>The GnuTLS cipher suite and protocol to use. See the GnuTLS documentation for
715 information about the format of this string. The default is
716 <code>SECURE256:SECURE192:SECURE128:-VERS-SSL3.0:-VERS-TLS1.0</code>.
717 </p>
718 </dd>
719 <dt>&lsquo;<samp>tls_dh_params_file = filename</samp>&rsquo;</dt>
720 <dd><p>The PEM encoded filename containing DH parameters. If not specified
721 then DH algorithms will not be available to the client. See the
722 <code>openssl dhparam</code> or <code>certtool</code> manual pages for details about
723 generating this file.
724 </p>
725 <p>Note that SIGHUP will not reload this file once TLS support has been enabled.
726 You will need to restart <code>pwmd</code> for changes to take effect.
727 </p></dd>
728 </dl>
730 <hr>
731 <a name="Pinentry"></a>
732 <div class="header">
734 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>
735 </div>
736 <a name="Pinentry-configuration"></a>
737 <h2 class="chapter">7 Pinentry configuration</h2>
739 <p>The <code>pinentry</code> program is used to prompt the user for passphrase
740 input or as a confirmation dialog; it needs to know where to prompt for
741 the input, beit from a terminal or an X11 display.
742 </p>
743 <p>It is the responsibility of the client to tell <code>pinentry</code> about the
744 terminal or X11 display before requiring the input. This is done with the
745 <code>OPTION</code> command (see <a href="#OPTION">OPTION</a>) to either set or unset needed
746 <code>pwmd</code> environment variables and by using the
747 <code>gpg-connect-agent</code> program. Please read it&rsquo;s documentation about the
748 <em>UPDATESTARTUPTTY</em> command.
749 </p>
750 <hr>
751 <a name="Commands"></a>
752 <div class="header">
754 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>
755 </div>
756 <a name="Protocol-commands-and-their-syntax"></a>
757 <h2 class="chapter">8 Protocol commands and their syntax</h2>
758 <table class="menu" border="0" cellspacing="0">
759 <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.
760 </td></tr>
761 <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.
762 </td></tr>
763 <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.
764 </td></tr>
765 <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.
766 </td></tr>
767 <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.
768 </td></tr>
769 <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.
770 </td></tr>
771 <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.
772 </td></tr>
773 <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.
774 </td></tr>
775 <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.
776 </td></tr>
777 <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.
778 </td></tr>
779 <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.
780 </td></tr>
781 <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.
782 </td></tr>
783 <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.
784 </td></tr>
785 <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.
786 </td></tr>
787 <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.
788 </td></tr>
789 <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.
790 </td></tr>
791 <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.
792 </td></tr>
793 <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.
794 </td></tr>
795 <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.
796 </td></tr>
797 <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.
798 </td></tr>
799 <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.
800 </td></tr>
801 <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.
802 </td></tr>
803 <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.
804 </td></tr>
805 <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.
806 </td></tr>
807 <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.
808 </td></tr>
809 <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.
810 </td></tr>
811 <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.
812 </td></tr>
813 <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.
814 </td></tr>
815 <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.
816 </td></tr>
817 <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.
818 </td></tr>
819 <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.
820 </td></tr>
821 <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.
822 </td></tr>
823 <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.
824 </td></tr>
825 </table>
826 <hr>
827 <a name="ATTR"></a>
828 <div class="header">
830 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>
831 </div>
832 <a name="Modifying-element-attributes_002e"></a>
833 <h2 class="chapter">9 Modifying element attributes.</h2>
834 <a name="index-ATTR-command"></a>
835 <p>Syntax:
836 </p><div class="example">
837 <pre class="example">ATTR [--inquire] SET|GET|DELETE|LIST [&lt;attribute&gt;] element[&lt;TAB&gt;child[..]] ..
838 </pre></div>
840 <dl compact="compact">
841 <dt>ATTR SET attribute element[&lt;TAB&gt;child[..]] [value]</dt>
842 <dd><p>Stores or updates an <var>attribute</var> name and optional <var>value</var> of an
843 element. When no <var>value</var> is specified any existing value will be removed.
844 <br><br>
845 </p></dd>
846 <dt>ATTR DELETE attribute element[&lt;TAB&gt;child[..]]</dt>
847 <dd><p>Removes an attribute from an element. If <var>attribute</var> is <code>_name</code>
848 or <code>target</code> an error is returned. Use the <code>DELETE</code> command
849 (see <a href="#DELETE">DELETE</a>) instead.
850 <br><br>
851 </p></dd>
852 <dt>ATTR LIST element[&lt;TAB&gt;child[..]]</dt>
853 <dd><p>Retrieves a newline separated list of attributes names and values
854 from the specified element. Each attribute name and value is space delimited.
855 <br><br>
856 </p></dd>
857 <dt>ATTR GET attribute element[&lt;TAB&gt;child[..]]</dt>
858 <dd><p>Retrieves the value of an <var>attribute</var> from an element.
859 </p></dd>
860 </dl>
861 <br><br>
862 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
863 arguments are retrieved via a server <em>INQUIRE</em>.
864 <br><br>
865 See <a href="#Target-Attribute">Target Attribute</a>, for details about this special attribute and also
866 see <a href="#Other-Attributes">Other Attributes</a> for other attributes that are handled specially
867 by <code>pwmd</code>.
868 </p>
870 <hr>
871 <a name="CACHETIMEOUT"></a>
872 <div class="header">
874 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>
875 </div>
876 <a name="Setting-the-cache-timeout_002e"></a>
877 <h2 class="chapter">10 Setting the cache timeout.</h2>
878 <a name="index-CACHETIMEOUT-command"></a>
879 <p>Syntax:
880 </p><div class="example">
881 <pre class="example">CACHETIMEOUT &lt;seconds&gt;
882 </pre></div>
884 <p>The time in <var>seconds</var> until the currently opened data file will be
885 removed from the cache. <code>-1</code> will keep the cache entry forever,
886 <code>0</code> will require the passphrase for each <code>OPEN</code> command
887 (see <a href="#OPEN">OPEN</a>) or <code>SAVE</code> (see <a href="#SAVE">SAVE</a>) command. See <a href="#Configuration">Configuration</a>,
888 and the <code>cache_timeout</code> parameter.
889 </p>
891 <hr>
892 <a name="CLEARCACHE"></a>
893 <div class="header">
895 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>
896 </div>
897 <a name="Removing-a-cache-entry_002e"></a>
898 <h2 class="chapter">11 Removing a cache entry.</h2>
899 <a name="index-CLEARCACHE-command"></a>
900 <p>Syntax:
901 </p><div class="example">
902 <pre class="example">CLEARCACHE [&lt;filename&gt;]
903 </pre></div>
905 <p>Clears a file cache entry for all or the specified <var>filename</var>. Note that
906 this will also clear any <code>gpg-agent</code> cached keys which may cause
907 problems if another data file shares the same keys as <var>filename</var>.
908 <br><br>
909 When clearing all cache entries a permissions test is done against the
910 current client based on the <var>allowed</var> configuration parameter in a
911 <var>filename</var> section. Both a cache entry may be cleared and an error
912 returned depending on cached data files and client permissions.
913 </p>
915 <hr>
916 <a name="COPY"></a>
917 <div class="header">
919 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>
920 </div>
921 <a name="Copying-an-element_002e"></a>
922 <h2 class="chapter">12 Copying an element.</h2>
923 <a name="index-COPY-command"></a>
924 <p>Syntax:
925 </p><div class="example">
926 <pre class="example">COPY [--inquire] source[&lt;TAB&gt;child[..]] dest[&lt;TAB&gt;child[..]]
927 </pre></div>
929 <p>Copies the entire element tree starting from the child node of the source
930 element, to the destination element path. If the destination element path
931 does not exist then it will be created; otherwise it is overwritten.
932 <br><br>
933 Note that attributes from the source element are merged into the
934 destination element when the destination element path exists. When an
935 attribute of the same name exists in both the source and destination
936 elements then the destination attribute will be updated to the source
937 attribute value.
938 <br><br>
939 When the <samp>--inquire</samp> option is passed then all remaining non-option
940 arguments are retrieved via a server <em>INQUIRE</em>.
941 </p>
943 <hr>
944 <a name="DELETE"></a>
945 <div class="header">
947 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>
948 </div>
949 <a name="Deleting-an-element_002e"></a>
950 <h2 class="chapter">13 Deleting an element.</h2>
951 <a name="index-DELETE-command"></a>
952 <p>Syntax:
953 </p><div class="example">
954 <pre class="example">DELETE [--inquire] element[&lt;TAB&gt;child[..]]
955 </pre></div>
957 <p>Removes the specified element path and all of its children. This may break
958 an element with a <code>target</code> attribute (see <a href="#Target-Attribute">Target Attribute</a>) that
959 refers to this element or any of its children.
960 <br><br>
961 When the <samp>--inquire</samp> option is passed then all remaining non-option
962 arguments are retrieved via a server <em>INQUIRE</em>.
963 </p>
965 <hr>
966 <a name="DELETEKEY"></a>
967 <div class="header">
969 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>
970 </div>
971 <a name="Deleting-a-key-from-the-key-ring_002e"></a>
972 <h2 class="chapter">14 Deleting a key from the key ring.</h2>
973 <a name="index-DELETEKEY-command"></a>
974 <p>Syntax:
975 </p><div class="example">
976 <pre class="example">DELETEKEY &lt;keyid&gt;
977 </pre></div>
979 <p>Deletes the secret key associated with key <var>keyid</var> from the keyring.
980 Note that when the key is deleted, the current or other data files using
981 this key will no longer be able to be opened.
982 </p>
984 <hr>
985 <a name="DUMP"></a>
986 <div class="header">
988 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>
989 </div>
990 <a name="Showing-the-XML-document_002e"></a>
991 <h2 class="chapter">15 Showing the XML document.</h2>
992 <a name="index-DUMP-command"></a>
993 <p>Syntax:
994 </p><div class="example">
995 <pre class="example">DUMP
996 </pre></div>
998 <p>Shows the in memory <abbr>XML</abbr> document with indenting. See <a href="#XPATH">XPATH</a>, for
999 dumping a specific node.
1000 </p>
1002 <hr>
1003 <a name="GENKEY"></a>
1004 <div class="header">
1006 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>
1007 </div>
1008 <a name="Generating-a-new-key_002e"></a>
1009 <h2 class="chapter">16 Generating a new key.</h2>
1010 <a name="index-GENKEY-command"></a>
1011 <p>Syntax:
1012 </p><div class="example">
1013 <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;]
1014 </pre></div>
1016 <p>Generates a new key based on option arguments. One of
1017 <samp>--subkey-of</samp> or <samp>--userid</samp> is
1018 required. The <samp>--subkey-of</samp> option will generate a subkey for the key
1019 of the specified fingerprint.
1020 </p>
1022 <hr>
1023 <a name="GET"></a>
1024 <div class="header">
1026 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>
1027 </div>
1028 <a name="Getting-the-content-of-an-element_002e"></a>
1029 <h2 class="chapter">17 Getting the content of an element.</h2>
1030 <a name="index-GET-command"></a>
1031 <p>Syntax:
1032 </p><div class="example">
1033 <pre class="example">GET [--inquire] element[&lt;TAB&gt;child[..]]
1034 </pre></div>
1036 <p>Retrieves the content of the specified element. The content is returned
1037 with a data response.
1038 <br><br>
1039 When the <samp>--inquire</samp> option is passed then all remaining non-option
1040 arguments are retrieved via a server <em>INQUIRE</em>.
1041 </p>
1043 <hr>
1044 <a name="GETCONFIG"></a>
1045 <div class="header">
1047 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>
1048 </div>
1049 <a name="Obtaining-a-configuration-value_002e"></a>
1050 <h2 class="chapter">18 Obtaining a configuration value.</h2>
1051 <a name="index-GETCONFIG-command"></a>
1052 <p>Syntax:
1053 </p><div class="example">
1054 <pre class="example">GETCONFIG [filename] &lt;parameter&gt;
1055 </pre></div>
1057 <p>Returns the value of a <code>pwmd</code> configuration <var>parameter</var> with a
1058 data response. If no file has been opened then the value for <var>filename</var>
1059 or the default from the <var>global</var> section will be returned. If a file
1060 has been opened and no <var>filename</var> is specified, the value previously
1061 set with the <code>OPTION</code> command (see <a href="#OPTION">OPTION</a>) will be returned.
1062 </p>
1064 <hr>
1065 <a name="GETINFO"></a>
1066 <div class="header">
1068 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>
1069 </div>
1070 <a name="Obtaining-server-and-client-information_002e"></a>
1071 <h2 class="chapter">19 Obtaining server and client information.</h2>
1072 <a name="index-GETINFO-command"></a>
1073 <p>Syntax:
1074 </p><div class="example">
1075 <pre class="example">GETINFO [--data] [--verbose] CACHE | CLIENTS | PID | USER | LAST_ERROR | VERSION
1076 </pre></div>
1078 <p>Get server and other information. The information is returned via a status
1079 message (see <a href="#Status-Messages">Status Messages</a>) unless otherwise noted or <samp>--data</samp>
1080 is specified.
1081 <br><br>
1082 <var>CACHE</var> returns the number of cached documents.
1083 <br><br>
1084 <var>CLIENTS</var> returns the number of
1085 connected clients via a status message or a list of connected clients when
1086 the <samp>--verbose</samp> parameter is used (implies <samp>--data</samp>). A
1087 verbose line of a client list contains
1088 space delimited
1089 fields: the thread ID, client name, opened file (<code>/</code> if none opened),
1090 IP address if remote, file lock status, whether the current client is self
1091 or not, client state (see below),
1092 user ID or TLS fingerprint of the connected client, username if the
1093 client is a local one else <code>-</code>, and finally the time stamp of when the
1094 client connected.
1095 <br><br>
1096 Client state <code>0</code> is an unknown client state, state <code>1</code> indicates
1097 the client has connected but hasn&rsquo;t completed initializing, state <code>2</code>
1098 indicates that the client is idle, state <code>3</code> means the
1099 client is in a command and state <code>4</code> means the client is disconnecting.
1100 <br><br>
1101 <var>PID</var> returns the process ID number of the server via a data response.
1102 <br><br>
1103 <var>VERSION</var> returns the server version number and compile-time features
1104 via a data response with each being space delimited.
1105 <br><br>
1106 <var>LAST_ERROR</var> returns a detailed description of the last failed command
1107 via a data response, when available.
1108 <br><br>
1109 <var>USER</var> returns the username or <abbr>TLS</abbr> hash of the connected client
1110 via a data response.
1111 </p>
1113 <hr>
1114 <a name="HELP"></a>
1115 <div class="header">
1117 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>
1118 </div>
1119 <a name="Showing-available-commands_002e"></a>
1120 <h2 class="chapter">20 Showing available commands.</h2>
1121 <a name="index-HELP-command"></a>
1122 <p>Syntax:
1123 </p><div class="example">
1124 <pre class="example">HELP [--html] [&lt;COMMAND&gt;]
1125 </pre></div>
1127 <p>Show available commands or command specific help text.
1128 <br><br>
1129 The <samp>--html</samp> option will output the help text in HTML format.
1130 </p>
1132 <hr>
1133 <a name="IMPORT"></a>
1134 <div class="header">
1136 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>
1137 </div>
1138 <a name="Creating-elements-from-XML_002e"></a>
1139 <h2 class="chapter">21 Creating elements from XML.</h2>
1140 <a name="index-IMPORT-command"></a>
1141 <p>Syntax:
1142 </p><div class="example">
1143 <pre class="example">IMPORT [--root=element[&lt;TAB&gt;child[..]]]
1144 </pre></div>
1146 <p>This command uses a server <em>INQUIRE</em> to retrieve data from the client.
1147 <br><br>
1148 Like the <code>STORE</code> command (see <a href="#STORE">STORE</a>), but the <var>content</var>
1149 argument is raw <abbr>XML</abbr> data. The content is created as a child of
1150 the element path specified with the <samp>--root</samp> option or at the
1151 document root when not specified. Existing elements of the same name will
1152 be overwritten.
1153 <br><br>
1154 The content must begin with an <abbr>XML</abbr> element node. See <a href="#Introduction">Introduction</a>,
1155 for details.
1156 </p>
1158 <hr>
1159 <a name="ISCACHED"></a>
1160 <div class="header">
1162 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>
1163 </div>
1164 <a name="Testing-cache-status_002e"></a>
1165 <h2 class="chapter">22 Testing cache status.</h2>
1166 <a name="index-ISCACHED-command"></a>
1167 <p>Syntax:
1168 </p><div class="example">
1169 <pre class="example">ISCACHED [--lock] [--agent [--sign]] &lt;filename&gt;
1170 </pre></div>
1172 <p>Determines the file cache status of the specified <var>filename</var>.
1173 The default is to test whether the filename is cached in memory. Passing
1174 option <samp>--agent</samp> will test the <code>gpg-agent</code> cache for at most
1175 one cached key used for opening the data file (see <a href="#OPEN">OPEN</a>). To test if
1176 a signing key is cached, pass <samp>--sign</samp> along with <samp>--agent</samp>.
1177 Both the <samp>--agent</samp> and <samp>--sign</samp> options require an opened data
1178 file.
1179 <br><br>
1180 An <em>OK</em> response is returned if the specified <var>filename</var> is found
1181 in the cache. If not found in the cache but exists on the filesystem
1182 then <code>GPG_ERR_NO_DATA</code> is returned. Otherwise a filesystem error is
1183 returned.
1184 <br><br>
1185 The <samp>--lock</samp> option will lock the file mutex of <var>filename</var> when
1186 the file exists; it does not need to be opened nor cached. The lock will be
1187 released when the client exits or sends the <code>UNLOCK</code> command
1188 (see <a href="#UNLOCK">UNLOCK</a>). When this option is passed the current data file is closed.
1189 </p>
1191 <hr>
1192 <a name="KEYINFO"></a>
1193 <div class="header">
1195 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>
1196 </div>
1197 <a name="Showing-keys-used-for-the-current-data-file_002e"></a>
1198 <h2 class="chapter">23 Showing keys used for the current data file.</h2>
1199 <a name="index-KEYINFO-command"></a>
1200 <p>Syntax:
1201 </p><div class="example">
1202 <pre class="example">KEYINFO [--learn]
1203 </pre></div>
1205 <p>Returns a new line separated list of key ID&rsquo;s that the currently opened
1206 data file has recipients and signers for. If the key is a signing key it
1207 will be prefixed with an <code>S</code>. If the file is a new one, or has no
1208 signers in the case of being symmetrically encrypted, the error code
1209 <code>GPG_ERR_NO_DATA</code> is returned.
1210 <br><br>
1211 When the <samp>--learn</samp> option is passed, keys on a smartcard will be
1212 imported.
1213 </p>
1215 <hr>
1216 <a name="KILL"></a>
1217 <div class="header">
1219 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>
1220 </div>
1221 <a name="Terminating-another-client_002e"></a>
1222 <h2 class="chapter">24 Terminating another client.</h2>
1223 <a name="index-KILL-command"></a>
1224 <p>Syntax:
1225 </p><div class="example">
1226 <pre class="example">KILL &lt;thread_id&gt;
1227 </pre></div>
1229 <p>Terminates the client identified by <var>thread_id</var> and releases any file
1230 lock or other resources it has held. See <code>GETINFO</code> (see <a href="#GETINFO">GETINFO</a>)
1231 for details about listing connected clients. An <code>invoking_user</code>
1232 (see <a href="#Configuration">Configuration</a>) may kill any client while others may only kill
1233 clients of the same <code>UID</code> or <abbr>TLS</abbr> fingerprint.
1234 </p>
1236 <hr>
1237 <a name="LIST"></a>
1238 <div class="header">
1240 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>
1241 </div>
1242 <a name="Showing-document-elements_002e"></a>
1243 <h2 class="chapter">25 Showing document elements.</h2>
1244 <a name="index-LIST-command"></a>
1245 <p>Syntax:
1246 </p><div class="example">
1247 <pre class="example">LIST [--inquire] [--recurse] [element[&lt;TAB&gt;child[..]]]
1248 </pre></div>
1250 <p>If no element path is given then a newline separated list of root elements
1251 is returned with a data response. If given, then children of the specified
1252 element path are returned.
1253 <br><br>
1254 Each element path
1255 returned will have zero or more flags appened to it. These flags are
1256 delimited from the element path by a single space character. A flag itself
1257 is a single character. Flag <code>P</code> indicates that access to the element
1258 is denied. Flag <code>+</code> indicates that there are child nodes of
1259 the current element path. Flag <code>E</code> indicates that an element of the
1260 element path contained in a <var>target</var> attribute could not be found. Flag
1261 <code>O</code> indicates that a <var>target</var> attribute recursion limit was reached
1262 (see <a href="#Configuration">Configuration</a>). Flag <code>T</code>, followed by a single space character,
1263 then an element path, is the element path of the <var>target</var> attribute
1264 contained in the current element.
1265 <br><br>
1266 When a specified element path contains an error, beit from the final
1267 element in the path or any previous element, the path is still shown but
1268 will contain the error flag for the element with the error. Determining
1269 the actual element which contains the error is up to the client. This can be
1270 done by traversing the final element up to parent elements that contain the
1271 same error flag.
1272 <br><br>
1273 The option <samp>--recurse</samp> may be used to list the entire element tree
1274 for a specified element path or the entire tree for all root elements.
1275 <br><br>
1276 When the <samp>--inquire</samp> option is passed then all remaining non-option
1277 arguments are retrieved via a server <em>INQUIRE</em>.
1278 </p>
1280 <hr>
1281 <a name="LISTKEYS"></a>
1282 <div class="header">
1284 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>
1285 </div>
1286 <a name="Listing-keys-in-the-key-ring_002e"></a>
1287 <h2 class="chapter">26 Listing keys in the key ring.</h2>
1288 <a name="index-LISTKEYS-command"></a>
1289 <p>Syntax:
1290 </p><div class="example">
1291 <pre class="example">LISTKEYS [--secret-only] [pattern[,&lt;pattern&gt;]]
1292 </pre></div>
1294 <p>Returns a new line separated list of key information matching a comma
1295 separated list of <var>pattern</var>&rsquo;s. When option <samp>--secret-only</samp> is
1296 specified, only keys matching <var>pattern</var> that also have a secret key
1297 available will be returned.
1298 </p>
1300 <hr>
1301 <a name="LOCK"></a>
1302 <div class="header">
1304 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>
1305 </div>
1306 <a name="Locking-the-current-data-file_002e"></a>
1307 <h2 class="chapter">27 Locking the current data file.</h2>
1308 <a name="index-LOCK-command"></a>
1309 <p>Syntax:
1310 </p><div class="example">
1311 <pre class="example">LOCK
1312 </pre></div>
1314 <p>Locks the mutex associated with the opened file. This prevents other clients
1315 from sending commands to the same opened file until the client
1316 that sent this command either disconnects or sends the <code>UNLOCK</code>
1317 command. See <a href="#UNLOCK">UNLOCK</a>.
1318 </p>
1320 <hr>
1321 <a name="LS"></a>
1322 <div class="header">
1324 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>
1325 </div>
1326 <a name="Showing-available-data-files_002e"></a>
1327 <h2 class="chapter">28 Showing available data files.</h2>
1328 <a name="index-LS-command"></a>
1329 <p>Syntax:
1330 </p><div class="example">
1331 <pre class="example">LS
1332 </pre></div>
1334 <p>Returns a newline separated list of data files stored in the data directory
1335 <samp>HOMEDIR/data</samp> (see <a href="#Invoking">Invoking</a>) with a data response.
1336 </p>
1338 <hr>
1339 <a name="MOVE"></a>
1340 <div class="header">
1342 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>
1343 </div>
1344 <a name="Moving-an-element_002e"></a>
1345 <h2 class="chapter">29 Moving an element.</h2>
1346 <a name="index-MOVE-command"></a>
1347 <p>Syntax:
1348 </p><div class="example">
1349 <pre class="example">MOVE [--inquire] source[&lt;TAB&gt;child[..]] [dest[&lt;TAB&gt;child[..]]]
1350 </pre></div>
1352 <p>Moves the source element path to the destination element path. If the
1353 destination is not specified then it will be moved to the root node of the
1354 document. If the destination is specified and exists then it will be
1355 overwritten; otherwise non-existing elements of the destination element
1356 path will be created.
1357 <br><br>
1358 When the <samp>--inquire</samp> option is passed then all remaining non-option
1359 arguments are retrieved via a server <em>INQUIRE</em>.
1360 </p>
1362 <hr>
1363 <a name="NOP"></a>
1364 <div class="header">
1366 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>
1367 </div>
1368 <a name="Testing-the-connection_002e"></a>
1369 <h2 class="chapter">30 Testing the connection.</h2>
1370 <a name="index-NOP-command"></a>
1371 <p>Syntax:
1372 </p><div class="example">
1373 <pre class="example">NOP
1374 </pre></div>
1376 <p>This command does nothing. It is useful for testing the connection for a
1377 timeout condition.
1378 </p>
1380 <hr>
1381 <a name="OPEN"></a>
1382 <div class="header">
1384 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>
1385 </div>
1386 <a name="Opening-a-data-file_002e"></a>
1387 <h2 class="chapter">31 Opening a data file.</h2>
1388 <a name="index-OPEN-command"></a>
1389 <p>Syntax:
1390 </p><div class="example">
1391 <pre class="example">OPEN [--lock] &lt;filename&gt;
1392 </pre></div>
1394 <p>Opens <var>filename</var>. When the <var>filename</var> is not found on the
1395 file-system then a new in-memory document will be created. If the file is
1396 found, it is looked for in the file cache and when found no passphrase will
1397 be required to open it. When not cached, <cite>pinentry(1)</cite> will be used to
1398 retrieve the passphrase for decryption unless <samp>disable-pinentry</samp>
1399 (see <a href="#OPTION">OPTION</a>) was specified in which case <code>pwmd</code> will
1400 <em>INQUIRE</em> the client for the passphrase. Note than when configuration
1401 option <samp>strict_open</samp> is enabled and the client is not an
1402 <samp>invoking_user</samp>, an error will be returned when the data file does
1403 not exist.
1404 <br><br>
1405 When the <samp>--lock</samp> option is passed then the file mutex will be
1406 locked as if the <code>LOCK</code> command (see <a href="#LOCK">LOCK</a>) had been sent after the
1407 file had been opened.
1408 </p>
1410 <hr>
1411 <a name="OPTION"></a>
1412 <div class="header">
1414 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>
1415 </div>
1416 <a name="Setting-various-client-parameters_002e"></a>
1417 <h2 class="chapter">32 Setting various client parameters.</h2>
1418 <a name="index-OPTION-command"></a>
1419 <p>Syntax:
1420 </p><div class="example">
1421 <pre class="example">OPTION &lt;NAME&gt;=[&lt;VALUE&gt;]
1422 </pre></div>
1424 <p>Sets a client option <var>name</var> to <var>value</var>. The value for an option is
1425 kept for the duration of the connection with the exception of the
1426 <code>pinentry</code> options which are defaults for all future connections
1427 (see <a href="#Pinentry">Pinentry</a>). When <var>value</var> is empty the option is unset.
1428 <br><br>
1429 </p><dl compact="compact">
1430 <dt>DISABLE-PINENTRY</dt>
1431 <dd><p>Disable use of <code>pinentry</code> for passphrase retrieval. When <code>1</code>, a
1432 server inquire is sent to the client to obtain the passphrase. This option
1433 may be set as needed before the <code>OPEN</code> (see <a href="#OPEN">OPEN</a>), <code>PASSWD</code>
1434 (see <a href="#PASSWD">PASSWD</a>) and <code>SAVE</code> (see <a href="#SAVE">SAVE</a>) commands. Set to <code>0</code>
1435 to use a <code>pinentry</code>.
1436 <br><br>
1437 </p></dd>
1438 <dt>DISPLAY</dt>
1439 <dd><p>Set or unset the X11 display to use when prompting for a passphrase.
1440 <br><br>
1441 </p></dd>
1442 <dt>TTYNAME</dt>
1443 <dd><p>Set the terminal device path to use when prompting for a passphrase.
1444 <br><br>
1445 </p></dd>
1446 <dt>TTYTYPE</dt>
1447 <dd><p>Set the terminal type for use with <samp>TTYNAME</samp>.
1448 <br><br>
1449 </p></dd>
1450 <dt>NAME</dt>
1451 <dd><p>Associates the thread ID of the connection with the specified textual
1452 representation. Useful for debugging log messages. May not contain whitespace.
1453 <br><br>
1454 </p></dd>
1455 <dt>LOCK-TIMEOUT</dt>
1456 <dd><p>When not <code>0</code>, the duration in tenths of a second to wait for the file
1457 mutex which has been locked by another thread to be released before returning
1458 an error. When <code>-1</code> the error will be returned immediately.
1459 <br><br>
1460 </p></dd>
1461 <dt>CLIENT-STATE</dt>
1462 <dd><p>When set to <code>1</code> then client state status messages for other clients are
1463 sent to the current client. The default is <code>0</code>.
1464 </p></dd>
1465 </dl>
1468 <hr>
1469 <a name="PASSWD"></a>
1470 <div class="header">
1472 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>
1473 </div>
1474 <a name="Changing-the-passphrase-for-a-key_002e"></a>
1475 <h2 class="chapter">33 Changing the passphrase for a key.</h2>
1476 <a name="index-PASSWD-command"></a>
1477 <p>Syntax:
1478 </p><div class="example">
1479 <pre class="example">PASSWD
1480 </pre></div>
1482 <p>Changes the passphrase of the secret key required to open the current
1483 data file. If the data file is symmetrically encrypted, the error
1484 <code>GPG_ERR_NOT_SUPPORTED</code> is returned. When symmetrically encrypted,
1485 the <code>SAVE</code> command (see <a href="#SAVE">SAVE</a>) should be used instead to prevent
1486 this command saving any unwanted changes to the <abbr>XML</abbr> document.
1487 <br><br>
1488 This command is not available to non-invoking clients
1489 (see <a href="#Access-Control">Access Control</a>).
1490 </p>
1492 <hr>
1493 <a name="REALPATH"></a>
1494 <div class="header">
1496 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>
1497 </div>
1498 <a name="Resolving-an-element_002e"></a>
1499 <h2 class="chapter">34 Resolving an element.</h2>
1500 <a name="index-REALPATH-command"></a>
1501 <p>Syntax:
1502 </p><div class="example">
1503 <pre class="example">REALPATH [--inquire] element[&lt;TAB&gt;child[..]]
1504 </pre></div>
1506 <p>Resolves all <code>target</code> attributes of the specified element path and
1507 returns the result with a data response. See <a href="#Target-Attribute">Target Attribute</a>, for details.
1508 <br><br>
1509 When the <samp>--inquire</samp> option is passed then all remaining non-option
1510 arguments are retrieved via a server <em>INQUIRE</em>.
1511 </p>
1513 <hr>
1514 <a name="RENAME"></a>
1515 <div class="header">
1517 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>
1518 </div>
1519 <a name="Renaming-an-element_002e"></a>
1520 <h2 class="chapter">35 Renaming an element.</h2>
1521 <a name="index-RENAME-command"></a>
1522 <p>Syntax:
1523 </p><div class="example">
1524 <pre class="example">RENAME [--inquire] element[&lt;TAB&gt;child[..]] &lt;value&gt;
1525 </pre></div>
1527 <p>Renames the specified <var>element</var> to the new <var>value</var>. If an element of
1528 the same name as the <var>value</var> already exists it will be overwritten.
1529 <br><br>
1530 When the <samp>--inquire</samp> option is passed then all remaining non-option
1531 arguments are retrieved via a server <em>INQUIRE</em>.
1532 </p>
1534 <hr>
1535 <a name="RESET"></a>
1536 <div class="header">
1538 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>
1539 </div>
1540 <a name="Resetting-the-client-state_002e"></a>
1541 <h2 class="chapter">36 Resetting the client state.</h2>
1542 <a name="index-RESET-command"></a>
1543 <p>Syntax:
1544 </p><div class="example">
1545 <pre class="example">RESET
1546 </pre></div>
1548 <p>Closes the currently opened file but keeps any previously set client options
1549 (see <a href="#OPTION">OPTION</a>).
1550 </p>
1552 <hr>
1553 <a name="SAVE"></a>
1554 <div class="header">
1556 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>
1557 </div>
1558 <a name="Saving-document-changes-to-disk_002e"></a>
1559 <h2 class="chapter">37 Saving document changes to disk.</h2>
1560 <a name="index-SAVE-command"></a>
1561 <p>Syntax:
1562 </p><div class="example">
1563 <pre class="example">SAVE [--sign-keyid=[&lt;fpr&gt;]] [--symmetric | --keyid=&lt;fpr&gt;[,..] | --inquire-keyid]
1564 </pre></div>
1566 <p>Writes the in-memory <abbr>XML</abbr> document to disk. The file written to is the
1567 file that was opened when using the <code>OPEN</code> command (see <a href="#OPEN">OPEN</a>).
1568 <br><br>
1569 If the file is a new one, one of <samp>--symmetric</samp>, <samp>--keyid</samp> or
1570 <samp>--inquire-keyid</samp> is required. When not <samp>--symmetric</samp>, option
1571 <samp>--sign-keyid</samp> is also required, but optional otherwise.
1572 <br><br>
1573 You can encrypt the data file to a recipient other than the one that it
1574 was originally encrypted with by passing the <samp>--keyid</samp> or
1575 <samp>--inquire-keyid</samp> option with a comma separated list of
1576 public encryption key fingerprints as its argument. Use the
1577 <code>LISTKEYS</code> command (see <a href="#LISTKEYS">LISTKEYS</a>) to show key information by
1578 pattern. The <samp>--sign-keyid</samp> option may also be used to sign the data
1579 file with an alternate key by specifying the fingerprint of a signing key.
1580 Only one signing key is supported unlike the <samp>--keyid</samp> option.
1581 A passphrase to decrypt the data file
1582 will be required when one or more of the original encryption keys or signing
1583 key are not found in either of these two options&rsquo; arguments or when the data
1584 file is symmetrically encrypted reguardless of the <code>require_save_key</code>
1585 configuration parameter. The original encryption keys and signing key will be
1586 used when neither of these options are specified.
1587 <br><br>
1588 The <samp>--keyid</samp> and <samp>--sign-keyid</samp> options are not available
1589 to non-invoking clients
1590 (see <a href="#Access-Control">Access Control</a>) when the recipients or signer do not match those
1591 that were used when the file was <code>OPEN</code>&rsquo;ed.
1592 <br><br>
1593 The <samp>--symmetric</samp> option specifies that a new data file be
1594 conventionally encrypted. These types of data files do not use a recipient
1595 public key but may optionally be signed by using the <samp>--sign-keyid</samp>
1596 option. To remove the signing key from a symmtrically encrypted data file,
1597 leave the option value empty.
1598 <br><br>
1599 Note that you cannot change encryption schemes once a data file has been
1600 saved.
1601 </p>
1603 <hr>
1604 <a name="STORE"></a>
1605 <div class="header">
1607 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>
1608 </div>
1609 <a name="Modifying-the-content-of-an-element_002e"></a>
1610 <h2 class="chapter">38 Modifying the content of an element.</h2>
1611 <a name="index-STORE-command"></a>
1612 <p>Syntax:
1613 </p><div class="example">
1614 <pre class="example">STORE element[&lt;TAB&gt;child[..]]&lt;TAB&gt;[content]
1615 </pre></div>
1617 <p>This command uses a server <em>INQUIRE</em> to retrieve data from the client.
1618 <br><br>
1619 Creates a new element path or modifies the <var>content</var> of an existing
1620 element. If only a single element is specified then a new root element is
1621 created. Otherwise, elements are <tt class="key">TAB</tt> delimited and the content will be
1622 set to the final <tt class="key">TAB</tt> delimited element. If no <var>content</var> is
1623 specified after the final <tt class="key">TAB</tt>, then the content of the existing
1624 element will be removed; or will be empty if creating a new element.
1625 <br><br>
1626 The only restriction of an element name is that it not contain whitespace
1627 characters. There is no other whitespace between the <tt class="key">TAB</tt> delimited
1628 elements. It is recommended that the content of an element be base64 encoded
1629 when it contains control or <tt class="key">TAB</tt> characters to prevent <abbr>XML</abbr>
1630 parsing and <code>pwmd</code> syntax errors.
1631 </p>
1633 <hr>
1634 <a name="UNLOCK"></a>
1635 <div class="header">
1637 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>
1638 </div>
1639 <a name="Removing-a-data-file-lock_002e"></a>
1640 <h2 class="chapter">39 Removing a data file lock.</h2>
1641 <a name="index-UNLOCK-command"></a>
1642 <p>Syntax:
1643 </p><div class="example">
1644 <pre class="example">UNLOCK
1645 </pre></div>
1647 <p>Unlocks the file mutex which was locked with the <code>LOCK</code> command or
1648 a commands&rsquo; <samp>--lock</samp> option (see <a href="#LOCK">LOCK</a>, see <a href="#OPEN">OPEN</a>,
1649 see <a href="#ISCACHED">ISCACHED</a>).
1650 </p>
1652 <hr>
1653 <a name="XPATH"></a>
1654 <div class="header">
1656 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>
1657 </div>
1658 <a name="Modifying-more-than-one-element_002e"></a>
1659 <h2 class="chapter">40 Modifying more than one element.</h2>
1660 <a name="index-XPATH-command"></a>
1661 <p>Syntax:
1662 </p><div class="example">
1663 <pre class="example">XPATH [--inquire] &lt;expression&gt;[&lt;TAB&gt;[value]]
1664 </pre></div>
1666 <p>Evaluates an XPath <var>expression</var>. If no <var>value</var> argument is
1667 specified it is assumed the expression is a request to return a result.
1668 Otherwise, the result is set to the <var>value</var> argument and the document is
1669 updated. If there is no <var>value</var> after the <tt class="key">TAB</tt> character, the value
1670 is assumed to be empty and the document is updated. For example:
1671 </p><br>
1672 <div class="example">
1673 <pre class="example">XPATH //element[@_name='password']<span class="key">TAB</span>
1674 </pre></div>
1675 <br>
1676 <p>would clear the content of all <var>password</var> elements in the data file
1677 while leaving off the trailing <tt class="key">TAB</tt> would return all <var>password</var>
1678 elements in <abbr>XML</abbr> format.
1679 <br><br>
1680 When the <samp>--inquire</samp> option is passed then all remaining non-option
1681 arguments are retrieved via a server <em>INQUIRE</em>.
1682 <br><br>
1683 See <a href="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a> for <abbr>XPATH</abbr>
1684 expression syntax.
1685 </p>
1687 <hr>
1688 <a name="XPATHATTR"></a>
1689 <div class="header">
1691 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>
1692 </div>
1693 <a name="Modifying-more-than-one-element_0027s-attributes_002e"></a>
1694 <h2 class="chapter">41 Modifying more than one element&rsquo;s attributes.</h2>
1695 <a name="index-XPATHATTR-command"></a>
1696 <p>Syntax:
1697 </p><div class="example">
1698 <pre class="example">XPATHATTR [--inquire] SET|DELETE &lt;name&gt; &lt;expression&gt;[&lt;TAB&gt;[&lt;value&gt;]]
1699 </pre></div>
1701 <p>Like the <code>XPATH</code> command (see <a href="#XPATH">XPATH</a>) but operates on element
1702 attributes and does not return a result. For the <var>SET</var> operation the
1703 <var>value</var> is optional but the field is required. If not specified then
1704 the attribute value will be empty. For example:
1705 </p><br>
1706 <div class="example">
1707 <pre class="example">XPATHATTR SET password //element[@_name='password']<span class="key">TAB</span>
1708 </pre></div>
1709 <br>
1710 <p>would create a <var>password</var> attribute for each <var>password</var> element
1711 found in the document. The attribute value will be empty but still exist.
1712 <br><br>
1713 When the <samp>--inquire</samp> option is passed then all remaining non-option
1714 arguments are retrieved via a server <em>INQUIRE</em>.
1715 <br><br>
1716 See <a href="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a> for <abbr>XPATH</abbr>
1717 expression syntax.
1718 </p>
1721 <hr>
1722 <a name="Status-Messages"></a>
1723 <div class="header">
1725 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>
1726 </div>
1727 <a name="Status-messages-and-their-meanings"></a>
1728 <h2 class="chapter">42 Status messages and their meanings</h2>
1729 <p>Some commands send status messages to inform the client about certain
1730 operations or as a progress indicator. Status messages begin with a
1731 <code>KEYWORD</code> followed by a status description for status messages that
1732 require it. What status messages are sent, when, and how often may depend on
1733 configuration settings (see <a href="#Configuration">Configuration</a>).
1734 </p>
1735 <table>
1736 <thead><tr><th width="20%">Message</th><th width="25%">Parameters</th><th width="55%">Description</th></tr></thead>
1737 <tr><td width="20%">CACHE
1738 <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
1739 (see <a href="#GETINFO">GETINFO</a>) and after every cache modification.</td></tr>
1740 <tr><td width="20%">CLIENTS
1741 <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
1742 when another client either connects or disconnects.</td></tr>
1743 <tr><td width="20%">DECRYPT
1744 <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
1745 status message is sent is determined by the <code>keepalive_interval</code>
1746 (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1747 <tr><td width="20%">ENCRYPT
1748 <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
1749 status message is sent is determined by the <code>keepalive_interval</code>
1750 (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1751 <tr><td width="20%">GENKEY
1752 <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
1753 status message is sent is determined by the <code>keepalive_interval</code>
1754 (see <a href="#Configuration">Configuration</a>) setting. The <var>sigkey_fpr</var> and <var>pubkey_fpr</var>
1755 parameters are added when key generation has completed.</td></tr>
1756 <tr><td width="20%">INQUIRE_MAXLEN
1757 <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
1758 specifies the maximum number of bytes allowed for the client to send and
1759 should not be exceeded.</td></tr>
1760 <tr><td width="20%">KEEPALIVE
1761 <a name="index-KEEPALIVE"></a></td><td width="25%"></td><td width="55%">Sent to each idle client every <var>keepalive_interval</var>
1762 (see <a href="#Configuration">Configuration</a>) seconds.</td></tr>
1763 <tr><td width="20%">LOCKED
1764 <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
1765 the mutex associated with a file. How often this status message is sent is
1766 determined by the <code>keepalive_interval</code> (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1767 <tr><td width="20%">NEWFILE
1768 <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
1769 exist on the file-system.</td></tr>
1770 <tr><td width="20%">XFER
1771 <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
1772 delimited arguments. The first being the current amount of bytes transferred
1773 and the other being the total bytes to be transferred.</td></tr>
1774 <tr><td width="20%">STATE
1775 <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
1776 <var>state</var> (see <a href="#GETINFO">GETINFO</a> for client states). For a client to receive
1777 another clients state the option <var>CLIENT-STATE</var> must be set.
1778 See <a href="#OPTION">OPTION</a> command.</td></tr>
1779 <tr><td width="20%">EXPIRE
1780 <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
1781 <code>expire</code> (see <a href="#Other-Attributes">Other Attributes</a>) attribute that is in the past or when
1782 <code>STORE</code> (see <a href="#STORE">STORE</a>) updates the <code>expire</code> attribute from the
1783 <code>expire_increment</code> attribute value. The second field will be <code>0</code>
1784 when <code>GET</code> sends this status message. Otherwise the second field is the
1785 time the next expiry will be.</td></tr>
1786 <tr><td width="20%">PASSPHRASE_HINT
1787 <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
1788 <code>pinentry</code>. Only sent when pinentry is disabled (see <a href="#OPTION">OPTION</a>).</td></tr>
1789 <tr><td width="20%">PASSPHRASE_INFO
1790 <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
1791 <code>pinentry</code>. Only sent when pinentry is disabled (see <a href="#OPTION">OPTION</a>).</td></tr>
1792 <tr><td width="20%">REHANDSHAKE
1793 <a name="index-REHANDSHAKE"></a></td><td width="25%"></td><td width="55%">Sent to each TLS client just before performing a cipher renegotiation
1794 after a SIGHUP signal was received.</td></tr>
1795 </table>
1797 <hr>
1798 <a name="Target-Attribute"></a>
1799 <div class="header">
1801 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>
1802 </div>
1803 <a name="The-target-attribute"></a>
1804 <h2 class="chapter">43 The <code>target</code> attribute</h2>
1805 <a name="index-target-attribute"></a>
1806 <p>A <em>case sensitive</em> attribute named <code>target</code> is treated specially
1807 when found in each element of an element path. This attribute, like other
1808 element attributes, is created or modified with the <code>ATTR</code> command
1809 (see <a href="#ATTR">ATTR</a>). The value of this attribute is an existing element path
1810 somewhere in the document. If you are familiar with XML entities or
1811 maybe the HTML <code>id</code> or <code>target</code> attributes or a symbolic link
1812 in a file-system, you may find this attribute behaves similar to any of those.
1813 </p>
1814 <p>To create a <code>target</code> attribute use the following syntax:
1815 </p>
1816 <div class="example">
1817 <pre class="example">ATTR SET target element[<code>TAB</code>child[..]] element[<code>TAB</code>child[..]]
1818 </pre></div>
1820 <p>Note the single space between the two element paths. The first element path is
1821 where the <code>target</code> attribute will be created. If the element path does
1822 not exist then it will be created. This is the only time the <code>ATTR</code>
1823 (see <a href="#ATTR">ATTR</a>) command will create elements. The attribute is created in the
1824 final element of the element path.
1825 </p>
1826 <p>The second element path is the destination of where you want the first element
1827 path to resolve to. When an element path is passed as an argument to a
1828 protocol command <code>pwmd</code> looks for a <code>target</code> attribute when
1829 resolving each element and, if found, &quot;jumps&quot; to the attribute value and
1830 continues resolving any remaining elements a commands element path.
1831 </p>
1832 <p>When an element of a element path is removed that a <code>target</code> attribute
1833 resolves to then an error will occur when trying to access that element. You
1834 may need to either update the <code>target</code> attribute value with a new element
1835 path or remove the attribute entirely.
1836 </p>
1837 <p>Clients should be careful of creating <code>target</code> loops, or targets that
1838 resolve to themselves. See the <var>recursion_depth</var> (see <a href="#Configuration">Configuration</a>)
1839 configuration parameter for details.
1840 </p>
1841 <p>The <code>REALPATH</code> command (see <a href="#REALPATH">REALPATH</a>) can be used to show the element
1842 path after resolving all <code>target</code> attributes.
1843 </p>
1844 <p><em>Note that when setting this attribute any children of the element will
1845 be removed.</em>
1846 </p>
1848 <hr>
1849 <a name="Other-Attributes"></a>
1850 <div class="header">
1852 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>
1853 </div>
1854 <a name="Other-special-attributes"></a>
1855 <h2 class="chapter">44 Other special attributes</h2>
1856 <a name="index-special-attributes"></a>
1857 <p>In addition to the <code>target</code> attribute (see <a href="#Target-Attribute">Target Attribute</a>), there
1858 are a few other attributes that are specially handled by <code>pwmd</code>. The
1859 first is the <code>_ctime</code> attribute which is set to the current time when an
1860 element is created. Next is the <code>_mtime</code> attribute which is created when
1861 an element is created and also updated when an element is modified. Both of
1862 these attributes may be removed but the <code>_mtime</code> attribute is
1863 automatically added again since removing an attribute is considered modifying
1864 an element. The <code>_acl</code> attribute controls access to the element, beit
1865 modifying or accessing element content, or descending into child elements.
1866 See <a href="#Access-Control">Access Control</a> for details. The <code>_name</code> attribute contains the
1867 name of an element.
1868 </p>
1869 <p>The above mentioned attributes are considered reserved attribute names.
1870 Reserved attributes are treated specially when a <code>target</code> attribute is
1871 found for the current element. The <code>ATTR LIST</code> command will show these
1872 attribute values for the current element and not the attribute values for the
1873 resolved <code>target</code> element. All other non-reserved attributes for the
1874 resolved <code>target</code> are appended to the <code>ATTR LIST</code> command output.
1875 Other <code>ATTR</code> commands (see <a href="#ATTR">ATTR</a>) behave as usual. You can, for example, <code>ATTR
1876 DELETE</code> a non-reserved attribute for an element that contains a <code>target</code>
1877 attribute. The resolved target elements&rsquo; attribute will be removed rather than
1878 the element containing the <code>target</code> attribute.
1879 </p>
1880 <p>Another specially handled attribute is the <code>expire</code> attribute. This
1881 attribute value, like the <code>_ctime</code> and <code>_mtime</code> attributes, is a
1882 timestamp. But this timestamp is usually in the future and for use with the
1883 <code>GET</code> (see <a href="#GET">GET</a>) and <code>STORE</code> (see <a href="#STORE">STORE</a>) commands. When the
1884 <code>GET</code> command is issued, it checks for an <code>expire</code> attribute an
1885 compares its&rsquo; value with the current time. If the <code>expire</code> timestamp is in
1886 the past then a status message is sent (see <a href="#Status-Messages">Status Messages</a>) to inform the
1887 client that the element content should be updated. When the content for an
1888 element containing an <code>expire</code> attribute is set when using the
1889 <code>STORE</code> command, the value of the <code>expire_increment</code> attribute is
1890 added to the current time and the <code>expire</code> attribute value is updated.
1891 When no <code>expire_increment</code> attribute is found, no modification is done of
1892 the <code>expire</code> attribute.
1893 </p>
1895 <hr>
1896 <a name="Key-Expiration"></a>
1897 <div class="header">
1899 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>
1900 </div>
1901 <a name="Key-Expiration-1"></a>
1902 <h2 class="chapter">45 Key Expiration</h2>
1903 <a name="index-key-expiration"></a>
1904 <p>When a key used for signing a data file has expired there is no indication
1905 until the next <code>SAVE</code> command is sent. The command will fail since one
1906 cannot sign the data file with an expired key. The client will need to either
1907 use a different key for signing by either specifying an existing non-expired
1908 key, generate a new key, or change the expire time of the existing key with
1909 <code>gpg</code>.
1910 </p>
1911 <p>To change the expiration of the currently used signing key with <code>gpg</code>,
1912 use the <code>KEYINFO</code> command (see <a href="#KEYINFO">KEYINFO</a>) to obtain the fingerprint of
1913 the signing key of the current data file, then change the expire time with
1914 <code>gpg</code>:
1915 </p>
1916 <div class="example">
1917 <pre class="example">gpg --homedir ~/.pwmd/.gnupg --edit-key &lt;fingerprint&gt;
1918 </pre></div>
1920 <p>Then use the <code>expire</code> command to set the new key expire date. When
1921 finished, use the <code>save</code> command to save your changes.
1922 </p>
1924 <hr>
1925 <a name="Signals"></a>
1926 <div class="header">
1928 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>
1929 </div>
1930 <a name="Recognized-signals"></a>
1931 <h2 class="chapter">46 Recognized signals</h2>
1933 <p>Sending the <em>SIGHUP</em> signal to a <code>pwmd</code> process will reload the
1934 configuration file and sending <em>SIGUSR1</em> will clear the entire file
1935 cache.
1936 </p>
1939 <hr>
1940 <a name="Concept-Index"></a>
1941 <div class="header">
1943 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>
1944 </div>
1945 <a name="Concept-Index-1"></a>
1946 <h2 class="unnumbered">Concept Index</h2>
1949 <a name="SEC_Overview"></a>
1950 <h2 class="shortcontents-heading">Short Table of Contents</h2>
1952 <div class="shortcontents">
1953 <ul class="no-bullet">
1954 <li><a name="stoc-Overview-of-pwmd" href="#toc-Overview-of-pwmd">1 Overview of <code>pwmd</code></a></li>
1955 <li><a name="stoc-Access-Control-1" href="#toc-Access-Control-1">2 Access Control</a></li>
1956 <li><a name="stoc-Cache-Control-1" href="#toc-Cache-Control-1">3 Cache Control</a></li>
1957 <li><a name="stoc-Invoking-pwmd" href="#toc-Invoking-pwmd">4 Invoking <code>pwmd</code></a></li>
1958 <li><a name="stoc-pwmd-configuration-file-options" href="#toc-pwmd-configuration-file-options">5 <code>pwmd</code> configuration file options</a></li>
1959 <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>
1960 <li><a name="stoc-Pinentry-configuration" href="#toc-Pinentry-configuration">7 Pinentry configuration</a></li>
1961 <li><a name="stoc-Protocol-commands-and-their-syntax" href="#toc-Protocol-commands-and-their-syntax">8 Protocol commands and their syntax</a></li>
1962 <li><a name="stoc-Modifying-element-attributes_002e" href="#toc-Modifying-element-attributes_002e">9 Modifying element attributes.</a></li>
1963 <li><a name="stoc-Setting-the-cache-timeout_002e" href="#toc-Setting-the-cache-timeout_002e">10 Setting the cache timeout.</a></li>
1964 <li><a name="stoc-Removing-a-cache-entry_002e" href="#toc-Removing-a-cache-entry_002e">11 Removing a cache entry.</a></li>
1965 <li><a name="stoc-Copying-an-element_002e" href="#toc-Copying-an-element_002e">12 Copying an element.</a></li>
1966 <li><a name="stoc-Deleting-an-element_002e" href="#toc-Deleting-an-element_002e">13 Deleting an element.</a></li>
1967 <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>
1968 <li><a name="stoc-Showing-the-XML-document_002e" href="#toc-Showing-the-XML-document_002e">15 Showing the XML document.</a></li>
1969 <li><a name="stoc-Generating-a-new-key_002e" href="#toc-Generating-a-new-key_002e">16 Generating a new key.</a></li>
1970 <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>
1971 <li><a name="stoc-Obtaining-a-configuration-value_002e" href="#toc-Obtaining-a-configuration-value_002e">18 Obtaining a configuration value.</a></li>
1972 <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>
1973 <li><a name="stoc-Showing-available-commands_002e" href="#toc-Showing-available-commands_002e">20 Showing available commands.</a></li>
1974 <li><a name="stoc-Creating-elements-from-XML_002e" href="#toc-Creating-elements-from-XML_002e">21 Creating elements from XML.</a></li>
1975 <li><a name="stoc-Testing-cache-status_002e" href="#toc-Testing-cache-status_002e">22 Testing cache status.</a></li>
1976 <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>
1977 <li><a name="stoc-Terminating-another-client_002e" href="#toc-Terminating-another-client_002e">24 Terminating another client.</a></li>
1978 <li><a name="stoc-Showing-document-elements_002e" href="#toc-Showing-document-elements_002e">25 Showing document elements.</a></li>
1979 <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>
1980 <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>
1981 <li><a name="stoc-Showing-available-data-files_002e" href="#toc-Showing-available-data-files_002e">28 Showing available data files.</a></li>
1982 <li><a name="stoc-Moving-an-element_002e" href="#toc-Moving-an-element_002e">29 Moving an element.</a></li>
1983 <li><a name="stoc-Testing-the-connection_002e" href="#toc-Testing-the-connection_002e">30 Testing the connection.</a></li>
1984 <li><a name="stoc-Opening-a-data-file_002e" href="#toc-Opening-a-data-file_002e">31 Opening a data file.</a></li>
1985 <li><a name="stoc-Setting-various-client-parameters_002e" href="#toc-Setting-various-client-parameters_002e">32 Setting various client parameters.</a></li>
1986 <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>
1987 <li><a name="stoc-Resolving-an-element_002e" href="#toc-Resolving-an-element_002e">34 Resolving an element.</a></li>
1988 <li><a name="stoc-Renaming-an-element_002e" href="#toc-Renaming-an-element_002e">35 Renaming an element.</a></li>
1989 <li><a name="stoc-Resetting-the-client-state_002e" href="#toc-Resetting-the-client-state_002e">36 Resetting the client state.</a></li>
1990 <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>
1991 <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>
1992 <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>
1993 <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>
1994 <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>
1995 <li><a name="stoc-Status-messages-and-their-meanings" href="#toc-Status-messages-and-their-meanings">42 Status messages and their meanings</a></li>
1996 <li><a name="stoc-The-target-attribute" href="#toc-The-target-attribute">43 The <code>target</code> attribute</a></li>
1997 <li><a name="stoc-Other-special-attributes" href="#toc-Other-special-attributes">44 Other special attributes</a></li>
1998 <li><a name="stoc-Key-Expiration-1" href="#toc-Key-Expiration-1">45 Key Expiration</a></li>
1999 <li><a name="stoc-Recognized-signals" href="#toc-Recognized-signals">46 Recognized signals</a></li>
2000 <li><a name="stoc-Concept-Index-1" href="#toc-Concept-Index-1">Concept Index</a></li>
2002 </ul>
2003 </div>
2005 <a name="SEC_Contents"></a>
2006 <h2 class="contents-heading">Table of Contents</h2>
2008 <div class="contents">
2009 <ul class="no-bullet">
2010 <li><a name="toc-Overview-of-pwmd" href="#Introduction">1 Overview of <code>pwmd</code></a></li>
2011 <li><a name="toc-Access-Control-1" href="#Access-Control">2 Access Control</a></li>
2012 <li><a name="toc-Cache-Control-1" href="#Cache-Control">3 Cache Control</a></li>
2013 <li><a name="toc-Invoking-pwmd" href="#Invoking">4 Invoking <code>pwmd</code></a></li>
2014 <li><a name="toc-pwmd-configuration-file-options" href="#Configuration">5 <code>pwmd</code> configuration file options</a></li>
2015 <li><a name="toc-Configuring-remote-connections-over-TLS_002e" href="#TLS">6 Configuring remote connections over TLS.</a></li>
2016 <li><a name="toc-Pinentry-configuration" href="#Pinentry">7 Pinentry configuration</a></li>
2017 <li><a name="toc-Protocol-commands-and-their-syntax" href="#Commands">8 Protocol commands and their syntax</a></li>
2018 <li><a name="toc-Modifying-element-attributes_002e" href="#ATTR">9 Modifying element attributes.</a></li>
2019 <li><a name="toc-Setting-the-cache-timeout_002e" href="#CACHETIMEOUT">10 Setting the cache timeout.</a></li>
2020 <li><a name="toc-Removing-a-cache-entry_002e" href="#CLEARCACHE">11 Removing a cache entry.</a></li>
2021 <li><a name="toc-Copying-an-element_002e" href="#COPY">12 Copying an element.</a></li>
2022 <li><a name="toc-Deleting-an-element_002e" href="#DELETE">13 Deleting an element.</a></li>
2023 <li><a name="toc-Deleting-a-key-from-the-key-ring_002e" href="#DELETEKEY">14 Deleting a key from the key ring.</a></li>
2024 <li><a name="toc-Showing-the-XML-document_002e" href="#DUMP">15 Showing the XML document.</a></li>
2025 <li><a name="toc-Generating-a-new-key_002e" href="#GENKEY">16 Generating a new key.</a></li>
2026 <li><a name="toc-Getting-the-content-of-an-element_002e" href="#GET">17 Getting the content of an element.</a></li>
2027 <li><a name="toc-Obtaining-a-configuration-value_002e" href="#GETCONFIG">18 Obtaining a configuration value.</a></li>
2028 <li><a name="toc-Obtaining-server-and-client-information_002e" href="#GETINFO">19 Obtaining server and client information.</a></li>
2029 <li><a name="toc-Showing-available-commands_002e" href="#HELP">20 Showing available commands.</a></li>
2030 <li><a name="toc-Creating-elements-from-XML_002e" href="#IMPORT">21 Creating elements from XML.</a></li>
2031 <li><a name="toc-Testing-cache-status_002e" href="#ISCACHED">22 Testing cache status.</a></li>
2032 <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>
2033 <li><a name="toc-Terminating-another-client_002e" href="#KILL">24 Terminating another client.</a></li>
2034 <li><a name="toc-Showing-document-elements_002e" href="#LIST">25 Showing document elements.</a></li>
2035 <li><a name="toc-Listing-keys-in-the-key-ring_002e" href="#LISTKEYS">26 Listing keys in the key ring.</a></li>
2036 <li><a name="toc-Locking-the-current-data-file_002e" href="#LOCK">27 Locking the current data file.</a></li>
2037 <li><a name="toc-Showing-available-data-files_002e" href="#LS">28 Showing available data files.</a></li>
2038 <li><a name="toc-Moving-an-element_002e" href="#MOVE">29 Moving an element.</a></li>
2039 <li><a name="toc-Testing-the-connection_002e" href="#NOP">30 Testing the connection.</a></li>
2040 <li><a name="toc-Opening-a-data-file_002e" href="#OPEN">31 Opening a data file.</a></li>
2041 <li><a name="toc-Setting-various-client-parameters_002e" href="#OPTION">32 Setting various client parameters.</a></li>
2042 <li><a name="toc-Changing-the-passphrase-for-a-key_002e" href="#PASSWD">33 Changing the passphrase for a key.</a></li>
2043 <li><a name="toc-Resolving-an-element_002e" href="#REALPATH">34 Resolving an element.</a></li>
2044 <li><a name="toc-Renaming-an-element_002e" href="#RENAME">35 Renaming an element.</a></li>
2045 <li><a name="toc-Resetting-the-client-state_002e" href="#RESET">36 Resetting the client state.</a></li>
2046 <li><a name="toc-Saving-document-changes-to-disk_002e" href="#SAVE">37 Saving document changes to disk.</a></li>
2047 <li><a name="toc-Modifying-the-content-of-an-element_002e" href="#STORE">38 Modifying the content of an element.</a></li>
2048 <li><a name="toc-Removing-a-data-file-lock_002e" href="#UNLOCK">39 Removing a data file lock.</a></li>
2049 <li><a name="toc-Modifying-more-than-one-element_002e" href="#XPATH">40 Modifying more than one element.</a></li>
2050 <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>
2051 <li><a name="toc-Status-messages-and-their-meanings" href="#Status-Messages">42 Status messages and their meanings</a></li>
2052 <li><a name="toc-The-target-attribute" href="#Target-Attribute">43 The <code>target</code> attribute</a></li>
2053 <li><a name="toc-Other-special-attributes" href="#Other-Attributes">44 Other special attributes</a></li>
2054 <li><a name="toc-Key-Expiration-1" href="#Key-Expiration">45 Key Expiration</a></li>
2055 <li><a name="toc-Recognized-signals" href="#Signals">46 Recognized signals</a></li>
2056 <li><a name="toc-Concept-Index-1" href="#Concept-Index">Concept Index</a></li>
2058 </ul>
2059 </div>
2061 <hr>
2065 </body>
2066 </html>