]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/usr.bin/openssl/man/s_server.1
MFV: r339981
[FreeBSD/FreeBSD.git] / secure / usr.bin / openssl / man / s_server.1
1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
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 >0, 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 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "S_SERVER 1"
132 .TH S_SERVER 1 "2018-09-11" "1.1.1" "OpenSSL"
133 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 openssl\-s_server, s_server \- SSL/TLS server program
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 \&\fBopenssl\fR \fBs_server\fR
142 [\fB\-help\fR]
143 [\fB\-port +int\fR]
144 [\fB\-accept val\fR]
145 [\fB\-unix val\fR]
146 [\fB\-4\fR]
147 [\fB\-6\fR]
148 [\fB\-unlink\fR]
149 [\fB\-context val\fR]
150 [\fB\-verify int\fR]
151 [\fB\-Verify int\fR]
152 [\fB\-cert infile\fR]
153 [\fB\-nameopt val\fR]
154 [\fB\-naccept +int\fR]
155 [\fB\-serverinfo val\fR]
156 [\fB\-certform PEM|DER\fR]
157 [\fB\-key infile\fR]
158 [\fB\-keyform format\fR]
159 [\fB\-pass val\fR]
160 [\fB\-dcert infile\fR]
161 [\fB\-dcertform PEM|DER\fR]
162 [\fB\-dkey infile\fR]
163 [\fB\-dkeyform PEM|DER\fR]
164 [\fB\-dpass val\fR]
165 [\fB\-nbio_test\fR]
166 [\fB\-crlf\fR]
167 [\fB\-debug\fR]
168 [\fB\-msg\fR]
169 [\fB\-msgfile outfile\fR]
170 [\fB\-state\fR]
171 [\fB\-CAfile infile\fR]
172 [\fB\-CApath dir\fR]
173 [\fB\-no\-CAfile\fR]
174 [\fB\-no\-CApath\fR]
175 [\fB\-nocert\fR]
176 [\fB\-quiet\fR]
177 [\fB\-no_resume_ephemeral\fR]
178 [\fB\-www\fR]
179 [\fB\-WWW\fR]
180 [\fB\-servername\fR]
181 [\fB\-servername_fatal\fR]
182 [\fB\-cert2 infile\fR]
183 [\fB\-key2 infile\fR]
184 [\fB\-tlsextdebug\fR]
185 [\fB\-HTTP\fR]
186 [\fB\-id_prefix val\fR]
187 [\fB\-rand file...\fR]
188 [\fB\-writerand file\fR]
189 [\fB\-keymatexport val\fR]
190 [\fB\-keymatexportlen +int\fR]
191 [\fB\-CRL infile\fR]
192 [\fB\-crl_download\fR]
193 [\fB\-cert_chain infile\fR]
194 [\fB\-dcert_chain infile\fR]
195 [\fB\-chainCApath dir\fR]
196 [\fB\-verifyCApath dir\fR]
197 [\fB\-no_cache\fR]
198 [\fB\-ext_cache\fR]
199 [\fB\-CRLform PEM|DER\fR]
200 [\fB\-verify_return_error\fR]
201 [\fB\-verify_quiet\fR]
202 [\fB\-build_chain\fR]
203 [\fB\-chainCAfile infile\fR]
204 [\fB\-verifyCAfile infile\fR]
205 [\fB\-ign_eof\fR]
206 [\fB\-no_ign_eof\fR]
207 [\fB\-status\fR]
208 [\fB\-status_verbose\fR]
209 [\fB\-status_timeout int\fR]
210 [\fB\-status_url val\fR]
211 [\fB\-status_file infile\fR]
212 [\fB\-trace\fR]
213 [\fB\-security_debug\fR]
214 [\fB\-security_debug_verbose\fR]
215 [\fB\-brief\fR]
216 [\fB\-rev\fR]
217 [\fB\-async\fR]
218 [\fB\-ssl_config val\fR]
219 [\fB\-max_send_frag +int\fR]
220 [\fB\-split_send_frag +int\fR]
221 [\fB\-max_pipelines +int\fR]
222 [\fB\-read_buf +int\fR]
223 [\fB\-no_ssl3\fR]
224 [\fB\-no_tls1\fR]
225 [\fB\-no_tls1_1\fR]
226 [\fB\-no_tls1_2\fR]
227 [\fB\-no_tls1_3\fR]
228 [\fB\-bugs\fR]
229 [\fB\-no_comp\fR]
230 [\fB\-comp\fR]
231 [\fB\-no_ticket\fR]
232 [\fB\-serverpref\fR]
233 [\fB\-legacy_renegotiation\fR]
234 [\fB\-no_renegotiation\fR]
235 [\fB\-legacy_server_connect\fR]
236 [\fB\-no_resumption_on_reneg\fR]
237 [\fB\-no_legacy_server_connect\fR]
238 [\fB\-allow_no_dhe_kex\fR]
239 [\fB\-prioritize_chacha\fR]
240 [\fB\-strict\fR]
241 [\fB\-sigalgs val\fR]
242 [\fB\-client_sigalgs val\fR]
243 [\fB\-groups val\fR]
244 [\fB\-curves val\fR]
245 [\fB\-named_curve val\fR]
246 [\fB\-cipher val\fR]
247 [\fB\-ciphersuites val\fR]
248 [\fB\-dhparam infile\fR]
249 [\fB\-record_padding val\fR]
250 [\fB\-debug_broken_protocol\fR]
251 [\fB\-policy val\fR]
252 [\fB\-purpose val\fR]
253 [\fB\-verify_name val\fR]
254 [\fB\-verify_depth int\fR]
255 [\fB\-auth_level int\fR]
256 [\fB\-attime intmax\fR]
257 [\fB\-verify_hostname val\fR]
258 [\fB\-verify_email val\fR]
259 [\fB\-verify_ip\fR]
260 [\fB\-ignore_critical\fR]
261 [\fB\-issuer_checks\fR]
262 [\fB\-crl_check\fR]
263 [\fB\-crl_check_all\fR]
264 [\fB\-policy_check\fR]
265 [\fB\-explicit_policy\fR]
266 [\fB\-inhibit_any\fR]
267 [\fB\-inhibit_map\fR]
268 [\fB\-x509_strict\fR]
269 [\fB\-extended_crl\fR]
270 [\fB\-use_deltas\fR]
271 [\fB\-policy_print\fR]
272 [\fB\-check_ss_sig\fR]
273 [\fB\-trusted_first\fR]
274 [\fB\-suiteB_128_only\fR]
275 [\fB\-suiteB_128\fR]
276 [\fB\-suiteB_192\fR]
277 [\fB\-partial_chain\fR]
278 [\fB\-no_alt_chains\fR]
279 [\fB\-no_check_time\fR]
280 [\fB\-allow_proxy_certs\fR]
281 [\fB\-xkey\fR]
282 [\fB\-xcert\fR]
283 [\fB\-xchain\fR]
284 [\fB\-xchain_build\fR]
285 [\fB\-xcertform PEM|DER\fR]
286 [\fB\-xkeyform PEM|DER\fR]
287 [\fB\-nbio\fR]
288 [\fB\-psk_identity val\fR]
289 [\fB\-psk_hint val\fR]
290 [\fB\-psk val\fR]
291 [\fB\-psk_session file\fR]
292 [\fB\-srpvfile infile\fR]
293 [\fB\-srpuserseed val\fR]
294 [\fB\-ssl3\fR]
295 [\fB\-tls1\fR]
296 [\fB\-tls1_1\fR]
297 [\fB\-tls1_2\fR]
298 [\fB\-tls1_3\fR]
299 [\fB\-dtls\fR]
300 [\fB\-timeout\fR]
301 [\fB\-mtu +int\fR]
302 [\fB\-listen\fR]
303 [\fB\-dtls1\fR]
304 [\fB\-dtls1_2\fR]
305 [\fB\-sctp\fR]
306 [\fB\-no_dhe\fR]
307 [\fB\-nextprotoneg val\fR]
308 [\fB\-use_srtp val\fR]
309 [\fB\-alpn val\fR]
310 [\fB\-engine val\fR]
311 [\fB\-keylogfile outfile\fR]
312 [\fB\-max_early_data int\fR]
313 [\fB\-early_data\fR]
314 [\fB\-anti_replay\fR]
315 [\fB\-no_anti_replay\fR]
316 .SH "DESCRIPTION"
317 .IX Header "DESCRIPTION"
318 The \fBs_server\fR command implements a generic \s-1SSL/TLS\s0 server which listens
319 for connections on a given port using \s-1SSL/TLS.\s0
320 .SH "OPTIONS"
321 .IX Header "OPTIONS"
322 In addition to the options below the \fBs_server\fR utility also supports the
323 common and server only options documented in the
324 in the \*(L"Supported Command Line Commands\*(R" section of the \fISSL_CONF_cmd\fR\|(3)
325 manual page.
326 .IP "\fB\-help\fR" 4
327 .IX Item "-help"
328 Print out a usage message.
329 .IP "\fB\-port +int\fR" 4
330 .IX Item "-port +int"
331 The \s-1TCP\s0 port to listen on for connections. If not specified 4433 is used.
332 .IP "\fB\-accept val\fR" 4
333 .IX Item "-accept val"
334 The optional \s-1TCP\s0 host and port to listen on for connections. If not specified, *:4433 is used.
335 .IP "\fB\-unix val\fR" 4
336 .IX Item "-unix val"
337 Unix domain socket to accept on.
338 .IP "\fB\-4\fR" 4
339 .IX Item "-4"
340 Use IPv4 only.
341 .IP "\fB\-6\fR" 4
342 .IX Item "-6"
343 Use IPv6 only.
344 .IP "\fB\-unlink\fR" 4
345 .IX Item "-unlink"
346 For \-unix, unlink any existing socket first.
347 .IP "\fB\-context val\fR" 4
348 .IX Item "-context val"
349 Sets the \s-1SSL\s0 context id. It can be given any string value. If this option
350 is not present a default value will be used.
351 .IP "\fB\-verify int\fR, \fB\-Verify int\fR" 4
352 .IX Item "-verify int, -Verify int"
353 The verify depth to use. This specifies the maximum length of the
354 client certificate chain and makes the server request a certificate from
355 the client. With the \fB\-verify\fR option a certificate is requested but the
356 client does not have to send one, with the \fB\-Verify\fR option the client
357 must supply a certificate or an error occurs.
358 .Sp
359 If the cipher suite cannot request a client certificate (for example an
360 anonymous cipher suite or \s-1PSK\s0) this option has no effect.
361 .IP "\fB\-cert infile\fR" 4
362 .IX Item "-cert infile"
363 The certificate to use, most servers cipher suites require the use of a
364 certificate and some require a certificate with a certain public key type:
365 for example the \s-1DSS\s0 cipher suites require a certificate containing a \s-1DSS\s0
366 (\s-1DSA\s0) key. If not specified then the filename \*(L"server.pem\*(R" will be used.
367 .IP "\fB\-cert_chain\fR" 4
368 .IX Item "-cert_chain"
369 A file containing trusted certificates to use when attempting to build the
370 client/server certificate chain related to the certificate specified via the
371 \&\fB\-cert\fR option.
372 .IP "\fB\-build_chain\fR" 4
373 .IX Item "-build_chain"
374 Specify whether the application should build the certificate chain to be
375 provided to the client.
376 .IP "\fB\-nameopt val\fR" 4
377 .IX Item "-nameopt val"
378 Option which determines how the subject or issuer names are displayed. The
379 \&\fBval\fR argument can be a single option or multiple options separated by
380 commas.  Alternatively the \fB\-nameopt\fR switch may be used more than once to
381 set multiple options. See the \fIx509\fR\|(1) manual page for details.
382 .IP "\fB\-naccept +int\fR" 4
383 .IX Item "-naccept +int"
384 The server will exit after receiving the specified number of connections,
385 default unlimited.
386 .IP "\fB\-serverinfo val\fR" 4
387 .IX Item "-serverinfo val"
388 A file containing one or more blocks of \s-1PEM\s0 data.  Each \s-1PEM\s0 block
389 must encode a \s-1TLS\s0 ServerHello extension (2 bytes type, 2 bytes length,
390 followed by \*(L"length\*(R" bytes of extension data).  If the client sends
391 an empty \s-1TLS\s0 ClientHello extension matching the type, the corresponding
392 ServerHello extension will be returned.
393 .IP "\fB\-certform PEM|DER\fR" 4
394 .IX Item "-certform PEM|DER"
395 The certificate format to use: \s-1DER\s0 or \s-1PEM. PEM\s0 is the default.
396 .IP "\fB\-key infile\fR" 4
397 .IX Item "-key infile"
398 The private key to use. If not specified then the certificate file will
399 be used.
400 .IP "\fB\-keyform format\fR" 4
401 .IX Item "-keyform format"
402 The private format to use: \s-1DER\s0 or \s-1PEM. PEM\s0 is the default.
403 .IP "\fB\-pass val\fR" 4
404 .IX Item "-pass val"
405 The private key password source. For more information about the format of \fBval\fR
406 see the \fB\s-1PASS PHRASE ARGUMENTS\s0\fR section in \fIopenssl\fR\|(1).
407 .IP "\fB\-dcert infile\fR, \fB\-dkey infile\fR" 4
408 .IX Item "-dcert infile, -dkey infile"
409 Specify an additional certificate and private key, these behave in the
410 same manner as the \fB\-cert\fR and \fB\-key\fR options except there is no default
411 if they are not specified (no additional certificate and key is used). As
412 noted above some cipher suites require a certificate containing a key of
413 a certain type. Some cipher suites need a certificate carrying an \s-1RSA\s0 key
414 and some a \s-1DSS\s0 (\s-1DSA\s0) key. By using \s-1RSA\s0 and \s-1DSS\s0 certificates and keys
415 a server can support clients which only support \s-1RSA\s0 or \s-1DSS\s0 cipher suites
416 by using an appropriate certificate.
417 .IP "\fB\-dcert_chain\fR" 4
418 .IX Item "-dcert_chain"
419 A file containing trusted certificates to use when attempting to build the
420 server certificate chain when a certificate specified via the \fB\-dcert\fR option
421 is in use.
422 .IP "\fB\-dcertform PEM|DER\fR, \fB\-dkeyform PEM|DER\fR, \fB\-dpass val\fR" 4
423 .IX Item "-dcertform PEM|DER, -dkeyform PEM|DER, -dpass val"
424 Additional certificate and private key format and passphrase respectively.
425 .IP "\fB\-xkey infile\fR, \fB\-xcert infile\fR, \fB\-xchain\fR" 4
426 .IX Item "-xkey infile, -xcert infile, -xchain"
427 Specify an extra certificate, private key and certificate chain. These behave
428 in the same manner as the \fB\-cert\fR, \fB\-key\fR and \fB\-cert_chain\fR options.  When
429 specified, the callback returning the first valid chain will be in use by
430 the server.
431 .IP "\fB\-xchain_build\fR" 4
432 .IX Item "-xchain_build"
433 Specify whether the application should build the certificate chain to be
434 provided to the client for the extra certificates provided via \fB\-xkey infile\fR,
435 \&\fB\-xcert infile\fR, \fB\-xchain\fR options.
436 .IP "\fB\-xcertform PEM|DER\fR, \fB\-xkeyform PEM|DER\fR" 4
437 .IX Item "-xcertform PEM|DER, -xkeyform PEM|DER"
438 Extra certificate and private key format respectively.
439 .IP "\fB\-nbio_test\fR" 4
440 .IX Item "-nbio_test"
441 Tests non blocking I/O.
442 .IP "\fB\-crlf\fR" 4
443 .IX Item "-crlf"
444 This option translated a line feed from the terminal into \s-1CR+LF.\s0
445 .IP "\fB\-debug\fR" 4
446 .IX Item "-debug"
447 Print extensive debugging information including a hex dump of all traffic.
448 .IP "\fB\-msg\fR" 4
449 .IX Item "-msg"
450 Show all protocol messages with hex dump.
451 .IP "\fB\-msgfile outfile\fR" 4
452 .IX Item "-msgfile outfile"
453 File to send output of \fB\-msg\fR or \fB\-trace\fR to, default standard output.
454 .IP "\fB\-state\fR" 4
455 .IX Item "-state"
456 Prints the \s-1SSL\s0 session states.
457 .IP "\fB\-CAfile infile\fR" 4
458 .IX Item "-CAfile infile"
459 A file containing trusted certificates to use during client authentication
460 and to use when attempting to build the server certificate chain. The list
461 is also used in the list of acceptable client CAs passed to the client when
462 a certificate is requested.
463 .IP "\fB\-CApath dir\fR" 4
464 .IX Item "-CApath dir"
465 The directory to use for client certificate verification. This directory
466 must be in \*(L"hash format\*(R", see \fIverify\fR\|(1) for more information. These are
467 also used when building the server certificate chain.
468 .IP "\fB\-chainCApath dir\fR" 4
469 .IX Item "-chainCApath dir"
470 The directory to use for building the chain provided to the client. This
471 directory must be in \*(L"hash format\*(R", see \fIverify\fR\|(1) for more information.
472 .IP "\fB\-chainCAfile file\fR" 4
473 .IX Item "-chainCAfile file"
474 A file containing trusted certificates to use when attempting to build the
475 server certificate chain.
476 .IP "\fB\-no\-CAfile\fR" 4
477 .IX Item "-no-CAfile"
478 Do not load the trusted \s-1CA\s0 certificates from the default file location.
479 .IP "\fB\-no\-CApath\fR" 4
480 .IX Item "-no-CApath"
481 Do not load the trusted \s-1CA\s0 certificates from the default directory location.
482 .IP "\fB\-nocert\fR" 4
483 .IX Item "-nocert"
484 If this option is set then no certificate is used. This restricts the
485 cipher suites available to the anonymous ones (currently just anonymous
486 \&\s-1DH\s0).
487 .IP "\fB\-quiet\fR" 4
488 .IX Item "-quiet"
489 Inhibit printing of session and certificate information.
490 .IP "\fB\-www\fR" 4
491 .IX Item "-www"
492 Sends a status message back to the client when it connects. This includes
493 information about the ciphers used and various session parameters.
494 The output is in \s-1HTML\s0 format so this option will normally be used with a
495 web browser.
496 .IP "\fB\-WWW\fR" 4
497 .IX Item "-WWW"
498 Emulates a simple web server. Pages will be resolved relative to the
499 current directory, for example if the \s-1URL\s0 https://myhost/page.html is
500 requested the file ./page.html will be loaded.
501 .IP "\fB\-tlsextdebug\fR" 4
502 .IX Item "-tlsextdebug"
503 Print a hex dump of any \s-1TLS\s0 extensions received from the server.
504 .IP "\fB\-HTTP\fR" 4
505 .IX Item "-HTTP"
506 Emulates a simple web server. Pages will be resolved relative to the
507 current directory, for example if the \s-1URL\s0 https://myhost/page.html is
508 requested the file ./page.html will be loaded. The files loaded are
509 assumed to contain a complete and correct \s-1HTTP\s0 response (lines that
510 are part of the \s-1HTTP\s0 response line and headers must end with \s-1CRLF\s0).
511 .IP "\fB\-id_prefix val\fR" 4
512 .IX Item "-id_prefix val"
513 Generate \s-1SSL/TLS\s0 session IDs prefixed by \fBval\fR. This is mostly useful
514 for testing any \s-1SSL/TLS\s0 code (eg. proxies) that wish to deal with multiple
515 servers, when each of which might be generating a unique range of session
516 IDs (eg. with a certain prefix).
517 .IP "\fB\-rand file...\fR" 4
518 .IX Item "-rand file..."
519 A file or files containing random data used to seed the random number
520 generator.
521 Multiple files can be specified separated by an OS-dependent character.
522 The separator is \fB;\fR for MS-Windows, \fB,\fR for OpenVMS, and \fB:\fR for
523 all others.
524 .IP "[\fB\-writerand file\fR]" 4
525 .IX Item "[-writerand file]"
526 Writes random data to the specified \fIfile\fR upon exit.
527 This can be used with a subsequent \fB\-rand\fR flag.
528 .IP "\fB\-verify_return_error\fR" 4
529 .IX Item "-verify_return_error"
530 Verification errors normally just print a message but allow the
531 connection to continue, for debugging purposes.
532 If this option is used, then verification errors close the connection.
533 .IP "\fB\-status\fR" 4
534 .IX Item "-status"
535 Enables certificate status request support (aka \s-1OCSP\s0 stapling).
536 .IP "\fB\-status_verbose\fR" 4
537 .IX Item "-status_verbose"
538 Enables certificate status request support (aka \s-1OCSP\s0 stapling) and gives
539 a verbose printout of the \s-1OCSP\s0 response.
540 .IP "\fB\-status_timeout int\fR" 4
541 .IX Item "-status_timeout int"
542 Sets the timeout for \s-1OCSP\s0 response to \fBint\fR seconds.
543 .IP "\fB\-status_url val\fR" 4
544 .IX Item "-status_url val"
545 Sets a fallback responder \s-1URL\s0 to use if no responder \s-1URL\s0 is present in the
546 server certificate. Without this option an error is returned if the server
547 certificate does not contain a responder address.
548 .IP "\fB\-status_file infile\fR" 4
549 .IX Item "-status_file infile"
550 Overrides any \s-1OCSP\s0 responder URLs from the certificate and always provides the
551 \&\s-1OCSP\s0 Response stored in the file. The file must be in \s-1DER\s0 format.
552 .IP "\fB\-trace\fR" 4
553 .IX Item "-trace"
554 Show verbose trace output of protocol messages. OpenSSL needs to be compiled
555 with \fBenable-ssl-trace\fR for this option to work.
556 .IP "\fB\-brief\fR" 4
557 .IX Item "-brief"
558 Provide a brief summary of connection parameters instead of the normal verbose
559 output.
560 .IP "\fB\-rev\fR" 4
561 .IX Item "-rev"
562 Simple test server which just reverses the text received from the client
563 and sends it back to the server. Also sets \fB\-brief\fR.
564 .IP "\fB\-async\fR" 4
565 .IX Item "-async"
566 Switch on asynchronous mode. Cryptographic operations will be performed
567 asynchronously. This will only have an effect if an asynchronous capable engine
568 is also used via the \fB\-engine\fR option. For test purposes the dummy async engine
569 (dasync) can be used (if available).
570 .IP "\fB\-max_send_frag +int\fR" 4
571 .IX Item "-max_send_frag +int"
572 The maximum size of data fragment to send.
573 See \fISSL_CTX_set_max_send_fragment\fR\|(3) for further information.
574 .IP "\fB\-split_send_frag +int\fR" 4
575 .IX Item "-split_send_frag +int"
576 The size used to split data for encrypt pipelines. If more data is written in
577 one go than this value then it will be split into multiple pipelines, up to the
578 maximum number of pipelines defined by max_pipelines. This only has an effect if
579 a suitable cipher suite has been negotiated, an engine that supports pipelining
580 has been loaded, and max_pipelines is greater than 1. See
581 \&\fISSL_CTX_set_split_send_fragment\fR\|(3) for further information.
582 .IP "\fB\-max_pipelines +int\fR" 4
583 .IX Item "-max_pipelines +int"
584 The maximum number of encrypt/decrypt pipelines to be used. This will only have
585 an effect if an engine has been loaded that supports pipelining (e.g. the dasync
586 engine) and a suitable cipher suite has been negotiated. The default value is 1.
587 See \fISSL_CTX_set_max_pipelines\fR\|(3) for further information.
588 .IP "\fB\-read_buf +int\fR" 4
589 .IX Item "-read_buf +int"
590 The default read buffer size to be used for connections. This will only have an
591 effect if the buffer size is larger than the size that would otherwise be used
592 and pipelining is in use (see \fISSL_CTX_set_default_read_buffer_len\fR\|(3) for
593 further information).
594 .IP "\fB\-ssl2\fR, \fB\-ssl3\fR, \fB\-tls1\fR, \fB\-tls1_1\fR, \fB\-tls1_2\fR, \fB\-tls1_3\fR, \fB\-no_ssl2\fR, \fB\-no_ssl3\fR, \fB\-no_tls1\fR, \fB\-no_tls1_1\fR, \fB\-no_tls1_2\fR, \fB\-no_tls1_3\fR" 4
595 .IX Item "-ssl2, -ssl3, -tls1, -tls1_1, -tls1_2, -tls1_3, -no_ssl2, -no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2, -no_tls1_3"
596 These options require or disable the use of the specified \s-1SSL\s0 or \s-1TLS\s0 protocols.
597 By default \fBs_server\fR will negotiate the highest mutually supported protocol
598 version.
599 When a specific \s-1TLS\s0 version is required, only that version will be accepted
600 from the client.
601 Note that not all protocols and flags may be available, depending on how
602 OpenSSL was built.
603 .IP "\fB\-bugs\fR" 4
604 .IX Item "-bugs"
605 There are several known bug in \s-1SSL\s0 and \s-1TLS\s0 implementations. Adding this
606 option enables various workarounds.
607 .IP "\fB\-no_comp\fR" 4
608 .IX Item "-no_comp"
609 Disable negotiation of \s-1TLS\s0 compression.
610 \&\s-1TLS\s0 compression is not recommended and is off by default as of
611 OpenSSL 1.1.0.
612 .IP "\fB\-comp\fR" 4
613 .IX Item "-comp"
614 Enable negotiation of \s-1TLS\s0 compression.
615 This option was introduced in OpenSSL 1.1.0.
616 \&\s-1TLS\s0 compression is not recommended and is off by default as of
617 OpenSSL 1.1.0.
618 .IP "\fB\-no_ticket\fR" 4
619 .IX Item "-no_ticket"
620 Disable RFC4507bis session ticket support.
621 .IP "\fB\-serverpref\fR" 4
622 .IX Item "-serverpref"
623 Use the server's cipher preferences, rather than the client's preferences.
624 .IP "\fB\-prioritize_chacha\fR" 4
625 .IX Item "-prioritize_chacha"
626 Prioritize ChaCha ciphers when preferred by clients. Requires \fB\-serverpref\fR.
627 .IP "\fB\-no_resumption_on_reneg\fR" 4
628 .IX Item "-no_resumption_on_reneg"
629 Set the \fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR option.
630 .IP "\fB\-client_sigalgs val\fR" 4
631 .IX Item "-client_sigalgs val"
632 Signature algorithms to support for client certificate authentication
633 (colon-separated list).
634 .IP "\fB\-named_curve val\fR" 4
635 .IX Item "-named_curve val"
636 Specifies the elliptic curve to use. \s-1NOTE:\s0 this is single curve, not a list.
637 For a list of all possible curves, use:
638 .Sp
639 .Vb 1
640 \&    $ openssl ecparam \-list_curves
641 .Ve
642 .IP "\fB\-cipher val\fR" 4
643 .IX Item "-cipher val"
644 This allows the list of TLSv1.2 and below ciphersuites used by the server to be
645 modified. This list is combined with any TLSv1.3 ciphersuites that have been
646 configured. When the client sends a list of supported ciphers the first client
647 cipher also included in the server list is used. Because the client specifies
648 the preference order, the order of the server cipherlist is irrelevant. See
649 the \fBciphers\fR command for more information.
650 .IP "\fB\-ciphersuites val\fR" 4
651 .IX Item "-ciphersuites val"
652 This allows the list of TLSv1.3 ciphersuites used by the server to be modified.
653 This list is combined with any TLSv1.2 and below ciphersuites that have been
654 configured. When the client sends a list of supported ciphers the first client
655 cipher also included in the server list is used. Because the client specifies
656 the preference order, the order of the server cipherlist is irrelevant. See
657 the \fBciphers\fR command for more information. The format for this list is a
658 simple colon (\*(L":\*(R") separated list of TLSv1.3 ciphersuite names.
659 .IP "\fB\-dhparam infile\fR" 4
660 .IX Item "-dhparam infile"
661 The \s-1DH\s0 parameter file to use. The ephemeral \s-1DH\s0 cipher suites generate keys
662 using a set of \s-1DH\s0 parameters. If not specified then an attempt is made to
663 load the parameters from the server certificate file.
664 If this fails then a static set of parameters hard coded into the \fBs_server\fR
665 program will be used.
666 .IP "\fB\-attime\fR, \fB\-check_ss_sig\fR, \fB\-crl_check\fR, \fB\-crl_check_all\fR, \fB\-explicit_policy\fR, \fB\-extended_crl\fR, \fB\-ignore_critical\fR, \fB\-inhibit_any\fR, \fB\-inhibit_map\fR, \fB\-no_alt_chains\fR, \fB\-no_check_time\fR, \fB\-partial_chain\fR, \fB\-policy\fR, \fB\-policy_check\fR, \fB\-policy_print\fR, \fB\-purpose\fR, \fB\-suiteB_128\fR, \fB\-suiteB_128_only\fR, \fB\-suiteB_192\fR, \fB\-trusted_first\fR, \fB\-use_deltas\fR, \fB\-auth_level\fR, \fB\-verify_depth\fR, \fB\-verify_email\fR, \fB\-verify_hostname\fR, \fB\-verify_ip\fR, \fB\-verify_name\fR, \fB\-x509_strict\fR" 4
667 .IX Item "-attime, -check_ss_sig, -crl_check, -crl_check_all, -explicit_policy, -extended_crl, -ignore_critical, -inhibit_any, -inhibit_map, -no_alt_chains, -no_check_time, -partial_chain, -policy, -policy_check, -policy_print, -purpose, -suiteB_128, -suiteB_128_only, -suiteB_192, -trusted_first, -use_deltas, -auth_level, -verify_depth, -verify_email, -verify_hostname, -verify_ip, -verify_name, -x509_strict"
668 Set different peer certificate verification options.
669 See the \fIverify\fR\|(1) manual page for details.
670 .IP "\fB\-crl_check\fR, \fB\-crl_check_all\fR" 4
671 .IX Item "-crl_check, -crl_check_all"
672 Check the peer certificate has not been revoked by its \s-1CA.\s0
673 The \s-1CRL\s0(s) are appended to the certificate file. With the \fB\-crl_check_all\fR
674 option all CRLs of all CAs in the chain are checked.
675 .IP "\fB\-nbio\fR" 4
676 .IX Item "-nbio"
677 Turns on non blocking I/O.
678 .IP "\fB\-psk_identity val\fR" 4
679 .IX Item "-psk_identity val"
680 Expect the client to send \s-1PSK\s0 identity \fBval\fR when using a \s-1PSK\s0
681 cipher suite, and warn if they do not.  By default, the expected \s-1PSK\s0
682 identity is the string \*(L"Client_identity\*(R".
683 .IP "\fB\-psk_hint val\fR" 4
684 .IX Item "-psk_hint val"
685 Use the \s-1PSK\s0 identity hint \fBval\fR when using a \s-1PSK\s0 cipher suite.
686 .IP "\fB\-psk val\fR" 4
687 .IX Item "-psk val"
688 Use the \s-1PSK\s0 key \fBval\fR when using a \s-1PSK\s0 cipher suite. The key is
689 given as a hexadecimal number without leading 0x, for example \-psk
690 1a2b3c4d.
691 This option must be provided in order to use a \s-1PSK\s0 cipher.
692 .IP "\fB\-psk_session file\fR" 4
693 .IX Item "-psk_session file"
694 Use the pem encoded \s-1SSL_SESSION\s0 data stored in \fBfile\fR as the basis of a \s-1PSK.\s0
695 Note that this will only work if TLSv1.3 is negotiated.
696 .IP "\fB\-listen\fR" 4
697 .IX Item "-listen"
698 This option can only be used in conjunction with one of the \s-1DTLS\s0 options above.
699 With this option \fBs_server\fR will listen on a \s-1UDP\s0 port for incoming connections.
700 Any ClientHellos that arrive will be checked to see if they have a cookie in
701 them or not.
702 Any without a cookie will be responded to with a HelloVerifyRequest.
703 If a ClientHello with a cookie is received then \fBs_server\fR will connect to
704 that peer and complete the handshake.
705 .IP "\fB\-dtls\fR, \fB\-dtls1\fR, \fB\-dtls1_2\fR" 4
706 .IX Item "-dtls, -dtls1, -dtls1_2"
707 These options make \fBs_server\fR use \s-1DTLS\s0 protocols instead of \s-1TLS.\s0
708 With \fB\-dtls\fR, \fBs_server\fR will negotiate any supported \s-1DTLS\s0 protocol version,
709 whilst \fB\-dtls1\fR and \fB\-dtls1_2\fR will only support DTLSv1.0 and DTLSv1.2
710 respectively.
711 .IP "\fB\-sctp\fR" 4
712 .IX Item "-sctp"
713 Use \s-1SCTP\s0 for the transport protocol instead of \s-1UDP\s0 in \s-1DTLS.\s0 Must be used in
714 conjunction with \fB\-dtls\fR, \fB\-dtls1\fR or \fB\-dtls1_2\fR. This option is only
715 available where OpenSSL has support for \s-1SCTP\s0 enabled.
716 .IP "\fB\-no_dhe\fR" 4
717 .IX Item "-no_dhe"
718 If this option is set then no \s-1DH\s0 parameters will be loaded effectively
719 disabling the ephemeral \s-1DH\s0 cipher suites.
720 .IP "\fB\-alpn val\fR, \fB\-nextprotoneg val\fR" 4
721 .IX Item "-alpn val, -nextprotoneg val"
722 These flags enable the Enable the Application-Layer Protocol Negotiation
723 or Next Protocol Negotiation (\s-1NPN\s0) extension, respectively. \s-1ALPN\s0 is the
724 \&\s-1IETF\s0 standard and replaces \s-1NPN.\s0
725 The \fBval\fR list is a comma-separated list of supported protocol
726 names.  The list should contain the most desirable protocols first.
727 Protocol names are printable \s-1ASCII\s0 strings, for example \*(L"http/1.1\*(R" or
728 \&\*(L"spdy/3\*(R".
729 The flag \fB\-nextprotoneg\fR cannot be specified if \fB\-tls1_3\fR is used.
730 .IP "\fB\-engine val\fR" 4
731 .IX Item "-engine val"
732 Specifying an engine (by its unique id string in \fBval\fR) will cause \fBs_server\fR
733 to attempt to obtain a functional reference to the specified engine,
734 thus initialising it if needed. The engine will then be set as the default
735 for all available algorithms.
736 .IP "\fB\-keylogfile outfile\fR" 4
737 .IX Item "-keylogfile outfile"
738 Appends \s-1TLS\s0 secrets to the specified keylog file such that external programs
739 (like Wireshark) can decrypt \s-1TLS\s0 connections.
740 .IP "\fB\-max_early_data int\fR" 4
741 .IX Item "-max_early_data int"
742 Change the default maximum early data bytes that are specified for new sessions
743 and any incoming early data (when used in conjunction with the \fB\-early_data\fR
744 flag). The default value is approximately 16k. The argument must be an integer
745 greater than or equal to 0.
746 .IP "\fB\-early_data\fR" 4
747 .IX Item "-early_data"
748 Accept early data where possible.
749 .IP "\fB\-anti_replay\fR, \fB\-no_anti_replay\fR" 4
750 .IX Item "-anti_replay, -no_anti_replay"
751 Switches replay protection on or off, respectively. Replay protection is on by
752 default unless overridden by a configuration file. When it is on, OpenSSL will
753 automatically detect if a session ticket has been used more than once, TLSv1.3
754 has been negotiated, and early data is enabled on the server. A full handshake
755 is forced if a session ticket is used a second or subsequent time. Any early
756 data that was sent will be rejected.
757 .SH "CONNECTED COMMANDS"
758 .IX Header "CONNECTED COMMANDS"
759 If a connection request is established with an \s-1SSL\s0 client and neither the
760 \&\fB\-www\fR nor the \fB\-WWW\fR option has been used then normally any data received
761 from the client is displayed and any key presses will be sent to the client.
762 .PP
763 Certain commands are also recognized which perform special operations. These
764 commands are a letter which must appear at the start of a line. They are listed
765 below.
766 .IP "\fBq\fR" 4
767 .IX Item "q"
768 End the current \s-1SSL\s0 connection but still accept new connections.
769 .IP "\fBQ\fR" 4
770 .IX Item "Q"
771 End the current \s-1SSL\s0 connection and exit.
772 .IP "\fBr\fR" 4
773 .IX Item "r"
774 Renegotiate the \s-1SSL\s0 session (TLSv1.2 and below only).
775 .IP "\fBR\fR" 4
776 .IX Item "R"
777 Renegotiate the \s-1SSL\s0 session and request a client certificate (TLSv1.2 and below
778 only).
779 .IP "\fBP\fR" 4
780 .IX Item "P"
781 Send some plain text down the underlying \s-1TCP\s0 connection: this should
782 cause the client to disconnect due to a protocol violation.
783 .IP "\fBS\fR" 4
784 .IX Item "S"
785 Print out some session cache status information.
786 .IP "\fBB\fR" 4
787 .IX Item "B"
788 Send a heartbeat message to the client (\s-1DTLS\s0 only)
789 .IP "\fBk\fR" 4
790 .IX Item "k"
791 Send a key update message to the client (TLSv1.3 only)
792 .IP "\fBK\fR" 4
793 .IX Item "K"
794 Send a key update message to the client and request one back (TLSv1.3 only)
795 .IP "\fBc\fR" 4
796 .IX Item "c"
797 Send a certificate request to the client (TLSv1.3 only)
798 .SH "NOTES"
799 .IX Header "NOTES"
800 \&\fBs_server\fR can be used to debug \s-1SSL\s0 clients. To accept connections from
801 a web browser the command:
802 .PP
803 .Vb 1
804 \& openssl s_server \-accept 443 \-www
805 .Ve
806 .PP
807 can be used for example.
808 .PP
809 Although specifying an empty list of CAs when requesting a client certificate
810 is strictly speaking a protocol violation, some \s-1SSL\s0 clients interpret this to
811 mean any \s-1CA\s0 is acceptable. This is useful for debugging purposes.
812 .PP
813 The session parameters can printed out using the \fBsess_id\fR program.
814 .SH "BUGS"
815 .IX Header "BUGS"
816 Because this program has a lot of options and also because some of the
817 techniques used are rather old, the C source of \fBs_server\fR is rather hard to
818 read and not a model of how things should be done.
819 A typical \s-1SSL\s0 server program would be much simpler.
820 .PP
821 The output of common ciphers is wrong: it just gives the list of ciphers that
822 OpenSSL recognizes and the client supports.
823 .PP
824 There should be a way for the \fBs_server\fR program to print out details of any
825 unknown cipher suites a client says it supports.
826 .SH "SEE ALSO"
827 .IX Header "SEE ALSO"
828 \&\fISSL_CONF_cmd\fR\|(3), \fIsess_id\fR\|(1), \fIs_client\fR\|(1), \fIciphers\fR\|(1)
829 \&\fISSL_CTX_set_max_send_fragment\fR\|(3),
830 \&\fISSL_CTX_set_split_send_fragment\fR\|(3),
831 \&\fISSL_CTX_set_max_pipelines\fR\|(3)
832 .SH "HISTORY"
833 .IX Header "HISTORY"
834 The \-no_alt_chains option was first added to OpenSSL 1.1.0.
835 .PP
836 The \-allow\-no\-dhe\-kex and \-prioritize_chacha options were first added to
837 OpenSSL 1.1.1.
838 .SH "COPYRIGHT"
839 .IX Header "COPYRIGHT"
840 Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
841 .PP
842 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
843 this file except in compliance with the License.  You can obtain a copy
844 in the file \s-1LICENSE\s0 in the source distribution or at
845 <https://www.openssl.org/source/license.html>.