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