1 | =pod
|
---|
2 | {- OpenSSL::safe::output_do_not_edit_headers(); -}
|
---|
3 |
|
---|
4 | =head1 NAME
|
---|
5 |
|
---|
6 | openssl-s_server - SSL/TLS server program
|
---|
7 |
|
---|
8 | =head1 SYNOPSIS
|
---|
9 |
|
---|
10 | B<openssl> B<s_server>
|
---|
11 | [B<-help>]
|
---|
12 | [B<-port> I<+int>]
|
---|
13 | [B<-accept> I<val>]
|
---|
14 | [B<-unix> I<val>]
|
---|
15 | [B<-4>]
|
---|
16 | [B<-6>]
|
---|
17 | [B<-unlink>]
|
---|
18 | [B<-context> I<val>]
|
---|
19 | [B<-verify> I<int>]
|
---|
20 | [B<-Verify> I<int>]
|
---|
21 | [B<-cert> I<infile>]
|
---|
22 | [B<-cert2> I<infile>]
|
---|
23 | [B<-certform> B<DER>|B<PEM>|B<P12>]
|
---|
24 | [B<-cert_chain> I<infile>]
|
---|
25 | [B<-build_chain>]
|
---|
26 | [B<-serverinfo> I<val>]
|
---|
27 | [B<-key> I<filename>|I<uri>]
|
---|
28 | [B<-key2> I<filename>|I<uri>]
|
---|
29 | [B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
|
---|
30 | [B<-pass> I<val>]
|
---|
31 | [B<-dcert> I<infile>]
|
---|
32 | [B<-dcertform> B<DER>|B<PEM>|B<P12>]
|
---|
33 | [B<-dcert_chain> I<infile>]
|
---|
34 | [B<-dkey> I<filename>|I<uri>]
|
---|
35 | [B<-dkeyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
|
---|
36 | [B<-dpass> I<val>]
|
---|
37 | [B<-nbio_test>]
|
---|
38 | [B<-crlf>]
|
---|
39 | [B<-debug>]
|
---|
40 | [B<-msg>]
|
---|
41 | [B<-msgfile> I<outfile>]
|
---|
42 | [B<-state>]
|
---|
43 | [B<-nocert>]
|
---|
44 | [B<-quiet>]
|
---|
45 | [B<-no_resume_ephemeral>]
|
---|
46 | [B<-www>]
|
---|
47 | [B<-WWW>]
|
---|
48 | [B<-http_server_binmode>]
|
---|
49 | [B<-no_ca_names>]
|
---|
50 | [B<-ignore_unexpected_eof>]
|
---|
51 | [B<-servername>]
|
---|
52 | [B<-servername_fatal>]
|
---|
53 | [B<-tlsextdebug>]
|
---|
54 | [B<-HTTP>]
|
---|
55 | [B<-id_prefix> I<val>]
|
---|
56 | [B<-keymatexport> I<val>]
|
---|
57 | [B<-keymatexportlen> I<+int>]
|
---|
58 | [B<-CRL> I<infile>]
|
---|
59 | [B<-CRLform> B<DER>|B<PEM>]
|
---|
60 | [B<-crl_download>]
|
---|
61 | [B<-chainCAfile> I<infile>]
|
---|
62 | [B<-chainCApath> I<dir>]
|
---|
63 | [B<-chainCAstore> I<uri>]
|
---|
64 | [B<-verifyCAfile> I<infile>]
|
---|
65 | [B<-verifyCApath> I<dir>]
|
---|
66 | [B<-verifyCAstore> I<uri>]
|
---|
67 | [B<-no_cache>]
|
---|
68 | [B<-ext_cache>]
|
---|
69 | [B<-verify_return_error>]
|
---|
70 | [B<-verify_quiet>]
|
---|
71 | [B<-ign_eof>]
|
---|
72 | [B<-no_ign_eof>]
|
---|
73 | [B<-no_etm>]
|
---|
74 | [B<-status>]
|
---|
75 | [B<-status_verbose>]
|
---|
76 | [B<-status_timeout> I<int>]
|
---|
77 | [B<-proxy> I<[http[s]://][userinfo@]host[:port][/path]>]
|
---|
78 | [B<-no_proxy> I<addresses>]
|
---|
79 | [B<-status_url> I<val>]
|
---|
80 | [B<-status_file> I<infile>]
|
---|
81 | [B<-ssl_config> I<val>]
|
---|
82 | [B<-trace>]
|
---|
83 | [B<-security_debug>]
|
---|
84 | [B<-security_debug_verbose>]
|
---|
85 | [B<-brief>]
|
---|
86 | [B<-rev>]
|
---|
87 | [B<-async>]
|
---|
88 | [B<-max_send_frag> I<+int>]
|
---|
89 | [B<-split_send_frag> I<+int>]
|
---|
90 | [B<-max_pipelines> I<+int>]
|
---|
91 | [B<-naccept> I<+int>]
|
---|
92 | [B<-read_buf> I<+int>]
|
---|
93 | [B<-bugs>]
|
---|
94 | [B<-no_comp>]
|
---|
95 | [B<-comp>]
|
---|
96 | [B<-no_ticket>]
|
---|
97 | [B<-serverpref>]
|
---|
98 | [B<-legacy_renegotiation>]
|
---|
99 | [B<-no_renegotiation>]
|
---|
100 | [B<-no_resumption_on_reneg>]
|
---|
101 | [B<-no_legacy_server_connect>]
|
---|
102 | [B<-allow_no_dhe_kex>]
|
---|
103 | [B<-prioritize_chacha>]
|
---|
104 | [B<-strict>]
|
---|
105 | [B<-sigalgs> I<val>]
|
---|
106 | [B<-client_sigalgs> I<val>]
|
---|
107 | [B<-groups> I<val>]
|
---|
108 | [B<-curves> I<val>]
|
---|
109 | [B<-named_curve> I<val>]
|
---|
110 | [B<-cipher> I<val>]
|
---|
111 | [B<-ciphersuites> I<val>]
|
---|
112 | [B<-dhparam> I<infile>]
|
---|
113 | [B<-record_padding> I<val>]
|
---|
114 | [B<-debug_broken_protocol>]
|
---|
115 | [B<-nbio>]
|
---|
116 | [B<-psk_identity> I<val>]
|
---|
117 | [B<-psk_hint> I<val>]
|
---|
118 | [B<-psk> I<val>]
|
---|
119 | [B<-psk_session> I<file>]
|
---|
120 | [B<-srpvfile> I<infile>]
|
---|
121 | [B<-srpuserseed> I<val>]
|
---|
122 | [B<-timeout>]
|
---|
123 | [B<-mtu> I<+int>]
|
---|
124 | [B<-listen>]
|
---|
125 | [B<-sctp>]
|
---|
126 | [B<-sctp_label_bug>]
|
---|
127 | [B<-use_srtp> I<val>]
|
---|
128 | [B<-no_dhe>]
|
---|
129 | [B<-nextprotoneg> I<val>]
|
---|
130 | [B<-alpn> I<val>]
|
---|
131 | [B<-sendfile>]
|
---|
132 | [B<-keylogfile> I<outfile>]
|
---|
133 | [B<-recv_max_early_data> I<int>]
|
---|
134 | [B<-max_early_data> I<int>]
|
---|
135 | [B<-early_data>]
|
---|
136 | [B<-stateless>]
|
---|
137 | [B<-anti_replay>]
|
---|
138 | [B<-no_anti_replay>]
|
---|
139 | [B<-num_tickets>]
|
---|
140 | {- $OpenSSL::safe::opt_name_synopsis -}
|
---|
141 | {- $OpenSSL::safe::opt_version_synopsis -}
|
---|
142 | {- $OpenSSL::safe::opt_v_synopsis -}
|
---|
143 | {- $OpenSSL::safe::opt_s_synopsis -}
|
---|
144 | {- $OpenSSL::safe::opt_x_synopsis -}
|
---|
145 | {- $OpenSSL::safe::opt_trust_synopsis -}
|
---|
146 | {- $OpenSSL::safe::opt_r_synopsis -}
|
---|
147 | {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -}
|
---|
148 |
|
---|
149 | =head1 DESCRIPTION
|
---|
150 |
|
---|
151 | This command implements a generic SSL/TLS server which
|
---|
152 | listens for connections on a given port using SSL/TLS.
|
---|
153 |
|
---|
154 | =head1 OPTIONS
|
---|
155 |
|
---|
156 | In addition to the options below, this command also supports
|
---|
157 | the common and server only options documented
|
---|
158 | L<SSL_CONF_cmd(3)/Supported Command Line Commands>
|
---|
159 |
|
---|
160 | =over 4
|
---|
161 |
|
---|
162 | =item B<-help>
|
---|
163 |
|
---|
164 | Print out a usage message.
|
---|
165 |
|
---|
166 | =item B<-port> I<+int>
|
---|
167 |
|
---|
168 | The TCP port to listen on for connections. If not specified 4433 is used.
|
---|
169 |
|
---|
170 | =item B<-accept> I<val>
|
---|
171 |
|
---|
172 | The optional TCP host and port to listen on for connections. If not specified, *:4433 is used.
|
---|
173 |
|
---|
174 | =item B<-unix> I<val>
|
---|
175 |
|
---|
176 | Unix domain socket to accept on.
|
---|
177 |
|
---|
178 | =item B<-4>
|
---|
179 |
|
---|
180 | Use IPv4 only.
|
---|
181 |
|
---|
182 | =item B<-6>
|
---|
183 |
|
---|
184 | Use IPv6 only.
|
---|
185 |
|
---|
186 | =item B<-unlink>
|
---|
187 |
|
---|
188 | For -unix, unlink any existing socket first.
|
---|
189 |
|
---|
190 | =item B<-context> I<val>
|
---|
191 |
|
---|
192 | Sets the SSL context id. It can be given any string value. If this option
|
---|
193 | is not present a default value will be used.
|
---|
194 |
|
---|
195 | =item B<-verify> I<int>, B<-Verify> I<int>
|
---|
196 |
|
---|
197 | The verify depth to use. This specifies the maximum length of the
|
---|
198 | client certificate chain and makes the server request a certificate from
|
---|
199 | the client. With the B<-verify> option a certificate is requested but the
|
---|
200 | client does not have to send one, with the B<-Verify> option the client
|
---|
201 | must supply a certificate or an error occurs.
|
---|
202 |
|
---|
203 | If the cipher suite cannot request a client certificate (for example an
|
---|
204 | anonymous cipher suite or PSK) this option has no effect.
|
---|
205 |
|
---|
206 | =item B<-cert> I<infile>
|
---|
207 |
|
---|
208 | The certificate to use, most servers cipher suites require the use of a
|
---|
209 | certificate and some require a certificate with a certain public key type:
|
---|
210 | for example the DSS cipher suites require a certificate containing a DSS
|
---|
211 | (DSA) key. If not specified then the filename F<server.pem> will be used.
|
---|
212 |
|
---|
213 | =item B<-cert2> I<infile>
|
---|
214 |
|
---|
215 | The certificate file to use for servername; default is C<server2.pem>.
|
---|
216 |
|
---|
217 | =item B<-certform> B<DER>|B<PEM>|B<P12>
|
---|
218 |
|
---|
219 | The server certificate file format; unspecified by default.
|
---|
220 | See L<openssl-format-options(1)> for details.
|
---|
221 |
|
---|
222 | =item B<-cert_chain>
|
---|
223 |
|
---|
224 | A file or URI of untrusted certificates to use when attempting to build the
|
---|
225 | certificate chain related to the certificate specified via the B<-cert> option.
|
---|
226 | The input can be in PEM, DER, or PKCS#12 format.
|
---|
227 |
|
---|
228 | =item B<-build_chain>
|
---|
229 |
|
---|
230 | Specify whether the application should build the server certificate chain to be
|
---|
231 | provided to the client.
|
---|
232 |
|
---|
233 | =item B<-serverinfo> I<val>
|
---|
234 |
|
---|
235 | A file containing one or more blocks of PEM data. Each PEM block
|
---|
236 | must encode a TLS ServerHello extension (2 bytes type, 2 bytes length,
|
---|
237 | followed by "length" bytes of extension data). If the client sends
|
---|
238 | an empty TLS ClientHello extension matching the type, the corresponding
|
---|
239 | ServerHello extension will be returned.
|
---|
240 |
|
---|
241 | =item B<-key> I<filename>|I<uri>
|
---|
242 |
|
---|
243 | The private key to use. If not specified then the certificate file will
|
---|
244 | be used.
|
---|
245 |
|
---|
246 | =item B<-key2> I<filename>|I<uri>
|
---|
247 |
|
---|
248 | The private Key file to use for servername if not given via B<-cert2>.
|
---|
249 |
|
---|
250 | =item B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>
|
---|
251 |
|
---|
252 | The key format; unspecified by default.
|
---|
253 | See L<openssl-format-options(1)> for details.
|
---|
254 |
|
---|
255 | =item B<-pass> I<val>
|
---|
256 |
|
---|
257 | The private key and certificate file password source.
|
---|
258 | For more information about the format of I<val>,
|
---|
259 | see L<openssl-passphrase-options(1)>.
|
---|
260 |
|
---|
261 | =item B<-dcert> I<infile>, B<-dkey> I<filename>|I<uri>
|
---|
262 |
|
---|
263 | Specify an additional certificate and private key, these behave in the
|
---|
264 | same manner as the B<-cert> and B<-key> options except there is no default
|
---|
265 | if they are not specified (no additional certificate and key is used). As
|
---|
266 | noted above some cipher suites require a certificate containing a key of
|
---|
267 | a certain type. Some cipher suites need a certificate carrying an RSA key
|
---|
268 | and some a DSS (DSA) key. By using RSA and DSS certificates and keys
|
---|
269 | a server can support clients which only support RSA or DSS cipher suites
|
---|
270 | by using an appropriate certificate.
|
---|
271 |
|
---|
272 | =item B<-dcert_chain>
|
---|
273 |
|
---|
274 | A file or URI of untrusted certificates to use when attempting to build the
|
---|
275 | server certificate chain when a certificate specified via the B<-dcert> option
|
---|
276 | is in use.
|
---|
277 | The input can be in PEM, DER, or PKCS#12 format.
|
---|
278 |
|
---|
279 | =item B<-dcertform> B<DER>|B<PEM>|B<P12>
|
---|
280 |
|
---|
281 | The format of the additional certificate file; unspecified by default.
|
---|
282 | See L<openssl-format-options(1)> for details.
|
---|
283 |
|
---|
284 | =item B<-dkeyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>
|
---|
285 |
|
---|
286 | The format of the additional private key; unspecified by default.
|
---|
287 | See L<openssl-format-options(1)> for details.
|
---|
288 |
|
---|
289 | =item B<-dpass> I<val>
|
---|
290 |
|
---|
291 | The passphrase for the additional private key and certificate.
|
---|
292 | For more information about the format of I<val>,
|
---|
293 | see L<openssl-passphrase-options(1)>.
|
---|
294 |
|
---|
295 | =item B<-nbio_test>
|
---|
296 |
|
---|
297 | Tests non blocking I/O.
|
---|
298 |
|
---|
299 | =item B<-crlf>
|
---|
300 |
|
---|
301 | This option translated a line feed from the terminal into CR+LF.
|
---|
302 |
|
---|
303 | =item B<-debug>
|
---|
304 |
|
---|
305 | Print extensive debugging information including a hex dump of all traffic.
|
---|
306 |
|
---|
307 | =item B<-security_debug>
|
---|
308 |
|
---|
309 | Print output from SSL/TLS security framework.
|
---|
310 |
|
---|
311 | =item B<-security_debug_verbose>
|
---|
312 |
|
---|
313 | Print more output from SSL/TLS security framework
|
---|
314 |
|
---|
315 | =item B<-msg>
|
---|
316 |
|
---|
317 | Show all protocol messages with hex dump.
|
---|
318 |
|
---|
319 | =item B<-msgfile> I<outfile>
|
---|
320 |
|
---|
321 | File to send output of B<-msg> or B<-trace> to, default standard output.
|
---|
322 |
|
---|
323 | =item B<-state>
|
---|
324 |
|
---|
325 | Prints the SSL session states.
|
---|
326 |
|
---|
327 | =item B<-CRL> I<infile>
|
---|
328 |
|
---|
329 | The CRL file to use.
|
---|
330 |
|
---|
331 | =item B<-CRLform> B<DER>|B<PEM>
|
---|
332 |
|
---|
333 | The CRL file format; unspecified by default.
|
---|
334 | See L<openssl-format-options(1)> for details.
|
---|
335 |
|
---|
336 | =item B<-crl_download>
|
---|
337 |
|
---|
338 | Download CRLs from distribution points given in CDP extensions of certificates
|
---|
339 |
|
---|
340 | =item B<-verifyCAfile> I<filename>
|
---|
341 |
|
---|
342 | A file in PEM format CA containing trusted certificates to use
|
---|
343 | for verifying client certificates.
|
---|
344 |
|
---|
345 | =item B<-verifyCApath> I<dir>
|
---|
346 |
|
---|
347 | A directory containing trusted certificates to use
|
---|
348 | for verifying client certificates.
|
---|
349 | This directory must be in "hash format",
|
---|
350 | see L<openssl-verify(1)> for more information.
|
---|
351 |
|
---|
352 | =item B<-verifyCAstore> I<uri>
|
---|
353 |
|
---|
354 | The URI of a store containing trusted certificates to use
|
---|
355 | for verifying client certificates.
|
---|
356 |
|
---|
357 | =item B<-chainCAfile> I<file>
|
---|
358 |
|
---|
359 | A file in PEM format containing trusted certificates to use
|
---|
360 | when attempting to build the server certificate chain.
|
---|
361 |
|
---|
362 | =item B<-chainCApath> I<dir>
|
---|
363 |
|
---|
364 | A directory containing trusted certificates to use
|
---|
365 | for building the server certificate chain provided to the client.
|
---|
366 | This directory must be in "hash format",
|
---|
367 | see L<openssl-verify(1)> for more information.
|
---|
368 |
|
---|
369 | =item B<-chainCAstore> I<uri>
|
---|
370 |
|
---|
371 | The URI of a store containing trusted certificates to use
|
---|
372 | for building the server certificate chain provided to the client.
|
---|
373 | The URI may indicate a single certificate, as well as a collection of them.
|
---|
374 | With URIs in the C<file:> scheme, this acts as B<-chainCAfile> or
|
---|
375 | B<-chainCApath>, depending on if the URI indicates a directory or a
|
---|
376 | single file.
|
---|
377 | See L<ossl_store-file(7)> for more information on the C<file:> scheme.
|
---|
378 |
|
---|
379 | =item B<-nocert>
|
---|
380 |
|
---|
381 | If this option is set then no certificate is used. This restricts the
|
---|
382 | cipher suites available to the anonymous ones (currently just anonymous
|
---|
383 | DH).
|
---|
384 |
|
---|
385 | =item B<-quiet>
|
---|
386 |
|
---|
387 | Inhibit printing of session and certificate information.
|
---|
388 |
|
---|
389 | =item B<-no_resume_ephemeral>
|
---|
390 |
|
---|
391 | Disable caching and tickets if ephemeral (EC)DH is used.
|
---|
392 |
|
---|
393 | =item B<-tlsextdebug>
|
---|
394 |
|
---|
395 | Print a hex dump of any TLS extensions received from the server.
|
---|
396 |
|
---|
397 | =item B<-www>
|
---|
398 |
|
---|
399 | Sends a status message back to the client when it connects. This includes
|
---|
400 | information about the ciphers used and various session parameters.
|
---|
401 | The output is in HTML format so this option can be used with a web browser.
|
---|
402 | The special URL C</renegcert> turns on client cert validation, and C</reneg>
|
---|
403 | tells the server to request renegotiation.
|
---|
404 | The B<-early_data> option cannot be used with this option.
|
---|
405 |
|
---|
406 | =item B<-WWW>, B<-HTTP>
|
---|
407 |
|
---|
408 | Emulates a simple web server. Pages will be resolved relative to the
|
---|
409 | current directory, for example if the URL C<https://myhost/page.html> is
|
---|
410 | requested the file F<./page.html> will be sent.
|
---|
411 | If the B<-HTTP> flag is used, the files are sent directly, and should contain
|
---|
412 | any HTTP response headers (including status response line).
|
---|
413 | If the B<-WWW> option is used,
|
---|
414 | the response headers are generated by the server, and the file extension is
|
---|
415 | examined to determine the B<Content-Type> header.
|
---|
416 | Extensions of C<html>, C<htm>, and C<php> are C<text/html> and all others are
|
---|
417 | C<text/plain>.
|
---|
418 | In addition, the special URL C</stats> will return status
|
---|
419 | information like the B<-www> option.
|
---|
420 | Neither of these options can be used in conjunction with B<-early_data>.
|
---|
421 |
|
---|
422 | =item B<-http_server_binmode>
|
---|
423 |
|
---|
424 | When acting as web-server (using option B<-WWW> or B<-HTTP>) open files requested
|
---|
425 | by the client in binary mode.
|
---|
426 |
|
---|
427 | =item B<-no_ca_names>
|
---|
428 |
|
---|
429 | Disable TLS Extension CA Names. You may want to disable it for security reasons
|
---|
430 | or for compatibility with some Windows TLS implementations crashing when this
|
---|
431 | extension is larger than 1024 bytes.
|
---|
432 |
|
---|
433 | =item B<-ignore_unexpected_eof>
|
---|
434 |
|
---|
435 | Some TLS implementations do not send the mandatory close_notify alert on
|
---|
436 | shutdown. If the application tries to wait for the close_notify alert but the
|
---|
437 | peer closes the connection without sending it, an error is generated. When this
|
---|
438 | option is enabled the peer does not need to send the close_notify alert and a
|
---|
439 | closed connection will be treated as if the close_notify alert was received.
|
---|
440 | For more information on shutting down a connection, see L<SSL_shutdown(3)>.
|
---|
441 |
|
---|
442 | =item B<-servername>
|
---|
443 |
|
---|
444 | Servername for HostName TLS extension.
|
---|
445 |
|
---|
446 | =item B<-servername_fatal>
|
---|
447 |
|
---|
448 | On servername mismatch send fatal alert (default: warning alert).
|
---|
449 |
|
---|
450 | =item B<-id_prefix> I<val>
|
---|
451 |
|
---|
452 | Generate SSL/TLS session IDs prefixed by I<val>. This is mostly useful
|
---|
453 | for testing any SSL/TLS code (e.g. proxies) that wish to deal with multiple
|
---|
454 | servers, when each of which might be generating a unique range of session
|
---|
455 | IDs (e.g. with a certain prefix).
|
---|
456 |
|
---|
457 | =item B<-keymatexport>
|
---|
458 |
|
---|
459 | Export keying material using label.
|
---|
460 |
|
---|
461 | =item B<-keymatexportlen>
|
---|
462 |
|
---|
463 | Export the given number of bytes of keying material; default 20.
|
---|
464 |
|
---|
465 | =item B<-no_cache>
|
---|
466 |
|
---|
467 | Disable session cache.
|
---|
468 |
|
---|
469 | =item B<-ext_cache>.
|
---|
470 |
|
---|
471 | Disable internal cache, set up and use external cache.
|
---|
472 |
|
---|
473 | =item B<-verify_return_error>
|
---|
474 |
|
---|
475 | Verification errors normally just print a message but allow the
|
---|
476 | connection to continue, for debugging purposes.
|
---|
477 | If this option is used, then verification errors close the connection.
|
---|
478 |
|
---|
479 | =item B<-verify_quiet>
|
---|
480 |
|
---|
481 | No verify output except verify errors.
|
---|
482 |
|
---|
483 | =item B<-ign_eof>
|
---|
484 |
|
---|
485 | Ignore input EOF (default: when B<-quiet>).
|
---|
486 |
|
---|
487 | =item B<-no_ign_eof>
|
---|
488 |
|
---|
489 | Do not ignore input EOF.
|
---|
490 |
|
---|
491 | =item B<-no_etm>
|
---|
492 |
|
---|
493 | Disable Encrypt-then-MAC negotiation.
|
---|
494 |
|
---|
495 | =item B<-status>
|
---|
496 |
|
---|
497 | Enables certificate status request support (aka OCSP stapling).
|
---|
498 |
|
---|
499 | =item B<-status_verbose>
|
---|
500 |
|
---|
501 | Enables certificate status request support (aka OCSP stapling) and gives
|
---|
502 | a verbose printout of the OCSP response.
|
---|
503 |
|
---|
504 | =item B<-status_timeout> I<int>
|
---|
505 |
|
---|
506 | Sets the timeout for OCSP response to I<int> seconds.
|
---|
507 |
|
---|
508 | =item B<-proxy> I<[http[s]://][userinfo@]host[:port][/path]>
|
---|
509 |
|
---|
510 | The HTTP(S) proxy server to use for reaching the OCSP server unless B<-no_proxy>
|
---|
511 | applies, see below.
|
---|
512 | The proxy port defaults to 80 or 443 if the scheme is C<https>; apart from that
|
---|
513 | the optional C<http://> or C<https://> prefix is ignored,
|
---|
514 | as well as any userinfo and path components.
|
---|
515 | Defaults to the environment variable C<http_proxy> if set, else C<HTTP_PROXY>
|
---|
516 | in case no TLS is used, otherwise C<https_proxy> if set, else C<HTTPS_PROXY>.
|
---|
517 |
|
---|
518 | =item B<-no_proxy> I<addresses>
|
---|
519 |
|
---|
520 | List of IP addresses and/or DNS names of servers
|
---|
521 | not to use an HTTP(S) proxy for, separated by commas and/or whitespace
|
---|
522 | (where in the latter case the whole argument must be enclosed in "...").
|
---|
523 | Default is from the environment variable C<no_proxy> if set, else C<NO_PROXY>.
|
---|
524 |
|
---|
525 | =item B<-status_url> I<val>
|
---|
526 |
|
---|
527 | Sets a fallback responder URL to use if no responder URL is present in the
|
---|
528 | server certificate. Without this option an error is returned if the server
|
---|
529 | certificate does not contain a responder address.
|
---|
530 | The optional userinfo and fragment URL components are ignored.
|
---|
531 | Any given query component is handled as part of the path component.
|
---|
532 |
|
---|
533 | =item B<-status_file> I<infile>
|
---|
534 |
|
---|
535 | Overrides any OCSP responder URLs from the certificate and always provides the
|
---|
536 | OCSP Response stored in the file. The file must be in DER format.
|
---|
537 |
|
---|
538 | =item B<-ssl_config> I<val>
|
---|
539 |
|
---|
540 | Configure SSL_CTX using the given configuration value.
|
---|
541 |
|
---|
542 | =item B<-trace>
|
---|
543 |
|
---|
544 | Show verbose trace output of protocol messages.
|
---|
545 |
|
---|
546 | =item B<-brief>
|
---|
547 |
|
---|
548 | Provide a brief summary of connection parameters instead of the normal verbose
|
---|
549 | output.
|
---|
550 |
|
---|
551 | =item B<-rev>
|
---|
552 |
|
---|
553 | Simple echo server that sends back received text reversed. Also sets B<-brief>.
|
---|
554 | Cannot be used in conjunction with B<-early_data>.
|
---|
555 |
|
---|
556 | =item B<-async>
|
---|
557 |
|
---|
558 | Switch on asynchronous mode. Cryptographic operations will be performed
|
---|
559 | asynchronously. This will only have an effect if an asynchronous capable engine
|
---|
560 | is also used via the B<-engine> option. For test purposes the dummy async engine
|
---|
561 | (dasync) can be used (if available).
|
---|
562 |
|
---|
563 | =item B<-max_send_frag> I<+int>
|
---|
564 |
|
---|
565 | The maximum size of data fragment to send.
|
---|
566 | See L<SSL_CTX_set_max_send_fragment(3)> for further information.
|
---|
567 |
|
---|
568 | =item B<-split_send_frag> I<+int>
|
---|
569 |
|
---|
570 | The size used to split data for encrypt pipelines. If more data is written in
|
---|
571 | one go than this value then it will be split into multiple pipelines, up to the
|
---|
572 | maximum number of pipelines defined by max_pipelines. This only has an effect if
|
---|
573 | a suitable cipher suite has been negotiated, an engine that supports pipelining
|
---|
574 | has been loaded, and max_pipelines is greater than 1. See
|
---|
575 | L<SSL_CTX_set_split_send_fragment(3)> for further information.
|
---|
576 |
|
---|
577 | =item B<-max_pipelines> I<+int>
|
---|
578 |
|
---|
579 | The maximum number of encrypt/decrypt pipelines to be used. This will only have
|
---|
580 | an effect if an engine has been loaded that supports pipelining (e.g. the dasync
|
---|
581 | engine) and a suitable cipher suite has been negotiated. The default value is 1.
|
---|
582 | See L<SSL_CTX_set_max_pipelines(3)> for further information.
|
---|
583 |
|
---|
584 | =item B<-naccept> I<+int>
|
---|
585 |
|
---|
586 | The server will exit after receiving the specified number of connections,
|
---|
587 | default unlimited.
|
---|
588 |
|
---|
589 | =item B<-read_buf> I<+int>
|
---|
590 |
|
---|
591 | The default read buffer size to be used for connections. This will only have an
|
---|
592 | effect if the buffer size is larger than the size that would otherwise be used
|
---|
593 | and pipelining is in use (see L<SSL_CTX_set_default_read_buffer_len(3)> for
|
---|
594 | further information).
|
---|
595 |
|
---|
596 | =item B<-bugs>
|
---|
597 |
|
---|
598 | There are several known bugs in SSL and TLS implementations. Adding this
|
---|
599 | option enables various workarounds.
|
---|
600 |
|
---|
601 | =item B<-no_comp>
|
---|
602 |
|
---|
603 | Disable negotiation of TLS compression.
|
---|
604 | TLS compression is not recommended and is off by default as of
|
---|
605 | OpenSSL 1.1.0.
|
---|
606 |
|
---|
607 | =item B<-comp>
|
---|
608 |
|
---|
609 | Enable negotiation of TLS compression.
|
---|
610 | This option was introduced in OpenSSL 1.1.0.
|
---|
611 | TLS compression is not recommended and is off by default as of
|
---|
612 | OpenSSL 1.1.0.
|
---|
613 |
|
---|
614 | =item B<-no_ticket>
|
---|
615 |
|
---|
616 | Disable RFC4507bis session ticket support. This option has no effect if TLSv1.3
|
---|
617 | is negotiated. See B<-num_tickets>.
|
---|
618 |
|
---|
619 | =item B<-num_tickets>
|
---|
620 |
|
---|
621 | Control the number of tickets that will be sent to the client after a full
|
---|
622 | handshake in TLSv1.3. The default number of tickets is 2. This option does not
|
---|
623 | affect the number of tickets sent after a resumption handshake.
|
---|
624 |
|
---|
625 | =item B<-serverpref>
|
---|
626 |
|
---|
627 | Use the server's cipher preferences, rather than the client's preferences.
|
---|
628 |
|
---|
629 | =item B<-prioritize_chacha>
|
---|
630 |
|
---|
631 | Prioritize ChaCha ciphers when preferred by clients. Requires B<-serverpref>.
|
---|
632 |
|
---|
633 | =item B<-no_resumption_on_reneg>
|
---|
634 |
|
---|
635 | Set the B<SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION> option.
|
---|
636 |
|
---|
637 | =item B<-client_sigalgs> I<val>
|
---|
638 |
|
---|
639 | Signature algorithms to support for client certificate authentication
|
---|
640 | (colon-separated list).
|
---|
641 |
|
---|
642 | =item B<-named_curve> I<val>
|
---|
643 |
|
---|
644 | Specifies the elliptic curve to use. NOTE: this is single curve, not a list.
|
---|
645 | For a list of all possible curves, use:
|
---|
646 |
|
---|
647 | $ openssl ecparam -list_curves
|
---|
648 |
|
---|
649 | =item B<-cipher> I<val>
|
---|
650 |
|
---|
651 | This allows the list of TLSv1.2 and below ciphersuites used by the server to be
|
---|
652 | modified. This list is combined with any TLSv1.3 ciphersuites that have been
|
---|
653 | configured. When the client sends a list of supported ciphers the first client
|
---|
654 | cipher also included in the server list is used. Because the client specifies
|
---|
655 | the preference order, the order of the server cipherlist is irrelevant. See
|
---|
656 | L<openssl-ciphers(1)> for more information.
|
---|
657 |
|
---|
658 | =item B<-ciphersuites> I<val>
|
---|
659 |
|
---|
660 | This allows the list of TLSv1.3 ciphersuites used by the server to be modified.
|
---|
661 | This list is combined with any TLSv1.2 and below ciphersuites that have been
|
---|
662 | configured. When the client sends a list of supported ciphers the first client
|
---|
663 | cipher also included in the server list is used. Because the client specifies
|
---|
664 | the preference order, the order of the server cipherlist is irrelevant. See
|
---|
665 | L<openssl-ciphers(1)> command for more information. The format for this list is
|
---|
666 | a simple colon (":") separated list of TLSv1.3 ciphersuite names.
|
---|
667 |
|
---|
668 | =item B<-dhparam> I<infile>
|
---|
669 |
|
---|
670 | The DH parameter file to use. The ephemeral DH cipher suites generate keys
|
---|
671 | using a set of DH parameters. If not specified then an attempt is made to
|
---|
672 | load the parameters from the server certificate file.
|
---|
673 | If this fails then a static set of parameters hard coded into this command
|
---|
674 | will be used.
|
---|
675 |
|
---|
676 | =item B<-nbio>
|
---|
677 |
|
---|
678 | Turns on non blocking I/O.
|
---|
679 |
|
---|
680 | =item B<-timeout>
|
---|
681 |
|
---|
682 | Enable timeouts.
|
---|
683 |
|
---|
684 | =item B<-mtu>
|
---|
685 |
|
---|
686 | Set link-layer MTU.
|
---|
687 |
|
---|
688 | =item B<-psk_identity> I<val>
|
---|
689 |
|
---|
690 | Expect the client to send PSK identity I<val> when using a PSK
|
---|
691 | cipher suite, and warn if they do not. By default, the expected PSK
|
---|
692 | identity is the string "Client_identity".
|
---|
693 |
|
---|
694 | =item B<-psk_hint> I<val>
|
---|
695 |
|
---|
696 | Use the PSK identity hint I<val> when using a PSK cipher suite.
|
---|
697 |
|
---|
698 | =item B<-psk> I<val>
|
---|
699 |
|
---|
700 | Use the PSK key I<val> when using a PSK cipher suite. The key is
|
---|
701 | given as a hexadecimal number without leading 0x, for example -psk
|
---|
702 | 1a2b3c4d.
|
---|
703 | This option must be provided in order to use a PSK cipher.
|
---|
704 |
|
---|
705 | =item B<-psk_session> I<file>
|
---|
706 |
|
---|
707 | Use the pem encoded SSL_SESSION data stored in I<file> as the basis of a PSK.
|
---|
708 | Note that this will only work if TLSv1.3 is negotiated.
|
---|
709 |
|
---|
710 | =item B<-srpvfile>
|
---|
711 |
|
---|
712 | The verifier file for SRP.
|
---|
713 | This option is deprecated.
|
---|
714 |
|
---|
715 | =item B<-srpuserseed>
|
---|
716 |
|
---|
717 | A seed string for a default user salt.
|
---|
718 | This option is deprecated.
|
---|
719 |
|
---|
720 | =item B<-listen>
|
---|
721 |
|
---|
722 | This option can only be used in conjunction with one of the DTLS options above.
|
---|
723 | With this option, this command will listen on a UDP port for incoming
|
---|
724 | connections.
|
---|
725 | Any ClientHellos that arrive will be checked to see if they have a cookie in
|
---|
726 | them or not.
|
---|
727 | Any without a cookie will be responded to with a HelloVerifyRequest.
|
---|
728 | If a ClientHello with a cookie is received then this command will
|
---|
729 | connect to that peer and complete the handshake.
|
---|
730 |
|
---|
731 | =item B<-sctp>
|
---|
732 |
|
---|
733 | Use SCTP for the transport protocol instead of UDP in DTLS. Must be used in
|
---|
734 | conjunction with B<-dtls>, B<-dtls1> or B<-dtls1_2>. This option is only
|
---|
735 | available where OpenSSL has support for SCTP enabled.
|
---|
736 |
|
---|
737 | =item B<-sctp_label_bug>
|
---|
738 |
|
---|
739 | Use the incorrect behaviour of older OpenSSL implementations when computing
|
---|
740 | endpoint-pair shared secrets for DTLS/SCTP. This allows communication with
|
---|
741 | older broken implementations but breaks interoperability with correct
|
---|
742 | implementations. Must be used in conjunction with B<-sctp>. This option is only
|
---|
743 | available where OpenSSL has support for SCTP enabled.
|
---|
744 |
|
---|
745 | =item B<-use_srtp>
|
---|
746 |
|
---|
747 | Offer SRTP key management with a colon-separated profile list.
|
---|
748 |
|
---|
749 | =item B<-no_dhe>
|
---|
750 |
|
---|
751 | If this option is set then no DH parameters will be loaded effectively
|
---|
752 | disabling the ephemeral DH cipher suites.
|
---|
753 |
|
---|
754 | =item B<-alpn> I<val>, B<-nextprotoneg> I<val>
|
---|
755 |
|
---|
756 | These flags enable the Application-Layer Protocol Negotiation
|
---|
757 | or Next Protocol Negotiation (NPN) extension, respectively. ALPN is the
|
---|
758 | IETF standard and replaces NPN.
|
---|
759 | The I<val> list is a comma-separated list of supported protocol
|
---|
760 | names. The list should contain the most desirable protocols first.
|
---|
761 | Protocol names are printable ASCII strings, for example "http/1.1" or
|
---|
762 | "spdy/3".
|
---|
763 | The flag B<-nextprotoneg> cannot be specified if B<-tls1_3> is used.
|
---|
764 |
|
---|
765 | =item B<-sendfile>
|
---|
766 |
|
---|
767 | If this option is set and KTLS is enabled, SSL_sendfile() will be used
|
---|
768 | instead of BIO_write() to send the HTTP response requested by a client.
|
---|
769 | This option is only valid if B<-WWW> or B<-HTTP> is specified.
|
---|
770 |
|
---|
771 | =item B<-keylogfile> I<outfile>
|
---|
772 |
|
---|
773 | Appends TLS secrets to the specified keylog file such that external programs
|
---|
774 | (like Wireshark) can decrypt TLS connections.
|
---|
775 |
|
---|
776 | =item B<-max_early_data> I<int>
|
---|
777 |
|
---|
778 | Change the default maximum early data bytes that are specified for new sessions
|
---|
779 | and any incoming early data (when used in conjunction with the B<-early_data>
|
---|
780 | flag). The default value is approximately 16k. The argument must be an integer
|
---|
781 | greater than or equal to 0.
|
---|
782 |
|
---|
783 | =item B<-recv_max_early_data> I<int>
|
---|
784 |
|
---|
785 | Specify the hard limit on the maximum number of early data bytes that will
|
---|
786 | be accepted.
|
---|
787 |
|
---|
788 | =item B<-early_data>
|
---|
789 |
|
---|
790 | Accept early data where possible. Cannot be used in conjunction with B<-www>,
|
---|
791 | B<-WWW>, B<-HTTP> or B<-rev>.
|
---|
792 |
|
---|
793 | =item B<-stateless>
|
---|
794 |
|
---|
795 | Require TLSv1.3 cookies.
|
---|
796 |
|
---|
797 | =item B<-anti_replay>, B<-no_anti_replay>
|
---|
798 |
|
---|
799 | Switches replay protection on or off, respectively. Replay protection is on by
|
---|
800 | default unless overridden by a configuration file. When it is on, OpenSSL will
|
---|
801 | automatically detect if a session ticket has been used more than once, TLSv1.3
|
---|
802 | has been negotiated, and early data is enabled on the server. A full handshake
|
---|
803 | is forced if a session ticket is used a second or subsequent time. Any early
|
---|
804 | data that was sent will be rejected.
|
---|
805 |
|
---|
806 | {- $OpenSSL::safe::opt_name_item -}
|
---|
807 |
|
---|
808 | {- $OpenSSL::safe::opt_version_item -}
|
---|
809 |
|
---|
810 | {- $OpenSSL::safe::opt_s_item -}
|
---|
811 |
|
---|
812 | {- $OpenSSL::safe::opt_x_item -}
|
---|
813 |
|
---|
814 | {- $OpenSSL::safe::opt_trust_item -}
|
---|
815 |
|
---|
816 | {- $OpenSSL::safe::opt_r_item -}
|
---|
817 |
|
---|
818 | {- $OpenSSL::safe::opt_engine_item -}
|
---|
819 |
|
---|
820 | {- $OpenSSL::safe::opt_provider_item -}
|
---|
821 |
|
---|
822 | {- $OpenSSL::safe::opt_v_item -}
|
---|
823 |
|
---|
824 | If the server requests a client certificate, then
|
---|
825 | verification errors are displayed, for debugging, but the command will
|
---|
826 | proceed unless the B<-verify_return_error> option is used.
|
---|
827 |
|
---|
828 | =back
|
---|
829 |
|
---|
830 | =head1 CONNECTED COMMANDS
|
---|
831 |
|
---|
832 | If a connection request is established with an SSL client and neither the
|
---|
833 | B<-www> nor the B<-WWW> option has been used then normally any data received
|
---|
834 | from the client is displayed and any key presses will be sent to the client.
|
---|
835 |
|
---|
836 | Certain commands are also recognized which perform special operations. These
|
---|
837 | commands are a letter which must appear at the start of a line. They are listed
|
---|
838 | below.
|
---|
839 |
|
---|
840 | =over 4
|
---|
841 |
|
---|
842 | =item B<q>
|
---|
843 |
|
---|
844 | End the current SSL connection but still accept new connections.
|
---|
845 |
|
---|
846 | =item B<Q>
|
---|
847 |
|
---|
848 | End the current SSL connection and exit.
|
---|
849 |
|
---|
850 | =item B<r>
|
---|
851 |
|
---|
852 | Renegotiate the SSL session (TLSv1.2 and below only).
|
---|
853 |
|
---|
854 | =item B<R>
|
---|
855 |
|
---|
856 | Renegotiate the SSL session and request a client certificate (TLSv1.2 and below
|
---|
857 | only).
|
---|
858 |
|
---|
859 | =item B<P>
|
---|
860 |
|
---|
861 | Send some plain text down the underlying TCP connection: this should
|
---|
862 | cause the client to disconnect due to a protocol violation.
|
---|
863 |
|
---|
864 | =item B<S>
|
---|
865 |
|
---|
866 | Print out some session cache status information.
|
---|
867 |
|
---|
868 | =item B<k>
|
---|
869 |
|
---|
870 | Send a key update message to the client (TLSv1.3 only)
|
---|
871 |
|
---|
872 | =item B<K>
|
---|
873 |
|
---|
874 | Send a key update message to the client and request one back (TLSv1.3 only)
|
---|
875 |
|
---|
876 | =item B<c>
|
---|
877 |
|
---|
878 | Send a certificate request to the client (TLSv1.3 only)
|
---|
879 |
|
---|
880 | =back
|
---|
881 |
|
---|
882 | =head1 NOTES
|
---|
883 |
|
---|
884 | This command can be used to debug SSL clients. To accept connections
|
---|
885 | from a web browser the command:
|
---|
886 |
|
---|
887 | openssl s_server -accept 443 -www
|
---|
888 |
|
---|
889 | can be used for example.
|
---|
890 |
|
---|
891 | Although specifying an empty list of CAs when requesting a client certificate
|
---|
892 | is strictly speaking a protocol violation, some SSL clients interpret this to
|
---|
893 | mean any CA is acceptable. This is useful for debugging purposes.
|
---|
894 |
|
---|
895 | The session parameters can printed out using the L<openssl-sess_id(1)> command.
|
---|
896 |
|
---|
897 | =head1 BUGS
|
---|
898 |
|
---|
899 | Because this program has a lot of options and also because some of the
|
---|
900 | techniques used are rather old, the C source for this command is rather
|
---|
901 | hard to read and not a model of how things should be done.
|
---|
902 | A typical SSL server program would be much simpler.
|
---|
903 |
|
---|
904 | The output of common ciphers is wrong: it just gives the list of ciphers that
|
---|
905 | OpenSSL recognizes and the client supports.
|
---|
906 |
|
---|
907 | There should be a way for this command to print out details
|
---|
908 | of any unknown cipher suites a client says it supports.
|
---|
909 |
|
---|
910 | =head1 SEE ALSO
|
---|
911 |
|
---|
912 | L<openssl(1)>,
|
---|
913 | L<openssl-sess_id(1)>,
|
---|
914 | L<openssl-s_client(1)>,
|
---|
915 | L<openssl-ciphers(1)>,
|
---|
916 | L<SSL_CONF_cmd(3)>,
|
---|
917 | L<SSL_CTX_set_max_send_fragment(3)>,
|
---|
918 | L<SSL_CTX_set_split_send_fragment(3)>,
|
---|
919 | L<SSL_CTX_set_max_pipelines(3)>,
|
---|
920 | L<ossl_store-file(7)>
|
---|
921 |
|
---|
922 | =head1 HISTORY
|
---|
923 |
|
---|
924 | The -no_alt_chains option was added in OpenSSL 1.1.0.
|
---|
925 |
|
---|
926 | The
|
---|
927 | -allow-no-dhe-kex and -prioritize_chacha options were added in OpenSSL 1.1.1.
|
---|
928 |
|
---|
929 | The B<-srpvfile>, B<-srpuserseed>, and B<-engine>
|
---|
930 | option were deprecated in OpenSSL 3.0.
|
---|
931 |
|
---|
932 | =head1 COPYRIGHT
|
---|
933 |
|
---|
934 | Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
---|
935 |
|
---|
936 | Licensed under the Apache License 2.0 (the "License"). You may not use
|
---|
937 | this file except in compliance with the License. You can obtain a copy
|
---|
938 | in the file LICENSE in the source distribution or at
|
---|
939 | L<https://www.openssl.org/source/license.html>.
|
---|
940 |
|
---|
941 | =cut
|
---|