]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/usr.bin/openssl/man/s_server.1
MFV r344364:
[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-11-20" "1.1.1a" "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. Cannot be used in conjunction with \fB\-early_data\fR.
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. Cannot be used in conjunction
501 with \fB\-early_data\fR.
502 .IP "\fB\-tlsextdebug\fR" 4
503 .IX Item "-tlsextdebug"
504 Print a hex dump of any \s-1TLS\s0 extensions received from the server.
505 .IP "\fB\-HTTP\fR" 4
506 .IX Item "-HTTP"
507 Emulates a simple web server. Pages will be resolved relative to the
508 current directory, for example if the \s-1URL\s0 https://myhost/page.html is
509 requested the file ./page.html will be loaded. The files loaded are
510 assumed to contain a complete and correct \s-1HTTP\s0 response (lines that
511 are part of the \s-1HTTP\s0 response line and headers must end with \s-1CRLF\s0). Cannot be
512 used in conjunction with \fB\-early_data\fR.
513 .IP "\fB\-id_prefix val\fR" 4
514 .IX Item "-id_prefix val"
515 Generate \s-1SSL/TLS\s0 session IDs prefixed by \fBval\fR. This is mostly useful
516 for testing any \s-1SSL/TLS\s0 code (eg. proxies) that wish to deal with multiple
517 servers, when each of which might be generating a unique range of session
518 IDs (eg. with a certain prefix).
519 .IP "\fB\-rand file...\fR" 4
520 .IX Item "-rand file..."
521 A file or files containing random data used to seed the random number
522 generator.
523 Multiple files can be specified separated by an OS-dependent character.
524 The separator is \fB;\fR for MS-Windows, \fB,\fR for OpenVMS, and \fB:\fR for
525 all others.
526 .IP "[\fB\-writerand file\fR]" 4
527 .IX Item "[-writerand file]"
528 Writes random data to the specified \fIfile\fR upon exit.
529 This can be used with a subsequent \fB\-rand\fR flag.
530 .IP "\fB\-verify_return_error\fR" 4
531 .IX Item "-verify_return_error"
532 Verification errors normally just print a message but allow the
533 connection to continue, for debugging purposes.
534 If this option is used, then verification errors close the connection.
535 .IP "\fB\-status\fR" 4
536 .IX Item "-status"
537 Enables certificate status request support (aka \s-1OCSP\s0 stapling).
538 .IP "\fB\-status_verbose\fR" 4
539 .IX Item "-status_verbose"
540 Enables certificate status request support (aka \s-1OCSP\s0 stapling) and gives
541 a verbose printout of the \s-1OCSP\s0 response.
542 .IP "\fB\-status_timeout int\fR" 4
543 .IX Item "-status_timeout int"
544 Sets the timeout for \s-1OCSP\s0 response to \fBint\fR seconds.
545 .IP "\fB\-status_url val\fR" 4
546 .IX Item "-status_url val"
547 Sets a fallback responder \s-1URL\s0 to use if no responder \s-1URL\s0 is present in the
548 server certificate. Without this option an error is returned if the server
549 certificate does not contain a responder address.
550 .IP "\fB\-status_file infile\fR" 4
551 .IX Item "-status_file infile"
552 Overrides any \s-1OCSP\s0 responder URLs from the certificate and always provides the
553 \&\s-1OCSP\s0 Response stored in the file. The file must be in \s-1DER\s0 format.
554 .IP "\fB\-trace\fR" 4
555 .IX Item "-trace"
556 Show verbose trace output of protocol messages. OpenSSL needs to be compiled
557 with \fBenable-ssl-trace\fR for this option to work.
558 .IP "\fB\-brief\fR" 4
559 .IX Item "-brief"
560 Provide a brief summary of connection parameters instead of the normal verbose
561 output.
562 .IP "\fB\-rev\fR" 4
563 .IX Item "-rev"
564 Simple test server which just reverses the text received from the client
565 and sends it back to the server. Also sets \fB\-brief\fR. Cannot be used in
566 conjunction with \fB\-early_data\fR.
567 .IP "\fB\-async\fR" 4
568 .IX Item "-async"
569 Switch on asynchronous mode. Cryptographic operations will be performed
570 asynchronously. This will only have an effect if an asynchronous capable engine
571 is also used via the \fB\-engine\fR option. For test purposes the dummy async engine
572 (dasync) can be used (if available).
573 .IP "\fB\-max_send_frag +int\fR" 4
574 .IX Item "-max_send_frag +int"
575 The maximum size of data fragment to send.
576 See \fISSL_CTX_set_max_send_fragment\fR\|(3) for further information.
577 .IP "\fB\-split_send_frag +int\fR" 4
578 .IX Item "-split_send_frag +int"
579 The size used to split data for encrypt pipelines. If more data is written in
580 one go than this value then it will be split into multiple pipelines, up to the
581 maximum number of pipelines defined by max_pipelines. This only has an effect if
582 a suitable cipher suite has been negotiated, an engine that supports pipelining
583 has been loaded, and max_pipelines is greater than 1. See
584 \&\fISSL_CTX_set_split_send_fragment\fR\|(3) for further information.
585 .IP "\fB\-max_pipelines +int\fR" 4
586 .IX Item "-max_pipelines +int"
587 The maximum number of encrypt/decrypt pipelines to be used. This will only have
588 an effect if an engine has been loaded that supports pipelining (e.g. the dasync
589 engine) and a suitable cipher suite has been negotiated. The default value is 1.
590 See \fISSL_CTX_set_max_pipelines\fR\|(3) for further information.
591 .IP "\fB\-read_buf +int\fR" 4
592 .IX Item "-read_buf +int"
593 The default read buffer size to be used for connections. This will only have an
594 effect if the buffer size is larger than the size that would otherwise be used
595 and pipelining is in use (see \fISSL_CTX_set_default_read_buffer_len\fR\|(3) for
596 further information).
597 .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
598 .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"
599 These options require or disable the use of the specified \s-1SSL\s0 or \s-1TLS\s0 protocols.
600 By default \fBs_server\fR will negotiate the highest mutually supported protocol
601 version.
602 When a specific \s-1TLS\s0 version is required, only that version will be accepted
603 from the client.
604 Note that not all protocols and flags may be available, depending on how
605 OpenSSL was built.
606 .IP "\fB\-bugs\fR" 4
607 .IX Item "-bugs"
608 There are several known bug in \s-1SSL\s0 and \s-1TLS\s0 implementations. Adding this
609 option enables various workarounds.
610 .IP "\fB\-no_comp\fR" 4
611 .IX Item "-no_comp"
612 Disable negotiation of \s-1TLS\s0 compression.
613 \&\s-1TLS\s0 compression is not recommended and is off by default as of
614 OpenSSL 1.1.0.
615 .IP "\fB\-comp\fR" 4
616 .IX Item "-comp"
617 Enable negotiation of \s-1TLS\s0 compression.
618 This option was introduced in OpenSSL 1.1.0.
619 \&\s-1TLS\s0 compression is not recommended and is off by default as of
620 OpenSSL 1.1.0.
621 .IP "\fB\-no_ticket\fR" 4
622 .IX Item "-no_ticket"
623 Disable RFC4507bis session ticket support.
624 .IP "\fB\-serverpref\fR" 4
625 .IX Item "-serverpref"
626 Use the server's cipher preferences, rather than the client's preferences.
627 .IP "\fB\-prioritize_chacha\fR" 4
628 .IX Item "-prioritize_chacha"
629 Prioritize ChaCha ciphers when preferred by clients. Requires \fB\-serverpref\fR.
630 .IP "\fB\-no_resumption_on_reneg\fR" 4
631 .IX Item "-no_resumption_on_reneg"
632 Set the \fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR option.
633 .IP "\fB\-client_sigalgs val\fR" 4
634 .IX Item "-client_sigalgs val"
635 Signature algorithms to support for client certificate authentication
636 (colon-separated list).
637 .IP "\fB\-named_curve val\fR" 4
638 .IX Item "-named_curve val"
639 Specifies the elliptic curve to use. \s-1NOTE:\s0 this is single curve, not a list.
640 For a list of all possible curves, use:
641 .Sp
642 .Vb 1
643 \&    $ openssl ecparam \-list_curves
644 .Ve
645 .IP "\fB\-cipher val\fR" 4
646 .IX Item "-cipher val"
647 This allows the list of TLSv1.2 and below ciphersuites used by the server to be
648 modified. This list is combined with any TLSv1.3 ciphersuites that have been
649 configured. When the client sends a list of supported ciphers the first client
650 cipher also included in the server list is used. Because the client specifies
651 the preference order, the order of the server cipherlist is irrelevant. See
652 the \fBciphers\fR command for more information.
653 .IP "\fB\-ciphersuites val\fR" 4
654 .IX Item "-ciphersuites val"
655 This allows the list of TLSv1.3 ciphersuites used by the server to be modified.
656 This list is combined with any TLSv1.2 and below ciphersuites that have been
657 configured. When the client sends a list of supported ciphers the first client
658 cipher also included in the server list is used. Because the client specifies
659 the preference order, the order of the server cipherlist is irrelevant. See
660 the \fBciphers\fR command for more information. The format for this list is a
661 simple colon (\*(L":\*(R") separated list of TLSv1.3 ciphersuite names.
662 .IP "\fB\-dhparam infile\fR" 4
663 .IX Item "-dhparam infile"
664 The \s-1DH\s0 parameter file to use. The ephemeral \s-1DH\s0 cipher suites generate keys
665 using a set of \s-1DH\s0 parameters. If not specified then an attempt is made to
666 load the parameters from the server certificate file.
667 If this fails then a static set of parameters hard coded into the \fBs_server\fR
668 program will be used.
669 .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
670 .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"
671 Set different peer certificate verification options.
672 See the \fIverify\fR\|(1) manual page for details.
673 .IP "\fB\-crl_check\fR, \fB\-crl_check_all\fR" 4
674 .IX Item "-crl_check, -crl_check_all"
675 Check the peer certificate has not been revoked by its \s-1CA.\s0
676 The \s-1CRL\s0(s) are appended to the certificate file. With the \fB\-crl_check_all\fR
677 option all CRLs of all CAs in the chain are checked.
678 .IP "\fB\-nbio\fR" 4
679 .IX Item "-nbio"
680 Turns on non blocking I/O.
681 .IP "\fB\-psk_identity val\fR" 4
682 .IX Item "-psk_identity val"
683 Expect the client to send \s-1PSK\s0 identity \fBval\fR when using a \s-1PSK\s0
684 cipher suite, and warn if they do not.  By default, the expected \s-1PSK\s0
685 identity is the string \*(L"Client_identity\*(R".
686 .IP "\fB\-psk_hint val\fR" 4
687 .IX Item "-psk_hint val"
688 Use the \s-1PSK\s0 identity hint \fBval\fR when using a \s-1PSK\s0 cipher suite.
689 .IP "\fB\-psk val\fR" 4
690 .IX Item "-psk val"
691 Use the \s-1PSK\s0 key \fBval\fR when using a \s-1PSK\s0 cipher suite. The key is
692 given as a hexadecimal number without leading 0x, for example \-psk
693 1a2b3c4d.
694 This option must be provided in order to use a \s-1PSK\s0 cipher.
695 .IP "\fB\-psk_session file\fR" 4
696 .IX Item "-psk_session file"
697 Use the pem encoded \s-1SSL_SESSION\s0 data stored in \fBfile\fR as the basis of a \s-1PSK.\s0
698 Note that this will only work if TLSv1.3 is negotiated.
699 .IP "\fB\-listen\fR" 4
700 .IX Item "-listen"
701 This option can only be used in conjunction with one of the \s-1DTLS\s0 options above.
702 With this option \fBs_server\fR will listen on a \s-1UDP\s0 port for incoming connections.
703 Any ClientHellos that arrive will be checked to see if they have a cookie in
704 them or not.
705 Any without a cookie will be responded to with a HelloVerifyRequest.
706 If a ClientHello with a cookie is received then \fBs_server\fR will connect to
707 that peer and complete the handshake.
708 .IP "\fB\-dtls\fR, \fB\-dtls1\fR, \fB\-dtls1_2\fR" 4
709 .IX Item "-dtls, -dtls1, -dtls1_2"
710 These options make \fBs_server\fR use \s-1DTLS\s0 protocols instead of \s-1TLS.\s0
711 With \fB\-dtls\fR, \fBs_server\fR will negotiate any supported \s-1DTLS\s0 protocol version,
712 whilst \fB\-dtls1\fR and \fB\-dtls1_2\fR will only support DTLSv1.0 and DTLSv1.2
713 respectively.
714 .IP "\fB\-sctp\fR" 4
715 .IX Item "-sctp"
716 Use \s-1SCTP\s0 for the transport protocol instead of \s-1UDP\s0 in \s-1DTLS.\s0 Must be used in
717 conjunction with \fB\-dtls\fR, \fB\-dtls1\fR or \fB\-dtls1_2\fR. This option is only
718 available where OpenSSL has support for \s-1SCTP\s0 enabled.
719 .IP "\fB\-no_dhe\fR" 4
720 .IX Item "-no_dhe"
721 If this option is set then no \s-1DH\s0 parameters will be loaded effectively
722 disabling the ephemeral \s-1DH\s0 cipher suites.
723 .IP "\fB\-alpn val\fR, \fB\-nextprotoneg val\fR" 4
724 .IX Item "-alpn val, -nextprotoneg val"
725 These flags enable the Enable the Application-Layer Protocol Negotiation
726 or Next Protocol Negotiation (\s-1NPN\s0) extension, respectively. \s-1ALPN\s0 is the
727 \&\s-1IETF\s0 standard and replaces \s-1NPN.\s0
728 The \fBval\fR list is a comma-separated list of supported protocol
729 names.  The list should contain the most desirable protocols first.
730 Protocol names are printable \s-1ASCII\s0 strings, for example \*(L"http/1.1\*(R" or
731 \&\*(L"spdy/3\*(R".
732 The flag \fB\-nextprotoneg\fR cannot be specified if \fB\-tls1_3\fR is used.
733 .IP "\fB\-engine val\fR" 4
734 .IX Item "-engine val"
735 Specifying an engine (by its unique id string in \fBval\fR) will cause \fBs_server\fR
736 to attempt to obtain a functional reference to the specified engine,
737 thus initialising it if needed. The engine will then be set as the default
738 for all available algorithms.
739 .IP "\fB\-keylogfile outfile\fR" 4
740 .IX Item "-keylogfile outfile"
741 Appends \s-1TLS\s0 secrets to the specified keylog file such that external programs
742 (like Wireshark) can decrypt \s-1TLS\s0 connections.
743 .IP "\fB\-max_early_data int\fR" 4
744 .IX Item "-max_early_data int"
745 Change the default maximum early data bytes that are specified for new sessions
746 and any incoming early data (when used in conjunction with the \fB\-early_data\fR
747 flag). The default value is approximately 16k. The argument must be an integer
748 greater than or equal to 0.
749 .IP "\fB\-early_data\fR" 4
750 .IX Item "-early_data"
751 Accept early data where possible. Cannot be used in conjunction with \fB\-www\fR,
752 \&\fB\-WWW\fR, \fB\-HTTP\fR or \fB\-rev\fR.
753 .IP "\fB\-anti_replay\fR, \fB\-no_anti_replay\fR" 4
754 .IX Item "-anti_replay, -no_anti_replay"
755 Switches replay protection on or off, respectively. Replay protection is on by
756 default unless overridden by a configuration file. When it is on, OpenSSL will
757 automatically detect if a session ticket has been used more than once, TLSv1.3
758 has been negotiated, and early data is enabled on the server. A full handshake
759 is forced if a session ticket is used a second or subsequent time. Any early
760 data that was sent will be rejected.
761 .SH "CONNECTED COMMANDS"
762 .IX Header "CONNECTED COMMANDS"
763 If a connection request is established with an \s-1SSL\s0 client and neither the
764 \&\fB\-www\fR nor the \fB\-WWW\fR option has been used then normally any data received
765 from the client is displayed and any key presses will be sent to the client.
766 .PP
767 Certain commands are also recognized which perform special operations. These
768 commands are a letter which must appear at the start of a line. They are listed
769 below.
770 .IP "\fBq\fR" 4
771 .IX Item "q"
772 End the current \s-1SSL\s0 connection but still accept new connections.
773 .IP "\fBQ\fR" 4
774 .IX Item "Q"
775 End the current \s-1SSL\s0 connection and exit.
776 .IP "\fBr\fR" 4
777 .IX Item "r"
778 Renegotiate the \s-1SSL\s0 session (TLSv1.2 and below only).
779 .IP "\fBR\fR" 4
780 .IX Item "R"
781 Renegotiate the \s-1SSL\s0 session and request a client certificate (TLSv1.2 and below
782 only).
783 .IP "\fBP\fR" 4
784 .IX Item "P"
785 Send some plain text down the underlying \s-1TCP\s0 connection: this should
786 cause the client to disconnect due to a protocol violation.
787 .IP "\fBS\fR" 4
788 .IX Item "S"
789 Print out some session cache status information.
790 .IP "\fBB\fR" 4
791 .IX Item "B"
792 Send a heartbeat message to the client (\s-1DTLS\s0 only)
793 .IP "\fBk\fR" 4
794 .IX Item "k"
795 Send a key update message to the client (TLSv1.3 only)
796 .IP "\fBK\fR" 4
797 .IX Item "K"
798 Send a key update message to the client and request one back (TLSv1.3 only)
799 .IP "\fBc\fR" 4
800 .IX Item "c"
801 Send a certificate request to the client (TLSv1.3 only)
802 .SH "NOTES"
803 .IX Header "NOTES"
804 \&\fBs_server\fR can be used to debug \s-1SSL\s0 clients. To accept connections from
805 a web browser the command:
806 .PP
807 .Vb 1
808 \& openssl s_server \-accept 443 \-www
809 .Ve
810 .PP
811 can be used for example.
812 .PP
813 Although specifying an empty list of CAs when requesting a client certificate
814 is strictly speaking a protocol violation, some \s-1SSL\s0 clients interpret this to
815 mean any \s-1CA\s0 is acceptable. This is useful for debugging purposes.
816 .PP
817 The session parameters can printed out using the \fBsess_id\fR program.
818 .SH "BUGS"
819 .IX Header "BUGS"
820 Because this program has a lot of options and also because some of the
821 techniques used are rather old, the C source of \fBs_server\fR is rather hard to
822 read and not a model of how things should be done.
823 A typical \s-1SSL\s0 server program would be much simpler.
824 .PP
825 The output of common ciphers is wrong: it just gives the list of ciphers that
826 OpenSSL recognizes and the client supports.
827 .PP
828 There should be a way for the \fBs_server\fR program to print out details of any
829 unknown cipher suites a client says it supports.
830 .SH "SEE ALSO"
831 .IX Header "SEE ALSO"
832 \&\fISSL_CONF_cmd\fR\|(3), \fIsess_id\fR\|(1), \fIs_client\fR\|(1), \fIciphers\fR\|(1)
833 \&\fISSL_CTX_set_max_send_fragment\fR\|(3),
834 \&\fISSL_CTX_set_split_send_fragment\fR\|(3),
835 \&\fISSL_CTX_set_max_pipelines\fR\|(3)
836 .SH "HISTORY"
837 .IX Header "HISTORY"
838 The \-no_alt_chains option was first added to OpenSSL 1.1.0.
839 .PP
840 The \-allow\-no\-dhe\-kex and \-prioritize_chacha options were first added to
841 OpenSSL 1.1.1.
842 .SH "COPYRIGHT"
843 .IX Header "COPYRIGHT"
844 Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
845 .PP
846 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
847 this file except in compliance with the License.  You can obtain a copy
848 in the file \s-1LICENSE\s0 in the source distribution or at
849 <https://www.openssl.org/source/license.html>.