]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/openssl.1
This commit was generated by cvs2svn to compensate for changes in r104912,
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / openssl.1
1 .\" Automatically generated by Pod::Man version 1.15
2 .\" Tue Jul 30 09:20:48 2002
3 .\"
4 .\" Standard preamble:
5 .\" ======================================================================
6 .de Sh \" Subsection heading
7 .br
8 .if t .Sp
9 .ne 5
10 .PP
11 \fB\\$1\fR
12 .PP
13 ..
14 .de Sp \" Vertical space (when we can't use .PP)
15 .if t .sp .5v
16 .if n .sp
17 ..
18 .de Ip \" List item
19 .br
20 .ie \\n(.$>=3 .ne \\$3
21 .el .ne 3
22 .IP "\\$1" \\$2
23 ..
24 .de Vb \" Begin verbatim text
25 .ft CW
26 .nf
27 .ne \\$1
28 ..
29 .de Ve \" End verbatim text
30 .ft R
31
32 .fi
33 ..
34 .\" Set up some character translations and predefined strings.  \*(-- will
35 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
36 .\" double quote, and \*(R" will give a right double quote.  | will give a
37 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used
38 .\" to do unbreakable dashes and therefore won't be available.  \*(C` and
39 .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
40 .tr \(*W-|\(bv\*(Tr
41 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
42 .ie n \{\
43 .    ds -- \(*W-
44 .    ds PI pi
45 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
46 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
47 .    ds L" ""
48 .    ds R" ""
49 .    ds C` ""
50 .    ds C' ""
51 'br\}
52 .el\{\
53 .    ds -- \|\(em\|
54 .    ds PI \(*p
55 .    ds L" ``
56 .    ds R" ''
57 'br\}
58 .\"
59 .\" If the F register is turned on, we'll generate index entries on stderr
60 .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
61 .\" index entries marked with X<> in POD.  Of course, you'll have to process
62 .\" the output yourself in some meaningful fashion.
63 .if \nF \{\
64 .    de IX
65 .    tm Index:\\$1\t\\n%\t"\\$2"
66 ..
67 .    nr % 0
68 .    rr F
69 .\}
70 .\"
71 .\" For nroff, turn off justification.  Always turn off hyphenation; it
72 .\" makes way too many mistakes in technical documents.
73 .hy 0
74 .if n .na
75 .\"
76 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
77 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
78 .bd B 3
79 .    \" fudge factors for nroff and troff
80 .if n \{\
81 .    ds #H 0
82 .    ds #V .8m
83 .    ds #F .3m
84 .    ds #[ \f1
85 .    ds #] \fP
86 .\}
87 .if t \{\
88 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
89 .    ds #V .6m
90 .    ds #F 0
91 .    ds #[ \&
92 .    ds #] \&
93 .\}
94 .    \" simple accents for nroff and troff
95 .if n \{\
96 .    ds ' \&
97 .    ds ` \&
98 .    ds ^ \&
99 .    ds , \&
100 .    ds ~ ~
101 .    ds /
102 .\}
103 .if t \{\
104 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
105 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
106 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
107 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
108 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
109 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
110 .\}
111 .    \" troff and (daisy-wheel) nroff accents
112 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
113 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
114 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
115 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
116 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
117 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
118 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
119 .ds ae a\h'-(\w'a'u*4/10)'e
120 .ds Ae A\h'-(\w'A'u*4/10)'E
121 .    \" corrections for vroff
122 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
123 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
124 .    \" for low resolution devices (crt and lpr)
125 .if \n(.H>23 .if \n(.V>19 \
126 \{\
127 .    ds : e
128 .    ds 8 ss
129 .    ds o a
130 .    ds d- d\h'-1'\(ga
131 .    ds D- D\h'-1'\(hy
132 .    ds th \o'bp'
133 .    ds Th \o'LP'
134 .    ds ae ae
135 .    ds Ae AE
136 .\}
137 .rm #[ #] #H #V #F C
138 .\" ======================================================================
139 .\"
140 .IX Title "OPENSSL 1"
141 .TH OPENSSL 1 "0.9.6e" "2002-01-26" "OpenSSL"
142 .UC
143 .SH "NAME"
144 openssl \- OpenSSL command line tool
145 .SH "SYNOPSIS"
146 .IX Header "SYNOPSIS"
147 \&\fBopenssl\fR
148 \&\fIcommand\fR
149 [ \fIcommand_opts\fR ]
150 [ \fIcommand_args\fR ]
151 .PP
152 \&\fBopenssl\fR [ \fBlist-standard-commands\fR | \fBlist-message-digest-commands\fR | \fBlist-cipher-commands\fR ]
153 .PP
154 \&\fBopenssl\fR \fBno-\fR\fI\s-1XXX\s0\fR [ \fIarbitrary options\fR ]
155 .SH "DESCRIPTION"
156 .IX Header "DESCRIPTION"
157 OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (\s-1SSL\s0
158 v2/v3) and Transport Layer Security (\s-1TLS\s0 v1) network protocols and related
159 cryptography standards required by them.
160 .PP
161 The \fBopenssl\fR program is a command line tool for using the various
162 cryptography functions of OpenSSL's \fBcrypto\fR library from the shell. 
163 It can be used for 
164 .PP
165 .Vb 6
166 \& o  Creation of RSA, DH and DSA key parameters
167 \& o  Creation of X.509 certificates, CSRs and CRLs 
168 \& o  Calculation of Message Digests
169 \& o  Encryption and Decryption with Ciphers
170 \& o  SSL/TLS Client and Server Tests
171 \& o  Handling of S/MIME signed or encrypted mail
172 .Ve
173 .SH "COMMAND SUMMARY"
174 .IX Header "COMMAND SUMMARY"
175 The \fBopenssl\fR program provides a rich variety of commands (\fIcommand\fR in the
176 \&\s-1SYNOPSIS\s0 above), each of which often has a wealth of options and arguments
177 (\fIcommand_opts\fR and \fIcommand_args\fR in the \s-1SYNOPSIS\s0).
178 .PP
179 The pseudo-commands \fBlist-standard-commands\fR, \fBlist-message-digest-commands\fR,
180 and \fBlist-cipher-commands\fR output a list (one entry per line) of the names
181 of all standard commands, message digest commands, or cipher commands,
182 respectively, that are available in the present \fBopenssl\fR utility.
183 .PP
184 The pseudo-command \fBno-\fR\fI\s-1XXX\s0\fR tests whether a command of the
185 specified name is available.  If no command named \fI\s-1XXX\s0\fR exists, it
186 returns 0 (success) and prints \fBno-\fR\fI\s-1XXX\s0\fR; otherwise it returns 1
187 and prints \fI\s-1XXX\s0\fR.  In both cases, the output goes to \fBstdout\fR and
188 nothing is printed to \fBstderr\fR.  Additional command line arguments
189 are always ignored.  Since for each cipher there is a command of the
190 same name, this provides an easy way for shell scripts to test for the
191 availability of ciphers in the \fBopenssl\fR program.  (\fBno-\fR\fI\s-1XXX\s0\fR is
192 not able to detect pseudo-commands such as \fBquit\fR,
193 \&\fBlist-\fR\fI...\fR\fB\-commands\fR, or \fBno-\fR\fI\s-1XXX\s0\fR itself.)
194 .Sh "\s-1STANDARD\s0 \s-1COMMANDS\s0"
195 .IX Subsection "STANDARD COMMANDS"
196 .Ip "\fBasn1parse\fR" 10
197 .IX Item "asn1parse"
198 Parse an \s-1ASN\s0.1 sequence.
199 .Ip "\fBca\fR" 10
200 .IX Item "ca"
201 Certificate Authority (\s-1CA\s0) Management.  
202 .Ip "\fBciphers\fR" 10
203 .IX Item "ciphers"
204 Cipher Suite Description Determination.
205 .Ip "\fBcrl\fR" 10
206 .IX Item "crl"
207 Certificate Revocation List (\s-1CRL\s0) Management.
208 .Ip "\fBcrl2pkcs7\fR" 10
209 .IX Item "crl2pkcs7"
210 \&\s-1CRL\s0 to PKCS#7 Conversion.
211 .Ip "\fBdgst\fR" 10
212 .IX Item "dgst"
213 Message Digest Calculation.
214 .Ip "\fBdh\fR" 10
215 .IX Item "dh"
216 Diffie-Hellman Parameter Management.
217 Obsoleted by \fBdhparam\fR.
218 .Ip "\fBdsa\fR" 10
219 .IX Item "dsa"
220 \&\s-1DSA\s0 Data Management.
221 .Ip "\fBdsaparam\fR" 10
222 .IX Item "dsaparam"
223 \&\s-1DSA\s0 Parameter Generation.
224 .Ip "\fBenc\fR" 10
225 .IX Item "enc"
226 Encoding with Ciphers.
227 .Ip "\fBerrstr\fR" 10
228 .IX Item "errstr"
229 Error Number to Error String Conversion.
230 .Ip "\fBdhparam\fR" 10
231 .IX Item "dhparam"
232 Generation and Management of Diffie-Hellman Parameters.
233 .Ip "\fBgendh\fR" 10
234 .IX Item "gendh"
235 Generation of Diffie-Hellman Parameters.
236 Obsoleted by \fBdhparam\fR.
237 .Ip "\fBgendsa\fR" 10
238 .IX Item "gendsa"
239 Generation of \s-1DSA\s0 Parameters.
240 .Ip "\fBgenrsa\fR" 10
241 .IX Item "genrsa"
242 Generation of \s-1RSA\s0 Parameters.
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 .Sh "\s-1ENCODING\s0 \s-1AND\s0 \s-1CIPHER\s0 \s-1COMMANDS\s0"
320 .IX Subsection "ENCODING AND CIPHER COMMANDS"
321 .Ip "\fBbase64\fR" 10
322 .IX Item "base64"
323 Base64 Encoding
324 .Ip "\fBbf bf-cbc bf-cfb bf-ecb bf-ofb\fR" 10
325 .IX Item "bf bf-cbc bf-cfb bf-ecb bf-ofb"
326 Blowfish Cipher
327 .Ip "\fBcast cast-cbc\fR" 10
328 .IX Item "cast cast-cbc"
329 \&\s-1CAST\s0 Cipher
330 .Ip "\fBcast5\-cbc cast5\-cfb cast5\-ecb cast5\-ofb\fR" 10
331 .IX Item "cast5-cbc cast5-cfb cast5-ecb cast5-ofb"
332 \&\s-1CAST5\s0 Cipher
333 .Ip "\fBdes des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb\fR" 10
334 .IX Item "des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb"
335 \&\s-1DES\s0 Cipher
336 .Ip "\fBdes3 desx des-ede3 des-ede3\-cbc des-ede3\-cfb des-ede3\-ofb\fR" 10
337 .IX Item "des3 desx des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb"
338 Triple-DES Cipher
339 .Ip "\fBidea idea-cbc idea-cfb idea-ecb idea-ofb\fR" 10
340 .IX Item "idea idea-cbc idea-cfb idea-ecb idea-ofb"
341 \&\s-1IDEA\s0 Cipher
342 .Ip "\fBrc2 rc2\-cbc rc2\-cfb rc2\-ecb rc2\-ofb\fR" 10
343 .IX Item "rc2 rc2-cbc rc2-cfb rc2-ecb rc2-ofb"
344 \&\s-1RC2\s0 Cipher
345 .Ip "\fBrc4\fR" 10
346 .IX Item "rc4"
347 \&\s-1RC4\s0 Cipher
348 .Ip "\fBrc5 rc5\-cbc rc5\-cfb rc5\-ecb rc5\-ofb\fR" 10
349 .IX Item "rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb"
350 \&\s-1RC5\s0 Cipher
351 .SH "PASS PHRASE ARGUMENTS"
352 .IX Header "PASS PHRASE ARGUMENTS"
353 Several commands accept password arguments, typically using \fB\-passin\fR
354 and \fB\-passout\fR for input and output passwords respectively. These allow
355 the password to be obtained from a variety of sources. Both of these
356 options take a single argument whose format is described below. If no
357 password argument is given and a password is required then the user is
358 prompted to enter one: this will typically be read from the current
359 terminal with echoing turned off.
360 .Ip "\fBpass:password\fR" 10
361 .IX Item "pass:password"
362 the actual password is \fBpassword\fR. Since the password is visible
363 to utilities (like 'ps' under Unix) this form should only be used
364 where security is not important.
365 .Ip "\fBenv:var\fR" 10
366 .IX Item "env:var"
367 obtain the password from the environment variable \fBvar\fR. Since
368 the environment of other processes is visible on certain platforms
369 (e.g. ps under certain Unix OSes) this option should be used with caution.
370 .Ip "\fBfile:pathname\fR" 10
371 .IX Item "file:pathname"
372 the first line of \fBpathname\fR is the password. If the same \fBpathname\fR
373 argument is supplied to \fB\-passin\fR and \fB\-passout\fR arguments then the first
374 line will be used for the input password and the next line for the output
375 password. \fBpathname\fR need not refer to a regular file: it could for example
376 refer to a device or named pipe.
377 .Ip "\fBfd:number\fR" 10
378 .IX Item "fd:number"
379 read the password from the file descriptor \fBnumber\fR. This can be used to
380 send the data via a pipe for example.
381 .Ip "\fBstdin\fR" 10
382 .IX Item "stdin"
383 read the password from standard input.
384 .SH "SEE ALSO"
385 .IX Header "SEE ALSO"
386 asn1parse(1), ca(1), config(5),
387 crl(1), crl2pkcs7(1), dgst(1),
388 dhparam(1), dsa(1), dsaparam(1),
389 enc(1), gendsa(1),
390 genrsa(1), nseq(1), openssl(1),
391 passwd(1),
392 pkcs12(1), pkcs7(1), pkcs8(1),
393 rand(1), req(1), rsa(1),
394 rsautl(1), s_client(1),
395 s_server(1), smime(1), spkac(1),
396 verify(1), version(1), x509(1),
397 crypto(3), ssl(3) 
398 .SH "HISTORY"
399 .IX Header "HISTORY"
400 The \fIopenssl\fR\|(1) document appeared in OpenSSL 0.9.2.
401 The \fBlist-\fR\fI\s-1XXX\s0\fR\fB\-commands\fR pseudo-commands were added in OpenSSL 0.9.3;
402 the \fBno-\fR\fI\s-1XXX\s0\fR pseudo-commands were added in OpenSSL 0.9.5a.
403 For notes on the availability of other commands, see their individual
404 manual pages.