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