]> CyberLeo.Net >> Repos - FreeBSD/releng/9.3.git/blob - secure/usr.bin/openssl/man/openssl.1
Fix multiple OpenSSL vulnerabilities.
[FreeBSD/releng/9.3.git] / secure / usr.bin / openssl / man / openssl.1
1 .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is turned on, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{
60 .    if \nF \{
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 .        if !\nF==2 \{
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "OPENSSL 1"
136 .TH OPENSSL 1 "2015-12-03" "0.9.8zh" "OpenSSL"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 openssl \- OpenSSL command line tool
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 \&\fBopenssl\fR
146 \&\fIcommand\fR
147 [ \fIcommand_opts\fR ]
148 [ \fIcommand_args\fR ]
149 .PP
150 \&\fBopenssl\fR [ \fBlist-standard-commands\fR | \fBlist-message-digest-commands\fR | \fBlist-cipher-commands\fR ]
151 .PP
152 \&\fBopenssl\fR \fBno\-\fR\fI\s-1XXX\s0\fR [ \fIarbitrary options\fR ]
153 .SH "DESCRIPTION"
154 .IX Header "DESCRIPTION"
155 OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (\s-1SSL\s0
156 v2/v3) and Transport Layer Security (\s-1TLS\s0 v1) network protocols and related
157 cryptography standards required by them.
158 .PP
159 The \fBopenssl\fR program is a command line tool for using the various
160 cryptography functions of OpenSSL's \fBcrypto\fR library from the shell. 
161 It can be used for
162 .PP
163 .Vb 6
164 \& o  Creation of RSA, DH and DSA key parameters
165 \& o  Creation of X.509 certificates, CSRs and CRLs 
166 \& o  Calculation of Message Digests
167 \& o  Encryption and Decryption with Ciphers
168 \& o  SSL/TLS Client and Server Tests
169 \& o  Handling of S/MIME signed or encrypted mail
170 .Ve
171 .SH "COMMAND SUMMARY"
172 .IX Header "COMMAND SUMMARY"
173 The \fBopenssl\fR program provides a rich variety of commands (\fIcommand\fR in the
174 \&\s-1SYNOPSIS\s0 above), each of which often has a wealth of options and arguments
175 (\fIcommand_opts\fR and \fIcommand_args\fR in the \s-1SYNOPSIS\s0).
176 .PP
177 The pseudo-commands \fBlist-standard-commands\fR, \fBlist-message-digest-commands\fR,
178 and \fBlist-cipher-commands\fR output a list (one entry per line) of the names
179 of all standard commands, message digest commands, or cipher commands,
180 respectively, that are available in the present \fBopenssl\fR utility.
181 .PP
182 The pseudo-command \fBno\-\fR\fI\s-1XXX\s0\fR tests whether a command of the
183 specified name is available.  If no command named \fI\s-1XXX\s0\fR exists, it
184 returns 0 (success) and prints \fBno\-\fR\fI\s-1XXX\s0\fR; otherwise it returns 1
185 and prints \fI\s-1XXX\s0\fR.  In both cases, the output goes to \fBstdout\fR and
186 nothing is printed to \fBstderr\fR.  Additional command line arguments
187 are always ignored.  Since for each cipher there is a command of the
188 same name, this provides an easy way for shell scripts to test for the
189 availability of ciphers in the \fBopenssl\fR program.  (\fBno\-\fR\fI\s-1XXX\s0\fR is
190 not able to detect pseudo-commands such as \fBquit\fR,
191 \&\fBlist\-\fR\fI...\fR\fB\-commands\fR, or \fBno\-\fR\fI\s-1XXX\s0\fR itself.)
192 .SS "\s-1STANDARD COMMANDS\s0"
193 .IX Subsection "STANDARD COMMANDS"
194 .IP "\fBasn1parse\fR" 10
195 .IX Item "asn1parse"
196 Parse an \s-1ASN.1\s0 sequence.
197 .IP "\fBca\fR" 10
198 .IX Item "ca"
199 Certificate Authority (\s-1CA\s0) Management.
200 .IP "\fBciphers\fR" 10
201 .IX Item "ciphers"
202 Cipher Suite Description Determination.
203 .IP "\fBcrl\fR" 10
204 .IX Item "crl"
205 Certificate Revocation List (\s-1CRL\s0) Management.
206 .IP "\fBcrl2pkcs7\fR" 10
207 .IX Item "crl2pkcs7"
208 \&\s-1CRL\s0 to PKCS#7 Conversion.
209 .IP "\fBdgst\fR" 10
210 .IX Item "dgst"
211 Message Digest Calculation.
212 .IP "\fBdh\fR" 10
213 .IX Item "dh"
214 Diffie-Hellman Parameter Management.
215 Obsoleted by \fBdhparam\fR.
216 .IP "\fBdsa\fR" 10
217 .IX Item "dsa"
218 \&\s-1DSA\s0 Data Management.
219 .IP "\fBdsaparam\fR" 10
220 .IX Item "dsaparam"
221 \&\s-1DSA\s0 Parameter Generation.
222 .IP "\fBenc\fR" 10
223 .IX Item "enc"
224 Encoding with Ciphers.
225 .IP "\fBerrstr\fR" 10
226 .IX Item "errstr"
227 Error Number to Error String Conversion.
228 .IP "\fBdhparam\fR" 10
229 .IX Item "dhparam"
230 Generation and Management of Diffie-Hellman Parameters.
231 .IP "\fBgendh\fR" 10
232 .IX Item "gendh"
233 Generation of Diffie-Hellman Parameters.
234 Obsoleted by \fBdhparam\fR.
235 .IP "\fBgendsa\fR" 10
236 .IX Item "gendsa"
237 Generation of \s-1DSA\s0 Parameters.
238 .IP "\fBgenrsa\fR" 10
239 .IX Item "genrsa"
240 Generation of \s-1RSA\s0 Parameters.
241 .IP "\fBocsp\fR" 10
242 .IX Item "ocsp"
243 Online Certificate Status Protocol utility.
244 .IP "\fBpasswd\fR" 10
245 .IX Item "passwd"
246 Generation of hashed passwords.
247 .IP "\fBpkcs12\fR" 10
248 .IX Item "pkcs12"
249 PKCS#12 Data Management.
250 .IP "\fBpkcs7\fR" 10
251 .IX Item "pkcs7"
252 PKCS#7 Data Management.
253 .IP "\fBrand\fR" 10
254 .IX Item "rand"
255 Generate pseudo-random bytes.
256 .IP "\fBreq\fR" 10
257 .IX Item "req"
258 X.509 Certificate Signing Request (\s-1CSR\s0) Management.
259 .IP "\fBrsa\fR" 10
260 .IX Item "rsa"
261 \&\s-1RSA\s0 Data Management.
262 .IP "\fBrsautl\fR" 10
263 .IX Item "rsautl"
264 \&\s-1RSA\s0 utility for signing, verification, encryption, and decryption.
265 .IP "\fBs_client\fR" 10
266 .IX Item "s_client"
267 This implements a generic \s-1SSL/TLS\s0 client which can establish a transparent
268 connection to a remote server speaking \s-1SSL/TLS.\s0 It's intended for testing
269 purposes only and provides only rudimentary interface functionality but
270 internally uses mostly all functionality of the OpenSSL \fBssl\fR library.
271 .IP "\fBs_server\fR" 10
272 .IX Item "s_server"
273 This implements a generic \s-1SSL/TLS\s0 server which accepts connections from remote
274 clients speaking \s-1SSL/TLS.\s0 It's intended for testing purposes only and provides
275 only rudimentary interface functionality but internally uses mostly all
276 functionality of the OpenSSL \fBssl\fR library.  It provides both an own command
277 line oriented protocol for testing \s-1SSL\s0 functions and a simple \s-1HTTP\s0 response
278 facility to emulate an SSL/TLS\-aware webserver.
279 .IP "\fBs_time\fR" 10
280 .IX Item "s_time"
281 \&\s-1SSL\s0 Connection Timer.
282 .IP "\fBsess_id\fR" 10
283 .IX Item "sess_id"
284 \&\s-1SSL\s0 Session Data Management.
285 .IP "\fBsmime\fR" 10
286 .IX Item "smime"
287 S/MIME mail processing.
288 .IP "\fBspeed\fR" 10
289 .IX Item "speed"
290 Algorithm Speed Measurement.
291 .IP "\fBverify\fR" 10
292 .IX Item "verify"
293 X.509 Certificate Verification.
294 .IP "\fBversion\fR" 10
295 .IX Item "version"
296 OpenSSL Version Information.
297 .IP "\fBx509\fR" 10
298 .IX Item "x509"
299 X.509 Certificate Data Management.
300 .SS "\s-1MESSAGE DIGEST COMMANDS\s0"
301 .IX Subsection "MESSAGE DIGEST COMMANDS"
302 .IP "\fBmd2\fR" 10
303 .IX Item "md2"
304 \&\s-1MD2\s0 Digest
305 .IP "\fBmd5\fR" 10
306 .IX Item "md5"
307 \&\s-1MD5\s0 Digest
308 .IP "\fBmdc2\fR" 10
309 .IX Item "mdc2"
310 \&\s-1MDC2\s0 Digest
311 .IP "\fBrmd160\fR" 10
312 .IX Item "rmd160"
313 \&\s-1RMD\-160\s0 Digest
314 .IP "\fBsha\fR" 10
315 .IX Item "sha"
316 \&\s-1SHA\s0 Digest
317 .IP "\fBsha1\fR" 10
318 .IX Item "sha1"
319 \&\s-1SHA\-1\s0 Digest
320 .IP "\fBsha224\fR" 10
321 .IX Item "sha224"
322 \&\s-1SHA\-224\s0 Digest
323 .IP "\fBsha256\fR" 10
324 .IX Item "sha256"
325 \&\s-1SHA\-256\s0 Digest
326 .IP "\fBsha384\fR" 10
327 .IX Item "sha384"
328 \&\s-1SHA\-384\s0 Digest
329 .IP "\fBsha512\fR" 10
330 .IX Item "sha512"
331 \&\s-1SHA\-512\s0 Digest
332 .SS "\s-1ENCODING AND CIPHER COMMANDS\s0"
333 .IX Subsection "ENCODING AND CIPHER COMMANDS"
334 .IP "\fBbase64\fR" 10
335 .IX Item "base64"
336 Base64 Encoding
337 .IP "\fBbf bf-cbc bf-cfb bf-ecb bf-ofb\fR" 10
338 .IX Item "bf bf-cbc bf-cfb bf-ecb bf-ofb"
339 Blowfish Cipher
340 .IP "\fBcast cast-cbc\fR" 10
341 .IX Item "cast cast-cbc"
342 \&\s-1CAST\s0 Cipher
343 .IP "\fBcast5\-cbc cast5\-cfb cast5\-ecb cast5\-ofb\fR" 10
344 .IX Item "cast5-cbc cast5-cfb cast5-ecb cast5-ofb"
345 \&\s-1CAST5\s0 Cipher
346 .IP "\fBdes des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb\fR" 10
347 .IX Item "des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb"
348 \&\s-1DES\s0 Cipher
349 .IP "\fBdes3 desx des\-ede3 des\-ede3\-cbc des\-ede3\-cfb des\-ede3\-ofb\fR" 10
350 .IX Item "des3 desx des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb"
351 Triple-DES Cipher
352 .IP "\fBidea idea-cbc idea-cfb idea-ecb idea-ofb\fR" 10
353 .IX Item "idea idea-cbc idea-cfb idea-ecb idea-ofb"
354 \&\s-1IDEA\s0 Cipher
355 .IP "\fBrc2 rc2\-cbc rc2\-cfb rc2\-ecb rc2\-ofb\fR" 10
356 .IX Item "rc2 rc2-cbc rc2-cfb rc2-ecb rc2-ofb"
357 \&\s-1RC2\s0 Cipher
358 .IP "\fBrc4\fR" 10
359 .IX Item "rc4"
360 \&\s-1RC4\s0 Cipher
361 .IP "\fBrc5 rc5\-cbc rc5\-cfb rc5\-ecb rc5\-ofb\fR" 10
362 .IX Item "rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb"
363 \&\s-1RC5\s0 Cipher
364 .SH "PASS PHRASE ARGUMENTS"
365 .IX Header "PASS PHRASE ARGUMENTS"
366 Several commands accept password arguments, typically using \fB\-passin\fR
367 and \fB\-passout\fR for input and output passwords respectively. These allow
368 the password to be obtained from a variety of sources. Both of these
369 options take a single argument whose format is described below. If no
370 password argument is given and a password is required then the user is
371 prompted to enter one: this will typically be read from the current
372 terminal with echoing turned off.
373 .IP "\fBpass:password\fR" 10
374 .IX Item "pass:password"
375 the actual password is \fBpassword\fR. Since the password is visible
376 to utilities (like 'ps' under Unix) this form should only be used
377 where security is not important.
378 .IP "\fBenv:var\fR" 10
379 .IX Item "env:var"
380 obtain the password from the environment variable \fBvar\fR. Since
381 the environment of other processes is visible on certain platforms
382 (e.g. ps under certain Unix OSes) this option should be used with caution.
383 .IP "\fBfile:pathname\fR" 10
384 .IX Item "file:pathname"
385 the first line of \fBpathname\fR is the password. If the same \fBpathname\fR
386 argument is supplied to \fB\-passin\fR and \fB\-passout\fR arguments then the first
387 line will be used for the input password and the next line for the output
388 password. \fBpathname\fR need not refer to a regular file: it could for example
389 refer to a device or named pipe.
390 .IP "\fBfd:number\fR" 10
391 .IX Item "fd:number"
392 read the password from the file descriptor \fBnumber\fR. This can be used to
393 send the data via a pipe for example.
394 .IP "\fBstdin\fR" 10
395 .IX Item "stdin"
396 read the password from standard input.
397 .SH "SEE ALSO"
398 .IX Header "SEE ALSO"
399 \&\fIasn1parse\fR\|(1), \fIca\fR\|(1), \fIconfig\fR\|(5),
400 \&\fIcrl\fR\|(1), \fIcrl2pkcs7\fR\|(1), \fIdgst\fR\|(1),
401 \&\fIdhparam\fR\|(1), \fIdsa\fR\|(1), \fIdsaparam\fR\|(1),
402 \&\fIenc\fR\|(1), \fIgendsa\fR\|(1),
403 \&\fIgenrsa\fR\|(1), \fInseq\fR\|(1), \fIopenssl\fR\|(1),
404 \&\fIpasswd\fR\|(1),
405 \&\fIpkcs12\fR\|(1), \fIpkcs7\fR\|(1), \fIpkcs8\fR\|(1),
406 \&\fIrand\fR\|(1), \fIreq\fR\|(1), \fIrsa\fR\|(1),
407 \&\fIrsautl\fR\|(1), \fIs_client\fR\|(1),
408 \&\fIs_server\fR\|(1), \fIs_time\fR\|(1),
409 \&\fIsmime\fR\|(1), \fIspkac\fR\|(1),
410 \&\fIverify\fR\|(1), \fIversion\fR\|(1), \fIx509\fR\|(1),
411 \&\fIcrypto\fR\|(3), \fIssl\fR\|(3)
412 .SH "HISTORY"
413 .IX Header "HISTORY"
414 The \fIopenssl\fR\|(1) document appeared in OpenSSL 0.9.2.
415 The \fBlist\-\fR\fI\s-1XXX\s0\fR\fB\-commands\fR pseudo-commands were added in OpenSSL 0.9.3;
416 the \fBno\-\fR\fI\s-1XXX\s0\fR pseudo-commands were added in OpenSSL 0.9.5a.
417 For notes on the availability of other commands, see their individual
418 manual pages.