summaryrefslogtreecommitdiffstats
path: root/security/nss/doc/cmsutil.xml
blob: c7d2408d32ef4d8ecfcdde8470485a200f746ed3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY date SYSTEM "date.xml">
<!ENTITY version SYSTEM "version.xml">
]>

<refentry id="cmsutil">

  <refentryinfo>
    <date>&date;</date>
    <title>NSS Security Tools</title>
    <productname>nss-tools</productname>
    <productnumber>&version;</productnumber>
  </refentryinfo>

  <refmeta>
    <refentrytitle>CMSUTIL</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>cmsutil</refname>
    <refpurpose>Performs basic cryptograpic operations, such as encryption and decryption, on Cryptographic Message Syntax (CMS) messages.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>cmsutil</command>
      <arg><replaceable>options</replaceable></arg>
      <arg>[<replaceable>arguments</replaceable>]</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsection>
    <title>STATUS</title>
    <para>This documentation is still work in progress. Please contribute to the initial review in <ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=836477">Mozilla NSS bug 836477</ulink>
    </para>
  </refsection>

  <refsection id="description">
    <title>Description</title>

    <para>The <command>cmsutil</command> command-line uses the S/MIME Toolkit to perform basic operations, such as encryption and decryption, on Cryptographic Message Syntax (CMS) messages.
	</para>
	<para>
To run cmsutil, type the command cmsutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section. 
Each command takes one option. Each option may take zero or more arguments. 
To see a usage string, issue the command without options. 
	</para>

  </refsection>

  <refsection id="options">
    <title>Options and Arguments</title>
	<para>
	</para>
   	<para><command>Options</command></para> 
   	<para>
Options specify an action. Option arguments modify an action. 
The options and arguments for the cmsutil command are defined as follows:
    </para>
    <variablelist>
      <varlistentry>
        <term>-C</term>
        <listitem><para>Encrypt a message.</para></listitem>
      </varlistentry>
    
      <varlistentry>
        <term>-D </term>
        <listitem><para>Decode a message.</para></listitem>
      </varlistentry>

      <varlistentry>
        <term>-E </term>
        <listitem><para>Envelope a message.</para></listitem>
      </varlistentry>

      <varlistentry>
        <term>-O </term>
        <listitem><para>Create a certificates-only message.</para></listitem>
      </varlistentry>

      <varlistentry>
        <term>-S </term>
        <listitem><para>Sign a message.</para></listitem>
      </varlistentry>

    </variablelist>

	<para><command>Arguments</command></para>
	<para>Option arguments modify an action.</para>
	<variablelist>
      <varlistentry>
        <term>-b </term>
        <listitem>
          <para>Decode a batch of files named in infile.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-c content </term>
        <listitem>
          <para>Use this detached content (decode only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-d dbdir</term>
        <listitem>
          <para>Specify the key/certificate database directory (default is ".")</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-e envfile</term>
        <listitem>
          <para>Specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message. If this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-f pwfile</term>
        <listitem>
          <para>Use password file to set password on all PKCS#11 tokens.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-G</term>
        <listitem>
          <para>Include a signing time attribute (sign only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-H hash</term>
        <listitem>
          <para>Use specified hash algorithm (default:SHA1).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-h num</term>
        <listitem>
          <para>Generate email headers with info about CMS message (decode only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-i infile</term>
        <listitem>
          <para>Use infile as a source of data (default is stdin).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-k</term>
        <listitem>
          <para>Keep decoded encryption certs in permanent cert db.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-N nickname</term>
        <listitem>
          <para>Specify nickname of certificate to sign with (sign only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-n </term>
        <listitem>
          <para>Suppress output of contents (decode only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-o outfile</term>
        <listitem>
          <para>Use outfile as a destination of data (default is stdout).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-P</term>
        <listitem>
          <para>Include an S/MIME capabilities attribute.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-p password</term>
        <listitem>
          <para>Use password as key database password.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-r recipient1,recipient2, ...</term>
        <listitem>
          <para>
Specify list of recipients (email addresses) for an encrypted or enveloped message. 
For certificates-only message, list of certificates to send.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-T</term>
        <listitem>
          <para>Suppress content in CMS message (sign only).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-u certusage</term>
        <listitem>
          <para>Set type of cert usage (default is certUsageEmailSigner).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-v</term>
        <listitem>
          <para>Print debugging information.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-Y ekprefnick</term>
        <listitem>
          <para>Specify an encryption key preference by nickname.</para>
        </listitem>
      </varlistentry>

    </variablelist>

  </refsection>

  <refsection id="usage">
    <title>Usage</title>
    <para>Encrypt Example</para>
      <programlisting>
cmsutil -C [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ." -e envfile
      </programlisting>

    <para>Decode Example</para>
      <programlisting>
cmsutil -D [-i infile] [-o outfile] [-d dbdir] [-p password] [-c content] [-n] [-h num]
      </programlisting>

    <para>Envelope Example</para>
      <programlisting>
cmsutil -E [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, ..."
      </programlisting>

    <para>Certificate-only Example</para>
      <programlisting>
cmsutil -O [-i infile] [-o outfile] [-d dbdir] [-p password] -r "cert1,cert2, . . ."
      </programlisting>

    <para>Sign Message Example</para>
      <programlisting>
cmsutil -S [-i infile] [-o outfile] [-d dbdir] [-p password] -N nickname[-TGP] [-Y ekprefnick]
      </programlisting>

  </refsection>

  <refsection id="seealso">
    <title>See also</title>
    <para>certutil(1)</para>
  </refsection>

<!-- don't change -->
  <refsection id="resources">
    <title>Additional Resources</title>
	<para>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <ulink url="http://www.mozilla.org/projects/security/pki/nss/">http://www.mozilla.org/projects/security/pki/nss/</ulink>. The NSS site relates directly to NSS code changes and releases.</para>
	<para>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</para>
	<para>IRC: Freenode at #dogtag-pki</para>
  </refsection>

<!-- fill in your name first; keep the other names for reference -->
  <refsection id="authors">
    <title>Authors</title>
    <para>The NSS tools were written and maintained by developers with Netscape, Red Hat,  Sun, Oracle, Mozilla, and Google.</para>
    <para>
	Authors: Elio Maldonado &lt;emaldona@redhat.com>, Deon Lackey &lt;dlackey@redhat.com>.
    </para>
  </refsection>

<!-- don't change -->
  <refsection id="license">
    <title>LICENSE</title>
    <para>Licensed under the Mozilla Public License, v. 2.0.  If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
    </para>
  </refsection>

</refentry>