doc/man1/openssl.pod: Add missing commands and links
[openssl.git] / doc / man1 / openssl.pod
1 =pod
2
3 =head1 NAME
4
5 openssl - OpenSSL command line tool
6
7 =head1 SYNOPSIS
8
9 B<openssl>
10 I<command>
11 [ I<command_opts> ]
12 [ I<command_args> ]
13
14 B<openssl> B<list> [ B<standard-commands> | B<digest-commands> | B<cipher-commands> | B<cipher-algorithms> | B<digest-algorithms> | B<public-key-algorithms>]
15
16 B<openssl> B<no->I<XXX> [ I<arbitrary options> ]
17
18 =head1 DESCRIPTION
19
20 OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL
21 v2/v3) and Transport Layer Security (TLS v1) network protocols and related
22 cryptography standards required by them.
23
24 The B<openssl> program is a command line tool for using the various
25 cryptography functions of OpenSSL's B<crypto> library from the shell.
26 It can be used for
27
28  o  Creation and management of private keys, public keys and parameters
29  o  Public key cryptographic operations
30  o  Creation of X.509 certificates, CSRs and CRLs
31  o  Calculation of Message Digests
32  o  Encryption and Decryption with Ciphers
33  o  SSL/TLS Client and Server Tests
34  o  Handling of S/MIME signed or encrypted mail
35  o  Time Stamp requests, generation and verification
36
37 =head1 COMMAND SUMMARY
38
39 The B<openssl> program provides a rich variety of commands (I<command> in the
40 SYNOPSIS above), each of which often has a wealth of options and arguments
41 (I<command_opts> and I<command_args> in the SYNOPSIS).
42
43 Many commands use an external configuration file for some or all of their
44 arguments and have a B<-config> option to specify that file.
45 The environment variable B<OPENSSL_CONF> can be used to specify
46 the location of the file.
47 If the environment variable is not specified, then the file is named
48 B<openssl.cnf> in the default certificate storage area, whose value
49 depends on the configuration flags specified when the OpenSSL
50 was built.
51
52 The list parameters B<standard-commands>, B<digest-commands>,
53 and B<cipher-commands> output a list (one entry per line) of the names
54 of all standard commands, message digest commands, or cipher commands,
55 respectively, that are available in the present B<openssl> utility.
56
57 The list parameters B<cipher-algorithms> and
58 B<digest-algorithms> list all cipher and message digest names, one entry per line. Aliases are listed as:
59
60  from => to
61
62 The list parameter B<public-key-algorithms> lists all supported public
63 key algorithms.
64
65 The command B<no->I<XXX> tests whether a command of the
66 specified name is available.  If no command named I<XXX> exists, it
67 returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1
68 and prints I<XXX>.  In both cases, the output goes to B<stdout> and
69 nothing is printed to B<stderr>.  Additional command line arguments
70 are always ignored.  Since for each cipher there is a command of the
71 same name, this provides an easy way for shell scripts to test for the
72 availability of ciphers in the B<openssl> program.  (B<no->I<XXX> is
73 not able to detect pseudo-commands such as B<quit>,
74 B<list>, or B<no->I<XXX> itself.)
75
76 =head2 Standard Commands
77
78 =over 4
79
80 =item L<B<asn1parse>|asn1parse(1)>
81
82 Parse an ASN.1 sequence.
83
84 =item L<B<ca>|ca(1)>
85
86 Certificate Authority (CA) Management.
87
88 =item L<B<ciphers>|ciphers(1)>
89
90 Cipher Suite Description Determination.
91
92 =item L<B<cms>|cms(1)>
93
94 CMS (Cryptographic Message Syntax) utility.
95
96 =item L<B<crl>|crl(1)>
97
98 Certificate Revocation List (CRL) Management.
99
100 =item L<B<crl2pkcs7>|crl2pkcs7(1)>
101
102 CRL to PKCS#7 Conversion.
103
104 =item L<B<dgst>|dgst(1)>
105
106 Message Digest Calculation.
107
108 =item B<dh>
109
110 Diffie-Hellman Parameter Management.
111 Obsoleted by L<B<dhparam>|dhparam(1)>.
112
113 =item L<B<dhparam>|dhparam(1)>
114
115 Generation and Management of Diffie-Hellman Parameters. Superseded by
116 L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)>.
117
118 =item L<B<dsa>|dsa(1)>
119
120 DSA Data Management.
121
122 =item L<B<dsaparam>|dsaparam(1)>
123
124 DSA Parameter Generation and Management. Superseded by
125 L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)>.
126
127 =item L<B<ec>|ec(1)>
128
129 EC (Elliptic curve) key processing.
130
131 =item L<B<ecparam>|ecparam(1)>
132
133 EC parameter manipulation and generation.
134
135 =item L<B<enc>|enc(1)>
136
137 Encoding with Ciphers.
138
139 =item L<B<engine>|engine(1)>
140
141 Engine (loadable module) information and manipulation.
142
143 =item L<B<errstr>|errstr(1)>
144
145 Error Number to Error String Conversion.
146
147 =item B<gendh>
148
149 Generation of Diffie-Hellman Parameters.
150 Obsoleted by L<B<dhparam>|dhparam(1)>.
151
152 =item L<B<gendsa>|gendsa(1)>
153
154 Generation of DSA Private Key from Parameters. Superseded by
155 L<B<genpkey>|genpkey(1)> and L<B<pkey>|pkey(1)>.
156
157 =item L<B<genpkey>|genpkey(1)>
158
159 Generation of Private Key or Parameters.
160
161 =item L<B<genrsa>|genrsa(1)>
162
163 Generation of RSA Private Key. Superseded by L<B<genpkey>|genpkey(1)>.
164
165 =item L<B<nseq>|nseq(1)>
166
167 Create or examine a Netscape certificate sequence.
168
169 =item L<B<ocsp>|ocsp(1)>
170
171 Online Certificate Status Protocol utility.
172
173 =item L<B<passwd>|passwd(1)>
174
175 Generation of hashed passwords.
176
177 =item L<B<pkcs12>|pkcs12(1)>
178
179 PKCS#12 Data Management.
180
181 =item L<B<pkcs7>|pkcs7(1)>
182
183 PKCS#7 Data Management.
184
185 =item L<B<pkcs8>|pkcs8(1)>
186
187 PKCS#8 format private key conversion tool.
188
189 =item L<B<pkey>|pkey(1)>
190
191 Public and private key management.
192
193 =item L<B<pkeyparam>|pkeyparam(1)>
194
195 Public key algorithm parameter management.
196
197 =item L<B<pkeyutl>|pkeyutl(1)>
198
199 Public key algorithm cryptographic operation utility.
200
201 =item L<B<prime>|prime(1)>
202
203 Compute prime numbers.
204
205 =item L<B<rand>|rand(1)>
206
207 Generate pseudo-random bytes.
208
209 =item L<B<rehash>|rehash(1)>
210
211 Create symbolic links to certficate and CRL files named by the hash values.
212
213 =item L<B<req>|req(1)>
214
215 PKCS#10 X.509 Certificate Signing Request (CSR) Management.
216
217 =item L<B<rsa>|rsa(1)>
218
219 RSA key management.
220
221
222 =item L<B<rsautl>|rsautl(1)>
223
224 RSA utility for signing, verification, encryption, and decryption. Superseded
225 by  L<B<pkeyutl>|pkeyutl(1)>.
226
227 =item L<B<s_client>|s_client(1)>
228
229 This implements a generic SSL/TLS client which can establish a transparent
230 connection to a remote server speaking SSL/TLS. It's intended for testing
231 purposes only and provides only rudimentary interface functionality but
232 internally uses mostly all functionality of the OpenSSL B<ssl> library.
233
234 =item L<B<s_server>|s_server(1)>
235
236 This implements a generic SSL/TLS server which accepts connections from remote
237 clients speaking SSL/TLS. It's intended for testing purposes only and provides
238 only rudimentary interface functionality but internally uses mostly all
239 functionality of the OpenSSL B<ssl> library.  It provides both an own command
240 line oriented protocol for testing SSL functions and a simple HTTP response
241 facility to emulate an SSL/TLS-aware webserver.
242
243 =item L<B<s_time>|s_time(1)>
244
245 SSL Connection Timer.
246
247 =item L<B<sess_id>|sess_id(1)>
248
249 SSL Session Data Management.
250
251 =item L<B<smime>|smime(1)>
252
253 S/MIME mail processing.
254
255 =item L<B<speed>|speed(1)>
256
257 Algorithm Speed Measurement.
258
259 =item L<B<spkac>|spkac(1)>
260
261 SPKAC printing and generating utility.
262
263 =item L<B<srp>|srp(1)>
264
265 Maintain SRP password file.
266
267 =item L<B<storeutl>|storeutl(1)>
268
269 Utility to list and display certificates, keys, CRLs, etc.
270
271 =item L<B<ts>|ts(1)>
272
273 Time Stamping Authority tool (client/server).
274
275 =item L<B<verify>|verify(1)>
276
277 X.509 Certificate Verification.
278
279 =item L<B<version>|version(1)>
280
281 OpenSSL Version Information.
282
283 =item L<B<x509>|x509(1)>
284
285 X.509 Certificate Data Management.
286
287 =back
288
289 =head2 Message Digest Commands
290
291 =over 4
292
293 =item B<md2>
294
295 MD2 Digest
296
297 =item B<md5>
298
299 MD5 Digest
300
301 =item B<mdc2>
302
303 MDC2 Digest
304
305 =item B<rmd160>
306
307 RMD-160 Digest
308
309 =item B<sha>
310
311 SHA Digest
312
313 =item B<sha1>
314
315 SHA-1 Digest
316
317 =item B<sha224>
318
319 SHA-224 Digest
320
321 =item B<sha256>
322
323 SHA-256 Digest
324
325 =item B<sha384>
326
327 SHA-384 Digest
328
329 =item B<sha512>
330
331 SHA-512 Digest
332
333 =back
334
335 =head2 Encoding and Cipher Commands
336
337 =over 4
338
339 =item B<base64>
340
341 Base64 Encoding
342
343 =item B<bf bf-cbc bf-cfb bf-ecb bf-ofb>
344
345 Blowfish Cipher
346
347 =item B<cast cast-cbc>
348
349 CAST Cipher
350
351 =item B<cast5-cbc cast5-cfb cast5-ecb cast5-ofb>
352
353 CAST5 Cipher
354
355 =item B<des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb>
356
357 DES Cipher
358
359 =item B<des3 desx des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb>
360
361 Triple-DES Cipher
362
363 =item B<idea idea-cbc idea-cfb idea-ecb idea-ofb>
364
365 IDEA Cipher
366
367 =item B<rc2 rc2-cbc rc2-cfb rc2-ecb rc2-ofb>
368
369 RC2 Cipher
370
371 =item B<rc4>
372
373 RC4 Cipher
374
375 =item B<rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb>
376
377 RC5 Cipher
378
379 =back
380
381 =head1 OPTIONS
382
383 Details of which options are available depend on the specific command.
384 This section describes some common options with common behavior.
385
386 =head2 Common Options
387
388 =over 4
389
390 =item B<-help>
391
392 Provides a terse summary of all options.
393
394 =back
395
396 =head2 Pass Phrase Options
397
398 Several commands accept password arguments, typically using B<-passin>
399 and B<-passout> for input and output passwords respectively. These allow
400 the password to be obtained from a variety of sources. Both of these
401 options take a single argument whose format is described below. If no
402 password argument is given and a password is required then the user is
403 prompted to enter one: this will typically be read from the current
404 terminal with echoing turned off.
405
406 =over 4
407
408 =item B<pass:password>
409
410 The actual password is B<password>. Since the password is visible
411 to utilities (like 'ps' under Unix) this form should only be used
412 where security is not important.
413
414 =item B<env:var>
415
416 Obtain the password from the environment variable B<var>. Since
417 the environment of other processes is visible on certain platforms
418 (e.g. ps under certain Unix OSes) this option should be used with caution.
419
420 =item B<file:pathname>
421
422 The first line of B<pathname> is the password. If the same B<pathname>
423 argument is supplied to B<-passin> and B<-passout> arguments then the first
424 line will be used for the input password and the next line for the output
425 password. B<pathname> need not refer to a regular file: it could for example
426 refer to a device or named pipe.
427
428 =item B<fd:number>
429
430 Read the password from the file descriptor B<number>. This can be used to
431 send the data via a pipe for example.
432
433 =item B<stdin>
434
435 Read the password from standard input.
436
437 =back
438
439 =head1 SEE ALSO
440
441 L<asn1parse(1)>, L<ca(1)>, L<ciphers(1)>, L<cms(1)>, L<config(5)>,
442 L<crl(1)>, L<crl2pkcs7(1)>, L<dgst(1)>,
443 L<dhparam(1)>, L<dsa(1)>, L<dsaparam(1)>,
444 L<ec(1)>, L<ecparam(1)>,
445 L<enc(1)>, L<engine(1)>, L<errstr(1)>, L<gendsa(1)>, L<genpkey(1)>,
446 L<genrsa(1)>, L<nseq(1)>, L<ocsp(1)>,
447 L<passwd(1)>,
448 L<pkcs12(1)>, L<pkcs7(1)>, L<pkcs8(1)>,
449 L<pkey(1)>, L<pkeyparam(1)>, L<pkeyutl(1)>, L<prime(1)>,
450 L<rand(1)>, L<rehash(1)>, L<req(1)>, L<rsa(1)>,
451 L<rsautl(1)>, L<s_client(1)>,
452 L<s_server(1)>, L<s_time(1)>, L<sess_id(1)>,
453 L<smime(1)>, L<speed(1)>, L<spkac(1)>, L<srp(1)>, L<storeutl(1)>,
454 L<ts(1)>,
455 L<verify(1)>, L<version(1)>, L<x509(1)>,
456 L<crypto(7)>, L<ssl(7)>, L<x509v3_config(5)>
457
458 =head1 HISTORY
459
460 The B<list->I<XXX>B<-algorithms> pseudo-commands were added in OpenSSL 1.0.0;
461 For notes on the availability of other commands, see their individual
462 manual pages.
463
464 =head1 COPYRIGHT
465
466 Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
467
468 Licensed under the OpenSSL license (the "License").  You may not use
469 this file except in compliance with the License.  You can obtain a copy
470 in the file LICENSE in the source distribution or at
471 L<https://www.openssl.org/source/license.html>.
472
473 =cut