Fix no-dh and no-dsa
[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 10
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
119 =item L<B<dsa>|dsa(1)>
120
121 DSA Data Management.
122
123 =item L<B<dsaparam>|dsaparam(1)>
124
125 DSA Parameter Generation and Management. Superseded by
126 L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)>
127
128 =item L<B<ec>|ec(1)>
129
130 EC (Elliptic curve) key processing
131
132 =item L<B<ecparam>|ecparam(1)>
133
134 EC parameter manipulation and generation
135
136 =item L<B<enc>|enc(1)>
137
138 Encoding with Ciphers.
139
140 =item L<B<engine>|engine(1)>
141
142 Engine (loadable module) information and manipulation.
143
144 =item L<B<errstr>|errstr(1)>
145
146 Error Number to Error String Conversion.
147
148 =item B<gendh>
149
150 Generation of Diffie-Hellman Parameters.
151 Obsoleted by L<B<dhparam>|dhparam(1)>.
152
153 =item L<B<gendsa>|gendsa(1)>
154
155 Generation of DSA Private Key from Parameters. Superseded by
156 L<B<genpkey>|genpkey(1)> and L<B<pkey>|pkey(1)>
157
158 =item L<B<genpkey>|genpkey(1)>
159
160 Generation of Private Key or Parameters.
161
162 =item L<B<genrsa>|genrsa(1)>
163
164 Generation of RSA Private Key. Superseded by L<B<genpkey>|genpkey(1)>.
165
166 =item L<B<nseq>|nseq(1)>
167
168 Create or examine a Netscape certificate sequence
169
170 =item L<B<ocsp>|ocsp(1)>
171
172 Online Certificate Status Protocol utility.
173
174 =item L<B<passwd>|passwd(1)>
175
176 Generation of hashed passwords.
177
178 =item L<B<pkcs12>|pkcs12(1)>
179
180 PKCS#12 Data Management.
181
182 =item L<B<pkcs7>|pkcs7(1)>
183
184 PKCS#7 Data Management.
185
186 =item L<B<pkey>|pkey(1)>
187
188 Public and private key management.
189
190 =item L<B<pkeyparam>|pkeyparam(1)>
191
192 Public key algorithm parameter management.
193
194 =item L<B<pkeyutl>|pkeyutl(1)>
195
196 Public key algorithm cryptographic operation utility.
197
198 =item L<B<rand>|rand(1)>
199
200 Generate pseudo-random bytes.
201
202 =item L<B<req>|req(1)>
203
204 PKCS#10 X.509 Certificate Signing Request (CSR) Management.
205
206 =item L<B<rsa>|rsa(1)>
207
208 RSA key management.
209
210
211 =item L<B<rsautl>|rsautl(1)>
212
213 RSA utility for signing, verification, encryption, and decryption. Superseded
214 by  L<B<pkeyutl>|pkeyutl(1)>
215
216 =item L<B<s_client>|s_client(1)>
217
218 This implements a generic SSL/TLS client which can establish a transparent
219 connection to a remote server speaking SSL/TLS. It's intended for testing
220 purposes only and provides only rudimentary interface functionality but
221 internally uses mostly all functionality of the OpenSSL B<ssl> library.
222
223 =item L<B<s_server>|s_server(1)>
224
225 This implements a generic SSL/TLS server which accepts connections from remote
226 clients speaking SSL/TLS. It's intended for testing purposes only and provides
227 only rudimentary interface functionality but internally uses mostly all
228 functionality of the OpenSSL B<ssl> library.  It provides both an own command
229 line oriented protocol for testing SSL functions and a simple HTTP response
230 facility to emulate an SSL/TLS-aware webserver.
231
232 =item L<B<s_time>|s_time(1)>
233
234 SSL Connection Timer.
235
236 =item L<B<sess_id>|sess_id(1)>
237
238 SSL Session Data Management.
239
240 =item L<B<smime>|smime(1)>
241
242 S/MIME mail processing.
243
244 =item L<B<speed>|speed(1)>
245
246 Algorithm Speed Measurement.
247
248 =item L<B<spkac>|spkac(1)>
249
250 SPKAC printing and generating utility
251
252 =item L<B<ts>|ts(1)>
253
254 Time Stamping Authority tool (client/server)
255
256 =item L<B<verify>|verify(1)>
257
258 X.509 Certificate Verification.
259
260 =item L<B<version>|version(1)>
261
262 OpenSSL Version Information.
263
264 =item L<B<x509>|x509(1)>
265
266 X.509 Certificate Data Management.
267
268 =back
269
270 =head2 Message Digest Commands
271
272 =over 10
273
274 =item B<md2>
275
276 MD2 Digest
277
278 =item B<md5>
279
280 MD5 Digest
281
282 =item B<mdc2>
283
284 MDC2 Digest
285
286 =item B<rmd160>
287
288 RMD-160 Digest
289
290 =item B<sha>
291
292 SHA Digest
293
294 =item B<sha1>
295
296 SHA-1 Digest
297
298 =item B<sha224>
299
300 SHA-224 Digest
301
302 =item B<sha256>
303
304 SHA-256 Digest
305
306 =item B<sha384>
307
308 SHA-384 Digest
309
310 =item B<sha512>
311
312 SHA-512 Digest
313
314 =back
315
316 =head2 Encoding and Cipher Commands
317
318 =over 10
319
320 =item B<base64>
321
322 Base64 Encoding
323
324 =item B<bf bf-cbc bf-cfb bf-ecb bf-ofb>
325
326 Blowfish Cipher
327
328 =item B<cast cast-cbc>
329
330 CAST Cipher
331
332 =item B<cast5-cbc cast5-cfb cast5-ecb cast5-ofb>
333
334 CAST5 Cipher
335
336 =item B<des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb>
337
338 DES Cipher
339
340 =item B<des3 desx des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb>
341
342 Triple-DES Cipher
343
344 =item B<idea idea-cbc idea-cfb idea-ecb idea-ofb>
345
346 IDEA Cipher
347
348 =item B<rc2 rc2-cbc rc2-cfb rc2-ecb rc2-ofb>
349
350 RC2 Cipher
351
352 =item B<rc4>
353
354 RC4 Cipher
355
356 =item B<rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb>
357
358 RC5 Cipher
359
360 =back
361
362 =head1 OPTIONS
363
364 Details of which options are available depend on the specific command.
365 This section describes some common options with common behavior.
366
367 =head2 Common Options
368
369 =over 10
370
371 =item B<-help>
372
373 Provides a terse summary of all options.
374
375 =back
376
377 =head2 Pass Phrase Options
378
379 Several commands accept password arguments, typically using B<-passin>
380 and B<-passout> for input and output passwords respectively. These allow
381 the password to be obtained from a variety of sources. Both of these
382 options take a single argument whose format is described below. If no
383 password argument is given and a password is required then the user is
384 prompted to enter one: this will typically be read from the current
385 terminal with echoing turned off.
386
387 =over 10
388
389 =item B<pass:password>
390
391 the actual password is B<password>. Since the password is visible
392 to utilities (like 'ps' under Unix) this form should only be used
393 where security is not important.
394
395 =item B<env:var>
396
397 obtain the password from the environment variable B<var>. Since
398 the environment of other processes is visible on certain platforms
399 (e.g. ps under certain Unix OSes) this option should be used with caution.
400
401 =item B<file:pathname>
402
403 the first line of B<pathname> is the password. If the same B<pathname>
404 argument is supplied to B<-passin> and B<-passout> arguments then the first
405 line will be used for the input password and the next line for the output
406 password. B<pathname> need not refer to a regular file: it could for example
407 refer to a device or named pipe.
408
409 =item B<fd:number>
410
411 read the password from the file descriptor B<number>. This can be used to
412 send the data via a pipe for example.
413
414 =item B<stdin>
415
416 read the password from standard input.
417
418 =back
419
420 =head1 SEE ALSO
421
422 L<asn1parse(1)>, L<ca(1)>, L<config(5)>,
423 L<crl(1)>, L<crl2pkcs7(1)>, L<dgst(1)>,
424 L<dhparam(1)>, L<dsa(1)>, L<dsaparam(1)>,
425 L<enc(1)>, L<engine(1)>, L<gendsa(1)>, L<genpkey(1)>,
426 L<genrsa(1)>, L<nseq(1)>, L<openssl(1)>,
427 L<passwd(1)>,
428 L<pkcs12(1)>, L<pkcs7(1)>, L<pkcs8(1)>,
429 L<rand(1)>, L<req(1)>, L<rsa(1)>,
430 L<rsautl(1)>, L<s_client(1)>,
431 L<s_server(1)>, L<s_time(1)>,
432 L<smime(1)>, L<spkac(1)>,
433 L<verify(1)>, L<version(1)>, L<x509(1)>,
434 L<crypto(7)>, L<ssl(7)>, L<x509v3_config(5)>
435
436 =head1 HISTORY
437
438 The B<list->I<XXX>B<-algorithms> pseudo-commands were added in OpenSSL 1.0.0;
439 For notes on the availability of other commands, see their individual
440 manual pages.
441
442 =head1 COPYRIGHT
443
444 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
445
446 Licensed under the OpenSSL license (the "License").  You may not use
447 this file except in compliance with the License.  You can obtain a copy
448 in the file LICENSE in the source distribution or at
449 L<https://www.openssl.org/source/license.html>.
450
451 =cut