]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/s_server.1
As the perl-generated assembler files have been committed, add the
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / s_server.1
1 .\" Automatically generated by Pod::Man version 1.15
2 .\" Thu May  9 13:14:57 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 "S_SERVER 1"
141 .TH S_SERVER 1 "perl v5.6.1" "2001-07-19" "User Contributed Perl Documentation"
142 .UC
143 .SH "NAME"
144 s_server \- \s-1SSL/TLS\s0 server program
145 .SH "SYNOPSIS"
146 .IX Header "SYNOPSIS"
147 \&\fBopenssl\fR \fBs_server\fR
148 [\fB\-accept port\fR]
149 [\fB\-context id\fR]
150 [\fB\-verify depth\fR]
151 [\fB\-Verify depth\fR]
152 [\fB\-cert filename\fR]
153 [\fB\-key keyfile\fR]
154 [\fB\-dcert filename\fR]
155 [\fB\-dkey keyfile\fR]
156 [\fB\-dhparam filename\fR]
157 [\fB\-nbio\fR]
158 [\fB\-nbio_test\fR]
159 [\fB\-crlf\fR]
160 [\fB\-debug\fR]
161 [\fB\-state\fR]
162 [\fB\-CApath directory\fR]
163 [\fB\-CAfile filename\fR]
164 [\fB\-nocert\fR]
165 [\fB\-cipher cipherlist\fR]
166 [\fB\-quiet\fR]
167 [\fB\-no_tmp_rsa\fR]
168 [\fB\-ssl2\fR]
169 [\fB\-ssl3\fR]
170 [\fB\-tls1\fR]
171 [\fB\-no_ssl2\fR]
172 [\fB\-no_ssl3\fR]
173 [\fB\-no_tls1\fR]
174 [\fB\-no_dhe\fR]
175 [\fB\-bugs\fR]
176 [\fB\-hack\fR]
177 [\fB\-www\fR]
178 [\fB\-WWW\fR]
179 [\fB\-rand \f(BIfile\fB\|(s)\fR]
180 .SH "DESCRIPTION"
181 .IX Header "DESCRIPTION"
182 The \fBs_server\fR command implements a generic \s-1SSL/TLS\s0 server which listens
183 for connections on a given port using \s-1SSL/TLS\s0.
184 .SH "OPTIONS"
185 .IX Header "OPTIONS"
186 .Ip "\fB\-accept port\fR" 4
187 .IX Item "-accept port"
188 the \s-1TCP\s0 port to listen on for connections. If not specified 4433 is used.
189 .Ip "\fB\-context id\fR" 4
190 .IX Item "-context id"
191 sets the \s-1SSL\s0 context id. It can be given any string value. If this option
192 is not present a default value will be used.
193 .Ip "\fB\-cert certname\fR" 4
194 .IX Item "-cert certname"
195 The certificate to use, most servers cipher suites require the use of a
196 certificate and some require a certificate with a certain public key type:
197 for example the \s-1DSS\s0 cipher suites require a certificate containing a \s-1DSS\s0
198 (\s-1DSA\s0) key. If not specified then the filename \*(L"server.pem\*(R" will be used.
199 .Ip "\fB\-key keyfile\fR" 4
200 .IX Item "-key keyfile"
201 The private key to use. If not specified then the certificate file will
202 be used.
203 .Ip "\fB\-dcert filename\fR, \fB\-dkey keyname\fR" 4
204 .IX Item "-dcert filename, -dkey keyname"
205 specify an additional certificate and private key, these behave in the
206 same manner as the \fB\-cert\fR and \fB\-key\fR options except there is no default
207 if they are not specified (no additional certificate and key is used). As
208 noted above some cipher suites require a certificate containing a key of
209 a certain type. Some cipher suites need a certificate carrying an \s-1RSA\s0 key
210 and some a \s-1DSS\s0 (\s-1DSA\s0) key. By using \s-1RSA\s0 and \s-1DSS\s0 certificates and keys
211 a server can support clients which only support \s-1RSA\s0 or \s-1DSS\s0 cipher suites
212 by using an appropriate certificate.
213 .Ip "\fB\-nocert\fR" 4
214 .IX Item "-nocert"
215 if this option is set then no certificate is used. This restricts the
216 cipher suites available to the anonymous ones (currently just anonymous
217 \&\s-1DH\s0).
218 .Ip "\fB\-dhparam filename\fR" 4
219 .IX Item "-dhparam filename"
220 the \s-1DH\s0 parameter file to use. The ephemeral \s-1DH\s0 cipher suites generate keys
221 using a set of \s-1DH\s0 parameters. If not specified then an attempt is made to
222 load the parameters from the server certificate file. If this fails then
223 a static set of parameters hard coded into the s_server program will be used.
224 .Ip "\fB\-no_dhe\fR" 4
225 .IX Item "-no_dhe"
226 if this option is set then no \s-1DH\s0 parameters will be loaded effectively
227 disabling the ephemeral \s-1DH\s0 cipher suites.
228 .Ip "\fB\-no_tmp_rsa\fR" 4
229 .IX Item "-no_tmp_rsa"
230 certain export cipher suites sometimes use a temporary \s-1RSA\s0 key, this option
231 disables temporary \s-1RSA\s0 key generation.
232 .Ip "\fB\-verify depth\fR, \fB\-Verify depth\fR" 4
233 .IX Item "-verify depth, -Verify depth"
234 The verify depth to use. This specifies the maximum length of the
235 client certificate chain and makes the server request a certificate from
236 the client. With the \fB\-verify\fR option a certificate is requested but the
237 client does not have to send one, with the \fB\-Verify\fR option the client
238 must supply a certificate or an error occurs.
239 .Ip "\fB\-CApath directory\fR" 4
240 .IX Item "-CApath directory"
241 The directory to use for client certificate verification. This directory
242 must be in \*(L"hash format\*(R", see \fBverify\fR for more information. These are
243 also used when building the server certificate chain.
244 .Ip "\fB\-CAfile file\fR" 4
245 .IX Item "-CAfile file"
246 A file containing trusted certificates to use during client authentication
247 and to use when attempting to build the server certificate chain. The list
248 is also used in the list of acceptable client CAs passed to the client when
249 a certificate is requested.
250 .Ip "\fB\-state\fR" 4
251 .IX Item "-state"
252 prints out the \s-1SSL\s0 session states.
253 .Ip "\fB\-debug\fR" 4
254 .IX Item "-debug"
255 print extensive debugging information including a hex dump of all traffic.
256 .Ip "\fB\-nbio_test\fR" 4
257 .IX Item "-nbio_test"
258 tests non blocking I/O
259 .Ip "\fB\-nbio\fR" 4
260 .IX Item "-nbio"
261 turns on non blocking I/O
262 .Ip "\fB\-crlf\fR" 4
263 .IX Item "-crlf"
264 this option translated a line feed from the terminal into \s-1CR+LF\s0.
265 .Ip "\fB\-quiet\fR" 4
266 .IX Item "-quiet"
267 inhibit printing of session and certificate information.
268 .Ip "\fB\-ssl2\fR, \fB\-ssl3\fR, \fB\-tls1\fR, \fB\-no_ssl2\fR, \fB\-no_ssl3\fR, \fB\-no_tls1\fR" 4
269 .IX Item "-ssl2, -ssl3, -tls1, -no_ssl2, -no_ssl3, -no_tls1"
270 these options disable the use of certain \s-1SSL\s0 or \s-1TLS\s0 protocols. By default
271 the initial handshake uses a method which should be compatible with all
272 servers and permit them to use \s-1SSL\s0 v3, \s-1SSL\s0 v2 or \s-1TLS\s0 as appropriate.
273 .Ip "\fB\-bugs\fR" 4
274 .IX Item "-bugs"
275 there are several known bug in \s-1SSL\s0 and \s-1TLS\s0 implementations. Adding this
276 option enables various workarounds.
277 .Ip "\fB\-hack\fR" 4
278 .IX Item "-hack"
279 this option enables a further workaround for some some early Netscape
280 \&\s-1SSL\s0 code (?).
281 .Ip "\fB\-cipher cipherlist\fR" 4
282 .IX Item "-cipher cipherlist"
283 this allows the cipher list used by the server to be modified.  When
284 the client sends a list of supported ciphers the first client cipher
285 also included in the server list is used. Because the client specifies
286 the preference order, the order of the server cipherlist irrelevant. See
287 the \fBciphers\fR command for more information.
288 .Ip "\fB\-www\fR" 4
289 .IX Item "-www"
290 sends a status message back to the client when it connects. This includes
291 lots of information about the ciphers used and various session parameters.
292 The output is in \s-1HTML\s0 format so this option will normally be used with a
293 web browser.
294 .Ip "\fB\-WWW\fR" 4
295 .IX Item "-WWW"
296 emulates a simple web server. Pages will be resolved relative to the
297 current directory, for example if the \s-1URL\s0 https://myhost/page.html is
298 requested the file ./page.html will be loaded.
299 .Ip "\fB\-rand \f(BIfile\fB\|(s)\fR" 4
300 .IX Item "-rand file"
301 a file or files containing random data used to seed the random number
302 generator, or an \s-1EGD\s0 socket (see RAND_egd(3)).
303 Multiple files can be specified separated by a OS-dependent character.
304 The separator is \fB;\fR for MS-Windows, \fB,\fR for OpenVMS, and \fB:\fR for
305 all others.
306 .SH "CONNECTED COMMANDS"
307 .IX Header "CONNECTED COMMANDS"
308 If a connection request is established with an \s-1SSL\s0 client and neither the
309 \&\fB\-www\fR nor the \fB\-WWW\fR option has been used then normally any data received
310 from the client is displayed and any key presses will be sent to the client. 
311 .PP
312 Certain single letter commands are also recognized which perform special
313 operations: these are listed below.
314 .Ip "\fBq\fR" 4
315 .IX Item "q"
316 end the current \s-1SSL\s0 connection but still accept new connections.
317 .Ip "\fBQ\fR" 4
318 .IX Item "Q"
319 end the current \s-1SSL\s0 connection and exit.
320 .Ip "\fBr\fR" 4
321 .IX Item "r"
322 renegotiate the \s-1SSL\s0 session.
323 .Ip "\fBR\fR" 4
324 .IX Item "R"
325 renegotiate the \s-1SSL\s0 session and request a client certificate.
326 .Ip "\fBP\fR" 4
327 .IX Item "P"
328 send some plain text down the underlying \s-1TCP\s0 connection: this should
329 cause the client to disconnect due to a protocol violation.
330 .Ip "\fBS\fR" 4
331 .IX Item "S"
332 print out some session cache status information.
333 .SH "NOTES"
334 .IX Header "NOTES"
335 \&\fBs_server\fR can be used to debug \s-1SSL\s0 clients. To accept connections from
336 a web browser the command:
337 .PP
338 .Vb 1
339 \& openssl s_server -accept 443 -www
340 .Ve
341 can be used for example.
342 .PP
343 Most web browsers (in particular Netscape and \s-1MSIE\s0) only support \s-1RSA\s0 cipher
344 suites, so they cannot connect to servers which don't use a certificate
345 carrying an \s-1RSA\s0 key or a version of OpenSSL with \s-1RSA\s0 disabled.
346 .PP
347 Although specifying an empty list of CAs when requesting a client certificate
348 is strictly speaking a protocol violation, some \s-1SSL\s0 clients interpret this to
349 mean any \s-1CA\s0 is acceptable. This is useful for debugging purposes.
350 .PP
351 The session parameters can printed out using the \fBsess_id\fR program.
352 .SH "BUGS"
353 .IX Header "BUGS"
354 Because this program has a lot of options and also because some of
355 the techniques used are rather old, the C source of s_server is rather
356 hard to read and not a model of how things should be done. A typical
357 \&\s-1SSL\s0 server program would be much simpler.
358 .PP
359 The output of common ciphers is wrong: it just gives the list of ciphers that
360 OpenSSL recognizes and the client supports.
361 .PP
362 There should be a way for the \fBs_server\fR program to print out details of any
363 unknown cipher suites a client says it supports.
364 .SH "SEE ALSO"
365 .IX Header "SEE ALSO"
366 sess_id(1), s_client(1), ciphers(1)