1b077aed3SPierre Pronchery=pod 2b077aed3SPierre Pronchery{- OpenSSL::safe::output_do_not_edit_headers(); -} 3b077aed3SPierre Pronchery 4b077aed3SPierre Pronchery=head1 NAME 5b077aed3SPierre Pronchery 6b077aed3SPierre Proncheryopenssl-s_client - SSL/TLS client program 7b077aed3SPierre Pronchery 8b077aed3SPierre Pronchery=head1 SYNOPSIS 9b077aed3SPierre Pronchery 10b077aed3SPierre ProncheryB<openssl> B<s_client> 11b077aed3SPierre Pronchery[B<-help>] 12b077aed3SPierre Pronchery[B<-ssl_config> I<section>] 13b077aed3SPierre Pronchery[B<-connect> I<host:port>] 14b077aed3SPierre Pronchery[B<-host> I<hostname>] 15b077aed3SPierre Pronchery[B<-port> I<port>] 16b077aed3SPierre Pronchery[B<-bind> I<host:port>] 17b077aed3SPierre Pronchery[B<-proxy> I<host:port>] 18b077aed3SPierre Pronchery[B<-proxy_user> I<userid>] 19b077aed3SPierre Pronchery[B<-proxy_pass> I<arg>] 20b077aed3SPierre Pronchery[B<-unix> I<path>] 21b077aed3SPierre Pronchery[B<-4>] 22b077aed3SPierre Pronchery[B<-6>] 23b077aed3SPierre Pronchery[B<-servername> I<name>] 24b077aed3SPierre Pronchery[B<-noservername>] 25b077aed3SPierre Pronchery[B<-verify> I<depth>] 26b077aed3SPierre Pronchery[B<-verify_return_error>] 27b077aed3SPierre Pronchery[B<-verify_quiet>] 28b077aed3SPierre Pronchery[B<-verifyCAfile> I<filename>] 29b077aed3SPierre Pronchery[B<-verifyCApath> I<dir>] 30b077aed3SPierre Pronchery[B<-verifyCAstore> I<uri>] 31b077aed3SPierre Pronchery[B<-cert> I<filename>] 32b077aed3SPierre Pronchery[B<-certform> B<DER>|B<PEM>|B<P12>] 33b077aed3SPierre Pronchery[B<-cert_chain> I<filename>] 34b077aed3SPierre Pronchery[B<-build_chain>] 35b077aed3SPierre Pronchery[B<-CRL> I<filename>] 36b077aed3SPierre Pronchery[B<-CRLform> B<DER>|B<PEM>] 37b077aed3SPierre Pronchery[B<-crl_download>] 38b077aed3SPierre Pronchery[B<-key> I<filename>|I<uri>] 39b077aed3SPierre Pronchery[B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>] 40b077aed3SPierre Pronchery[B<-pass> I<arg>] 41b077aed3SPierre Pronchery[B<-chainCAfile> I<filename>] 42b077aed3SPierre Pronchery[B<-chainCApath> I<directory>] 43b077aed3SPierre Pronchery[B<-chainCAstore> I<uri>] 44b077aed3SPierre Pronchery[B<-requestCAfile> I<filename>] 45b077aed3SPierre Pronchery[B<-dane_tlsa_domain> I<domain>] 46b077aed3SPierre Pronchery[B<-dane_tlsa_rrdata> I<rrdata>] 47b077aed3SPierre Pronchery[B<-dane_ee_no_namechecks>] 48b077aed3SPierre Pronchery[B<-reconnect>] 49b077aed3SPierre Pronchery[B<-showcerts>] 50b077aed3SPierre Pronchery[B<-prexit>] 51b077aed3SPierre Pronchery[B<-debug>] 52b077aed3SPierre Pronchery[B<-trace>] 53b077aed3SPierre Pronchery[B<-nocommands>] 54b077aed3SPierre Pronchery[B<-security_debug>] 55b077aed3SPierre Pronchery[B<-security_debug_verbose>] 56b077aed3SPierre Pronchery[B<-msg>] 57b077aed3SPierre Pronchery[B<-timeout>] 58b077aed3SPierre Pronchery[B<-mtu> I<size>] 59b077aed3SPierre Pronchery[B<-no_etm>] 60b077aed3SPierre Pronchery[B<-keymatexport> I<label>] 61b077aed3SPierre Pronchery[B<-keymatexportlen> I<len>] 62b077aed3SPierre Pronchery[B<-msgfile> I<filename>] 63b077aed3SPierre Pronchery[B<-nbio_test>] 64b077aed3SPierre Pronchery[B<-state>] 65b077aed3SPierre Pronchery[B<-nbio>] 66b077aed3SPierre Pronchery[B<-crlf>] 67b077aed3SPierre Pronchery[B<-ign_eof>] 68b077aed3SPierre Pronchery[B<-no_ign_eof>] 69b077aed3SPierre Pronchery[B<-psk_identity> I<identity>] 70b077aed3SPierre Pronchery[B<-psk> I<key>] 71b077aed3SPierre Pronchery[B<-psk_session> I<file>] 72b077aed3SPierre Pronchery[B<-quiet>] 73b077aed3SPierre Pronchery[B<-sctp>] 74b077aed3SPierre Pronchery[B<-sctp_label_bug>] 75b077aed3SPierre Pronchery[B<-fallback_scsv>] 76b077aed3SPierre Pronchery[B<-async>] 77b077aed3SPierre Pronchery[B<-maxfraglen> I<len>] 78b077aed3SPierre Pronchery[B<-max_send_frag>] 79b077aed3SPierre Pronchery[B<-split_send_frag>] 80b077aed3SPierre Pronchery[B<-max_pipelines>] 81b077aed3SPierre Pronchery[B<-read_buf>] 82b077aed3SPierre Pronchery[B<-ignore_unexpected_eof>] 83b077aed3SPierre Pronchery[B<-bugs>] 84b077aed3SPierre Pronchery[B<-comp>] 85b077aed3SPierre Pronchery[B<-no_comp>] 86b077aed3SPierre Pronchery[B<-brief>] 87b077aed3SPierre Pronchery[B<-legacy_server_connect>] 88b077aed3SPierre Pronchery[B<-no_legacy_server_connect>] 89b077aed3SPierre Pronchery[B<-allow_no_dhe_kex>] 90b077aed3SPierre Pronchery[B<-sigalgs> I<sigalglist>] 91b077aed3SPierre Pronchery[B<-curves> I<curvelist>] 92b077aed3SPierre Pronchery[B<-cipher> I<cipherlist>] 93b077aed3SPierre Pronchery[B<-ciphersuites> I<val>] 94b077aed3SPierre Pronchery[B<-serverpref>] 95b077aed3SPierre Pronchery[B<-starttls> I<protocol>] 96b077aed3SPierre Pronchery[B<-name> I<hostname>] 97b077aed3SPierre Pronchery[B<-xmpphost> I<hostname>] 98b077aed3SPierre Pronchery[B<-name> I<hostname>] 99b077aed3SPierre Pronchery[B<-tlsextdebug>] 100b077aed3SPierre Pronchery[B<-no_ticket>] 101b077aed3SPierre Pronchery[B<-sess_out> I<filename>] 102b077aed3SPierre Pronchery[B<-serverinfo> I<types>] 103b077aed3SPierre Pronchery[B<-sess_in> I<filename>] 104b077aed3SPierre Pronchery[B<-serverinfo> I<types>] 105b077aed3SPierre Pronchery[B<-status>] 106b077aed3SPierre Pronchery[B<-alpn> I<protocols>] 107b077aed3SPierre Pronchery[B<-nextprotoneg> I<protocols>] 108b077aed3SPierre Pronchery[B<-ct>] 109b077aed3SPierre Pronchery[B<-noct>] 110b077aed3SPierre Pronchery[B<-ctlogfile>] 111b077aed3SPierre Pronchery[B<-keylogfile> I<file>] 112b077aed3SPierre Pronchery[B<-early_data> I<file>] 113b077aed3SPierre Pronchery[B<-enable_pha>] 114b077aed3SPierre Pronchery[B<-use_srtp> I<value>] 115b077aed3SPierre Pronchery[B<-srpuser> I<value>] 116b077aed3SPierre Pronchery[B<-srppass> I<value>] 117b077aed3SPierre Pronchery[B<-srp_lateuser>] 118b077aed3SPierre Pronchery[B<-srp_moregroups>] 119b077aed3SPierre Pronchery[B<-srp_strength> I<number>] 120b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_name_synopsis -} 121b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_version_synopsis -} 122b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_x_synopsis -} 123b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_trust_synopsis -} 124b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_s_synopsis -} 125b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_r_synopsis -} 126b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_provider_synopsis -} 127b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_engine_synopsis -}[B<-ssl_client_engine> I<id>] 128b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_v_synopsis -} 129b077aed3SPierre Pronchery[I<host>:I<port>] 130b077aed3SPierre Pronchery 131b077aed3SPierre Pronchery=head1 DESCRIPTION 132b077aed3SPierre Pronchery 133b077aed3SPierre ProncheryThis command implements a generic SSL/TLS client which 134b077aed3SPierre Proncheryconnects to a remote host using SSL/TLS. It is a I<very> useful diagnostic 135b077aed3SPierre Proncherytool for SSL servers. 136b077aed3SPierre Pronchery 137b077aed3SPierre Pronchery=head1 OPTIONS 138b077aed3SPierre Pronchery 139b077aed3SPierre ProncheryIn addition to the options below, this command also supports the 140b077aed3SPierre Proncherycommon and client only options documented 141b077aed3SPierre Proncheryin the "Supported Command Line Commands" section of the L<SSL_CONF_cmd(3)> 142b077aed3SPierre Proncherymanual page. 143b077aed3SPierre Pronchery 144b077aed3SPierre Pronchery=over 4 145b077aed3SPierre Pronchery 146b077aed3SPierre Pronchery=item B<-help> 147b077aed3SPierre Pronchery 148b077aed3SPierre ProncheryPrint out a usage message. 149b077aed3SPierre Pronchery 150b077aed3SPierre Pronchery=item B<-ssl_config> I<section> 151b077aed3SPierre Pronchery 152b077aed3SPierre ProncheryUse the specified section of the configuration file to configure the B<SSL_CTX> object. 153b077aed3SPierre Pronchery 154b077aed3SPierre Pronchery=item B<-connect> I<host>:I<port> 155b077aed3SPierre Pronchery 156b077aed3SPierre ProncheryThis specifies the host and optional port to connect to. It is possible to 157b077aed3SPierre Proncheryselect the host and port using the optional target positional argument instead. 158b077aed3SPierre ProncheryIf neither this nor the target positional argument are specified then an attempt 159b077aed3SPierre Proncheryis made to connect to the local host on port 4433. 160b077aed3SPierre Pronchery 161b077aed3SPierre Pronchery=item B<-host> I<hostname> 162b077aed3SPierre Pronchery 163b077aed3SPierre ProncheryHost to connect to; use B<-connect> instead. 164b077aed3SPierre Pronchery 165b077aed3SPierre Pronchery=item B<-port> I<port> 166b077aed3SPierre Pronchery 167b077aed3SPierre ProncheryConnect to the specified port; use B<-connect> instead. 168b077aed3SPierre Pronchery 169b077aed3SPierre Pronchery=item B<-bind> I<host:port> 170b077aed3SPierre Pronchery 171b077aed3SPierre ProncheryThis specifies the host address and or port to bind as the source for the 172b077aed3SPierre Proncheryconnection. For Unix-domain sockets the port is ignored and the host is 173b077aed3SPierre Proncheryused as the source socket address. 174b077aed3SPierre Pronchery 175b077aed3SPierre Pronchery=item B<-proxy> I<host:port> 176b077aed3SPierre Pronchery 177b077aed3SPierre ProncheryWhen used with the B<-connect> flag, the program uses the host and port 178b077aed3SPierre Proncheryspecified with this flag and issues an HTTP CONNECT command to connect 179b077aed3SPierre Proncheryto the desired server. 180b077aed3SPierre Pronchery 181b077aed3SPierre Pronchery=item B<-proxy_user> I<userid> 182b077aed3SPierre Pronchery 183b077aed3SPierre ProncheryWhen used with the B<-proxy> flag, the program will attempt to authenticate 184b077aed3SPierre Proncherywith the specified proxy using basic (base64) authentication. 185b077aed3SPierre ProncheryNB: Basic authentication is insecure; the credentials are sent to the proxy 186b077aed3SPierre Proncheryin easily reversible base64 encoding before any TLS/SSL session is established. 187b077aed3SPierre ProncheryTherefore, these credentials are easily recovered by anyone able to sniff/trace 188b077aed3SPierre Proncherythe network. Use with caution. 189b077aed3SPierre Pronchery 190b077aed3SPierre Pronchery=item B<-proxy_pass> I<arg> 191b077aed3SPierre Pronchery 192b077aed3SPierre ProncheryThe proxy password source, used with the B<-proxy_user> flag. 193b077aed3SPierre ProncheryFor more information about the format of B<arg> 194b077aed3SPierre Proncherysee L<openssl-passphrase-options(1)>. 195b077aed3SPierre Pronchery 196b077aed3SPierre Pronchery=item B<-unix> I<path> 197b077aed3SPierre Pronchery 198b077aed3SPierre ProncheryConnect over the specified Unix-domain socket. 199b077aed3SPierre Pronchery 200b077aed3SPierre Pronchery=item B<-4> 201b077aed3SPierre Pronchery 202b077aed3SPierre ProncheryUse IPv4 only. 203b077aed3SPierre Pronchery 204b077aed3SPierre Pronchery=item B<-6> 205b077aed3SPierre Pronchery 206b077aed3SPierre ProncheryUse IPv6 only. 207b077aed3SPierre Pronchery 208b077aed3SPierre Pronchery=item B<-servername> I<name> 209b077aed3SPierre Pronchery 210b077aed3SPierre ProncherySet the TLS SNI (Server Name Indication) extension in the ClientHello message to 211b077aed3SPierre Proncherythe given value. 212b077aed3SPierre ProncheryIf B<-servername> is not provided, the TLS SNI extension will be populated with 213b077aed3SPierre Proncherythe name given to B<-connect> if it follows a DNS name format. If B<-connect> is 214b077aed3SPierre Proncherynot provided either, the SNI is set to "localhost". 215b077aed3SPierre ProncheryThis is the default since OpenSSL 1.1.1. 216b077aed3SPierre Pronchery 217b077aed3SPierre ProncheryEven though SNI should normally be a DNS name and not an IP address, if 218b077aed3SPierre ProncheryB<-servername> is provided then that name will be sent, regardless of whether 219b077aed3SPierre Proncheryit is a DNS name or not. 220b077aed3SPierre Pronchery 221b077aed3SPierre ProncheryThis option cannot be used in conjunction with B<-noservername>. 222b077aed3SPierre Pronchery 223b077aed3SPierre Pronchery=item B<-noservername> 224b077aed3SPierre Pronchery 225b077aed3SPierre ProncherySuppresses sending of the SNI (Server Name Indication) extension in the 226b077aed3SPierre ProncheryClientHello message. Cannot be used in conjunction with the B<-servername> or 227b077aed3SPierre ProncheryB<-dane_tlsa_domain> options. 228b077aed3SPierre Pronchery 229b077aed3SPierre Pronchery=item B<-cert> I<filename> 230b077aed3SPierre Pronchery 231b077aed3SPierre ProncheryThe client certificate to use, if one is requested by the server. 232b077aed3SPierre ProncheryThe default is not to use a certificate. 233b077aed3SPierre Pronchery 234b077aed3SPierre ProncheryThe chain for the client certificate may be specified using B<-cert_chain>. 235b077aed3SPierre Pronchery 236b077aed3SPierre Pronchery=item B<-certform> B<DER>|B<PEM>|B<P12> 237b077aed3SPierre Pronchery 238b077aed3SPierre ProncheryThe client certificate file format to use; unspecified by default. 239b077aed3SPierre ProncherySee L<openssl-format-options(1)> for details. 240b077aed3SPierre Pronchery 241b077aed3SPierre Pronchery=item B<-cert_chain> 242b077aed3SPierre Pronchery 243b077aed3SPierre ProncheryA file or URI of untrusted certificates to use when attempting to build the 244b077aed3SPierre Proncherycertificate chain related to the certificate specified via the B<-cert> option. 245b077aed3SPierre ProncheryThe input can be in PEM, DER, or PKCS#12 format. 246b077aed3SPierre Pronchery 247b077aed3SPierre Pronchery=item B<-build_chain> 248b077aed3SPierre Pronchery 249b077aed3SPierre ProncherySpecify whether the application should build the client certificate chain to be 250b077aed3SPierre Proncheryprovided to the server. 251b077aed3SPierre Pronchery 252b077aed3SPierre Pronchery=item B<-CRL> I<filename> 253b077aed3SPierre Pronchery 254b077aed3SPierre ProncheryCRL file to use to check the server's certificate. 255b077aed3SPierre Pronchery 256b077aed3SPierre Pronchery=item B<-CRLform> B<DER>|B<PEM> 257b077aed3SPierre Pronchery 258b077aed3SPierre ProncheryThe CRL file format; unspecified by default. 259b077aed3SPierre ProncherySee L<openssl-format-options(1)> for details. 260b077aed3SPierre Pronchery 261b077aed3SPierre Pronchery=item B<-crl_download> 262b077aed3SPierre Pronchery 263b077aed3SPierre ProncheryDownload CRL from distribution points in the certificate. 264b077aed3SPierre Pronchery 265b077aed3SPierre Pronchery=item B<-key> I<filename>|I<uri> 266b077aed3SPierre Pronchery 267b077aed3SPierre ProncheryThe client private key to use. 268b077aed3SPierre ProncheryIf not specified then the certificate file will be used to read also the key. 269b077aed3SPierre Pronchery 270b077aed3SPierre Pronchery=item B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE> 271b077aed3SPierre Pronchery 272b077aed3SPierre ProncheryThe key format; unspecified by default. 273b077aed3SPierre ProncherySee L<openssl-format-options(1)> for details. 274b077aed3SPierre Pronchery 275b077aed3SPierre Pronchery=item B<-pass> I<arg> 276b077aed3SPierre Pronchery 277aa795734SPierre Proncherythe private key and certificate file password source. 278b077aed3SPierre ProncheryFor more information about the format of I<arg> 279b077aed3SPierre Proncherysee L<openssl-passphrase-options(1)>. 280b077aed3SPierre Pronchery 281b077aed3SPierre Pronchery=item B<-verify> I<depth> 282b077aed3SPierre Pronchery 283b077aed3SPierre ProncheryThe verify depth to use. This specifies the maximum length of the 284b077aed3SPierre Proncheryserver certificate chain and turns on server certificate verification. 285b077aed3SPierre ProncheryCurrently the verify operation continues after errors so all the problems 286b077aed3SPierre Proncherywith a certificate chain can be seen. As a side effect the connection 287b077aed3SPierre Proncherywill never fail due to a server certificate verify failure. 288b077aed3SPierre Pronchery 289b077aed3SPierre Pronchery=item B<-verify_return_error> 290b077aed3SPierre Pronchery 291b077aed3SPierre ProncheryReturn verification errors instead of continuing. This will typically 292b077aed3SPierre Proncheryabort the handshake with a fatal error. 293b077aed3SPierre Pronchery 294b077aed3SPierre Pronchery=item B<-verify_quiet> 295b077aed3SPierre Pronchery 296b077aed3SPierre ProncheryLimit verify output to only errors. 297b077aed3SPierre Pronchery 298b077aed3SPierre Pronchery=item B<-verifyCAfile> I<filename> 299b077aed3SPierre Pronchery 300b077aed3SPierre ProncheryA file in PEM format containing trusted certificates to use 301b077aed3SPierre Proncheryfor verifying the server's certificate. 302b077aed3SPierre Pronchery 303b077aed3SPierre Pronchery=item B<-verifyCApath> I<dir> 304b077aed3SPierre Pronchery 305b077aed3SPierre ProncheryA directory containing trusted certificates to use 306b077aed3SPierre Proncheryfor verifying the server's certificate. 307b077aed3SPierre ProncheryThis directory must be in "hash format", 308b077aed3SPierre Proncherysee L<openssl-verify(1)> for more information. 309b077aed3SPierre Pronchery 310b077aed3SPierre Pronchery=item B<-verifyCAstore> I<uri> 311b077aed3SPierre Pronchery 312b077aed3SPierre ProncheryThe URI of a store containing trusted certificates to use 313b077aed3SPierre Proncheryfor verifying the server's certificate. 314b077aed3SPierre Pronchery 315b077aed3SPierre Pronchery=item B<-chainCAfile> I<file> 316b077aed3SPierre Pronchery 317b077aed3SPierre ProncheryA file in PEM format containing trusted certificates to use 318b077aed3SPierre Proncherywhen attempting to build the client certificate chain. 319b077aed3SPierre Pronchery 320b077aed3SPierre Pronchery=item B<-chainCApath> I<directory> 321b077aed3SPierre Pronchery 322b077aed3SPierre ProncheryA directory containing trusted certificates to use 323b077aed3SPierre Proncheryfor building the client certificate chain provided to the server. 324b077aed3SPierre ProncheryThis directory must be in "hash format", 325b077aed3SPierre Proncherysee L<openssl-verify(1)> for more information. 326b077aed3SPierre Pronchery 327b077aed3SPierre Pronchery=item B<-chainCAstore> I<uri> 328b077aed3SPierre Pronchery 329b077aed3SPierre ProncheryThe URI of a store containing trusted certificates to use 330b077aed3SPierre Proncherywhen attempting to build the client certificate chain. 331b077aed3SPierre ProncheryThe URI may indicate a single certificate, as well as a collection of them. 332b077aed3SPierre ProncheryWith URIs in the C<file:> scheme, this acts as B<-chainCAfile> or 333b077aed3SPierre ProncheryB<-chainCApath>, depending on if the URI indicates a directory or a 334b077aed3SPierre Proncherysingle file. 335b077aed3SPierre ProncherySee L<ossl_store-file(7)> for more information on the C<file:> scheme. 336b077aed3SPierre Pronchery 337b077aed3SPierre Pronchery=item B<-requestCAfile> I<file> 338b077aed3SPierre Pronchery 339b077aed3SPierre ProncheryA file containing a list of certificates whose subject names will be sent 340b077aed3SPierre Proncheryto the server in the B<certificate_authorities> extension. Only supported 341b077aed3SPierre Proncheryfor TLS 1.3 342b077aed3SPierre Pronchery 343b077aed3SPierre Pronchery=item B<-dane_tlsa_domain> I<domain> 344b077aed3SPierre Pronchery 345b077aed3SPierre ProncheryEnable RFC6698/RFC7671 DANE TLSA authentication and specify the 346b077aed3SPierre ProncheryTLSA base domain which becomes the default SNI hint and the primary 347b077aed3SPierre Proncheryreference identifier for hostname checks. This must be used in 348b077aed3SPierre Proncherycombination with at least one instance of the B<-dane_tlsa_rrdata> 349b077aed3SPierre Proncheryoption below. 350b077aed3SPierre Pronchery 351b077aed3SPierre ProncheryWhen DANE authentication succeeds, the diagnostic output will include 352b077aed3SPierre Proncherythe lowest (closest to 0) depth at which a TLSA record authenticated 353b077aed3SPierre Proncherya chain certificate. When that TLSA record is a "2 1 0" trust 354b077aed3SPierre Proncheryanchor public key that signed (rather than matched) the top-most 355b077aed3SPierre Proncherycertificate of the chain, the result is reported as "TA public key 356b077aed3SPierre Proncheryverified". Otherwise, either the TLSA record "matched TA certificate" 357b077aed3SPierre Proncheryat a positive depth or else "matched EE certificate" at depth 0. 358b077aed3SPierre Pronchery 359b077aed3SPierre Pronchery=item B<-dane_tlsa_rrdata> I<rrdata> 360b077aed3SPierre Pronchery 361b077aed3SPierre ProncheryUse one or more times to specify the RRDATA fields of the DANE TLSA 362b077aed3SPierre ProncheryRRset associated with the target service. The I<rrdata> value is 363b077aed3SPierre Proncheryspecified in "presentation form", that is four whitespace separated 364b077aed3SPierre Proncheryfields that specify the usage, selector, matching type and associated 365b077aed3SPierre Proncherydata, with the last of these encoded in hexadecimal. Optional 366b077aed3SPierre Proncherywhitespace is ignored in the associated data field. For example: 367b077aed3SPierre Pronchery 368b077aed3SPierre Pronchery $ openssl s_client -brief -starttls smtp \ 369b077aed3SPierre Pronchery -connect smtp.example.com:25 \ 370b077aed3SPierre Pronchery -dane_tlsa_domain smtp.example.com \ 371b077aed3SPierre Pronchery -dane_tlsa_rrdata "2 1 1 372b077aed3SPierre Pronchery B111DD8A1C2091A89BD4FD60C57F0716CCE50FEEFF8137CDBEE0326E 02CF362B" \ 373b077aed3SPierre Pronchery -dane_tlsa_rrdata "2 1 1 374b077aed3SPierre Pronchery 60B87575447DCBA2A36B7D11AC09FB24A9DB406FEE12D2CC90180517 616E8A18" 375b077aed3SPierre Pronchery ... 376b077aed3SPierre Pronchery Verification: OK 377b077aed3SPierre Pronchery Verified peername: smtp.example.com 378b077aed3SPierre Pronchery DANE TLSA 2 1 1 ...ee12d2cc90180517616e8a18 matched TA certificate at depth 1 379b077aed3SPierre Pronchery ... 380b077aed3SPierre Pronchery 381b077aed3SPierre Pronchery=item B<-dane_ee_no_namechecks> 382b077aed3SPierre Pronchery 383b077aed3SPierre ProncheryThis disables server name checks when authenticating via DANE-EE(3) TLSA 384b077aed3SPierre Proncheryrecords. 385b077aed3SPierre ProncheryFor some applications, primarily web browsers, it is not safe to disable name 386b077aed3SPierre Proncherychecks due to "unknown key share" attacks, in which a malicious server can 387b077aed3SPierre Proncheryconvince a client that a connection to a victim server is instead a secure 388b077aed3SPierre Proncheryconnection to the malicious server. 389b077aed3SPierre ProncheryThe malicious server may then be able to violate cross-origin scripting 390b077aed3SPierre Proncheryrestrictions. 391b077aed3SPierre ProncheryThus, despite the text of RFC7671, name checks are by default enabled for 392b077aed3SPierre ProncheryDANE-EE(3) TLSA records, and can be disabled in applications where it is safe 393b077aed3SPierre Proncheryto do so. 394b077aed3SPierre ProncheryIn particular, SMTP and XMPP clients should set this option as SRV and MX 395b077aed3SPierre Proncheryrecords already make it possible for a remote domain to redirect client 396b077aed3SPierre Proncheryconnections to any server of its choice, and in any case SMTP and XMPP clients 397b077aed3SPierre Proncherydo not execute scripts downloaded from remote servers. 398b077aed3SPierre Pronchery 399b077aed3SPierre Pronchery=item B<-reconnect> 400b077aed3SPierre Pronchery 401b077aed3SPierre ProncheryReconnects to the same server 5 times using the same session ID, this can 402b077aed3SPierre Proncherybe used as a test that session caching is working. 403b077aed3SPierre Pronchery 404b077aed3SPierre Pronchery=item B<-showcerts> 405b077aed3SPierre Pronchery 406b077aed3SPierre ProncheryDisplays the server certificate list as sent by the server: it only consists of 407b077aed3SPierre Proncherycertificates the server has sent (in the order the server has sent them). It is 408b077aed3SPierre ProncheryB<not> a verified chain. 409b077aed3SPierre Pronchery 410b077aed3SPierre Pronchery=item B<-prexit> 411b077aed3SPierre Pronchery 412b077aed3SPierre ProncheryPrint session information when the program exits. This will always attempt 413b077aed3SPierre Proncheryto print out information even if the connection fails. Normally information 414b077aed3SPierre Proncherywill only be printed out once if the connection succeeds. This option is useful 415b077aed3SPierre Proncherybecause the cipher in use may be renegotiated or the connection may fail 416b077aed3SPierre Proncherybecause a client certificate is required or is requested only after an 417b077aed3SPierre Proncheryattempt is made to access a certain URL. Note: the output produced by this 418b077aed3SPierre Proncheryoption is not always accurate because a connection might never have been 419b077aed3SPierre Proncheryestablished. 420b077aed3SPierre Pronchery 421b077aed3SPierre Pronchery=item B<-state> 422b077aed3SPierre Pronchery 423b077aed3SPierre ProncheryPrints out the SSL session states. 424b077aed3SPierre Pronchery 425b077aed3SPierre Pronchery=item B<-debug> 426b077aed3SPierre Pronchery 427b077aed3SPierre ProncheryPrint extensive debugging information including a hex dump of all traffic. 428b077aed3SPierre Pronchery 429b077aed3SPierre Pronchery=item B<-nocommands> 430b077aed3SPierre Pronchery 431b077aed3SPierre ProncheryDo not use interactive command letters. 432b077aed3SPierre Pronchery 433b077aed3SPierre Pronchery=item B<-security_debug> 434b077aed3SPierre Pronchery 435b077aed3SPierre ProncheryEnable security debug messages. 436b077aed3SPierre Pronchery 437b077aed3SPierre Pronchery=item B<-security_debug_verbose> 438b077aed3SPierre Pronchery 439b077aed3SPierre ProncheryOutput more security debug output. 440b077aed3SPierre Pronchery 441b077aed3SPierre Pronchery=item B<-msg> 442b077aed3SPierre Pronchery 443b077aed3SPierre ProncheryShow protocol messages. 444b077aed3SPierre Pronchery 445b077aed3SPierre Pronchery=item B<-timeout> 446b077aed3SPierre Pronchery 447b077aed3SPierre ProncheryEnable send/receive timeout on DTLS connections. 448b077aed3SPierre Pronchery 449b077aed3SPierre Pronchery=item B<-mtu> I<size> 450b077aed3SPierre Pronchery 451b077aed3SPierre ProncherySet MTU of the link layer to the specified size. 452b077aed3SPierre Pronchery 453b077aed3SPierre Pronchery=item B<-no_etm> 454b077aed3SPierre Pronchery 455b077aed3SPierre ProncheryDisable Encrypt-then-MAC negotiation. 456b077aed3SPierre Pronchery 457b077aed3SPierre Pronchery=item B<-keymatexport> I<label> 458b077aed3SPierre Pronchery 459b077aed3SPierre ProncheryExport keying material using the specified label. 460b077aed3SPierre Pronchery 461b077aed3SPierre Pronchery=item B<-keymatexportlen> I<len> 462b077aed3SPierre Pronchery 463b077aed3SPierre ProncheryExport the specified number of bytes of keying material; default is 20. 464b077aed3SPierre Pronchery 465b077aed3SPierre ProncheryShow all protocol messages with hex dump. 466b077aed3SPierre Pronchery 467b077aed3SPierre Pronchery=item B<-trace> 468b077aed3SPierre Pronchery 469b077aed3SPierre ProncheryShow verbose trace output of protocol messages. 470b077aed3SPierre Pronchery 471b077aed3SPierre Pronchery=item B<-msgfile> I<filename> 472b077aed3SPierre Pronchery 473b077aed3SPierre ProncheryFile to send output of B<-msg> or B<-trace> to, default standard output. 474b077aed3SPierre Pronchery 475b077aed3SPierre Pronchery=item B<-nbio_test> 476b077aed3SPierre Pronchery 477b077aed3SPierre ProncheryTests nonblocking I/O 478b077aed3SPierre Pronchery 479b077aed3SPierre Pronchery=item B<-nbio> 480b077aed3SPierre Pronchery 481b077aed3SPierre ProncheryTurns on nonblocking I/O 482b077aed3SPierre Pronchery 483b077aed3SPierre Pronchery=item B<-crlf> 484b077aed3SPierre Pronchery 485b077aed3SPierre ProncheryThis option translated a line feed from the terminal into CR+LF as required 486b077aed3SPierre Proncheryby some servers. 487b077aed3SPierre Pronchery 488b077aed3SPierre Pronchery=item B<-ign_eof> 489b077aed3SPierre Pronchery 490b077aed3SPierre ProncheryInhibit shutting down the connection when end of file is reached in the 491b077aed3SPierre Proncheryinput. 492b077aed3SPierre Pronchery 493b077aed3SPierre Pronchery=item B<-quiet> 494b077aed3SPierre Pronchery 495b077aed3SPierre ProncheryInhibit printing of session and certificate information. This implicitly 496b077aed3SPierre Proncheryturns on B<-ign_eof> as well. 497b077aed3SPierre Pronchery 498b077aed3SPierre Pronchery=item B<-no_ign_eof> 499b077aed3SPierre Pronchery 500b077aed3SPierre ProncheryShut down the connection when end of file is reached in the input. 501b077aed3SPierre ProncheryCan be used to override the implicit B<-ign_eof> after B<-quiet>. 502b077aed3SPierre Pronchery 503b077aed3SPierre Pronchery=item B<-psk_identity> I<identity> 504b077aed3SPierre Pronchery 505b077aed3SPierre ProncheryUse the PSK identity I<identity> when using a PSK cipher suite. 506b077aed3SPierre ProncheryThe default value is "Client_identity" (without the quotes). 507b077aed3SPierre Pronchery 508b077aed3SPierre Pronchery=item B<-psk> I<key> 509b077aed3SPierre Pronchery 510b077aed3SPierre ProncheryUse the PSK key I<key> when using a PSK cipher suite. The key is 511b077aed3SPierre Proncherygiven as a hexadecimal number without leading 0x, for example -psk 512b077aed3SPierre Pronchery1a2b3c4d. 513b077aed3SPierre ProncheryThis option must be provided in order to use a PSK cipher. 514b077aed3SPierre Pronchery 515b077aed3SPierre Pronchery=item B<-psk_session> I<file> 516b077aed3SPierre Pronchery 517b077aed3SPierre ProncheryUse the pem encoded SSL_SESSION data stored in I<file> as the basis of a PSK. 518b077aed3SPierre ProncheryNote that this will only work if TLSv1.3 is negotiated. 519b077aed3SPierre Pronchery 520b077aed3SPierre Pronchery=item B<-sctp> 521b077aed3SPierre Pronchery 522b077aed3SPierre ProncheryUse SCTP for the transport protocol instead of UDP in DTLS. Must be used in 523b077aed3SPierre Proncheryconjunction with B<-dtls>, B<-dtls1> or B<-dtls1_2>. This option is only 524b077aed3SPierre Proncheryavailable where OpenSSL has support for SCTP enabled. 525b077aed3SPierre Pronchery 526b077aed3SPierre Pronchery=item B<-sctp_label_bug> 527b077aed3SPierre Pronchery 528b077aed3SPierre ProncheryUse the incorrect behaviour of older OpenSSL implementations when computing 529b077aed3SPierre Proncheryendpoint-pair shared secrets for DTLS/SCTP. This allows communication with 530b077aed3SPierre Proncheryolder broken implementations but breaks interoperability with correct 531b077aed3SPierre Proncheryimplementations. Must be used in conjunction with B<-sctp>. This option is only 532b077aed3SPierre Proncheryavailable where OpenSSL has support for SCTP enabled. 533b077aed3SPierre Pronchery 534b077aed3SPierre Pronchery=item B<-fallback_scsv> 535b077aed3SPierre Pronchery 536b077aed3SPierre ProncherySend TLS_FALLBACK_SCSV in the ClientHello. 537b077aed3SPierre Pronchery 538b077aed3SPierre Pronchery=item B<-async> 539b077aed3SPierre Pronchery 540b077aed3SPierre ProncherySwitch on asynchronous mode. Cryptographic operations will be performed 541b077aed3SPierre Proncheryasynchronously. This will only have an effect if an asynchronous capable engine 542b077aed3SPierre Proncheryis also used via the B<-engine> option. For test purposes the dummy async engine 543b077aed3SPierre Pronchery(dasync) can be used (if available). 544b077aed3SPierre Pronchery 545b077aed3SPierre Pronchery=item B<-maxfraglen> I<len> 546b077aed3SPierre Pronchery 547b077aed3SPierre ProncheryEnable Maximum Fragment Length Negotiation; allowed values are 548b077aed3SPierre ProncheryC<512>, C<1024>, C<2048>, and C<4096>. 549b077aed3SPierre Pronchery 550b077aed3SPierre Pronchery=item B<-max_send_frag> I<int> 551b077aed3SPierre Pronchery 552b077aed3SPierre ProncheryThe maximum size of data fragment to send. 553b077aed3SPierre ProncherySee L<SSL_CTX_set_max_send_fragment(3)> for further information. 554b077aed3SPierre Pronchery 555b077aed3SPierre Pronchery=item B<-split_send_frag> I<int> 556b077aed3SPierre Pronchery 557b077aed3SPierre ProncheryThe size used to split data for encrypt pipelines. If more data is written in 558b077aed3SPierre Proncheryone go than this value then it will be split into multiple pipelines, up to the 559b077aed3SPierre Proncherymaximum number of pipelines defined by max_pipelines. This only has an effect if 560b077aed3SPierre Proncherya suitable cipher suite has been negotiated, an engine that supports pipelining 561b077aed3SPierre Proncheryhas been loaded, and max_pipelines is greater than 1. See 562b077aed3SPierre ProncheryL<SSL_CTX_set_split_send_fragment(3)> for further information. 563b077aed3SPierre Pronchery 564b077aed3SPierre Pronchery=item B<-max_pipelines> I<int> 565b077aed3SPierre Pronchery 566b077aed3SPierre ProncheryThe maximum number of encrypt/decrypt pipelines to be used. This will only have 567b077aed3SPierre Proncheryan effect if an engine has been loaded that supports pipelining (e.g. the dasync 568b077aed3SPierre Proncheryengine) and a suitable cipher suite has been negotiated. The default value is 1. 569b077aed3SPierre ProncherySee L<SSL_CTX_set_max_pipelines(3)> for further information. 570b077aed3SPierre Pronchery 571b077aed3SPierre Pronchery=item B<-read_buf> I<int> 572b077aed3SPierre Pronchery 573b077aed3SPierre ProncheryThe default read buffer size to be used for connections. This will only have an 574b077aed3SPierre Proncheryeffect if the buffer size is larger than the size that would otherwise be used 575b077aed3SPierre Proncheryand pipelining is in use (see L<SSL_CTX_set_default_read_buffer_len(3)> for 576b077aed3SPierre Proncheryfurther information). 577b077aed3SPierre Pronchery 578b077aed3SPierre Pronchery=item B<-ignore_unexpected_eof> 579b077aed3SPierre Pronchery 580b077aed3SPierre ProncherySome TLS implementations do not send the mandatory close_notify alert on 581b077aed3SPierre Proncheryshutdown. If the application tries to wait for the close_notify alert but the 582b077aed3SPierre Proncherypeer closes the connection without sending it, an error is generated. When this 583b077aed3SPierre Proncheryoption is enabled the peer does not need to send the close_notify alert and a 584b077aed3SPierre Proncheryclosed connection will be treated as if the close_notify alert was received. 585b077aed3SPierre ProncheryFor more information on shutting down a connection, see L<SSL_shutdown(3)>. 586b077aed3SPierre Pronchery 587b077aed3SPierre Pronchery=item B<-bugs> 588b077aed3SPierre Pronchery 589b077aed3SPierre ProncheryThere are several known bugs in SSL and TLS implementations. Adding this 590b077aed3SPierre Proncheryoption enables various workarounds. 591b077aed3SPierre Pronchery 592b077aed3SPierre Pronchery=item B<-comp> 593b077aed3SPierre Pronchery 594b077aed3SPierre ProncheryEnables support for SSL/TLS compression. 595b077aed3SPierre ProncheryThis option was introduced in OpenSSL 1.1.0. 596b077aed3SPierre ProncheryTLS compression is not recommended and is off by default as of 597b077aed3SPierre ProncheryOpenSSL 1.1.0. 598b077aed3SPierre Pronchery 599b077aed3SPierre Pronchery=item B<-no_comp> 600b077aed3SPierre Pronchery 601b077aed3SPierre ProncheryDisables support for SSL/TLS compression. 602b077aed3SPierre ProncheryTLS compression is not recommended and is off by default as of 603b077aed3SPierre ProncheryOpenSSL 1.1.0. 604b077aed3SPierre Pronchery 605b077aed3SPierre Pronchery=item B<-brief> 606b077aed3SPierre Pronchery 607b077aed3SPierre ProncheryOnly provide a brief summary of connection parameters instead of the 608b077aed3SPierre Proncherynormal verbose output. 609b077aed3SPierre Pronchery 610b077aed3SPierre Pronchery=item B<-sigalgs> I<sigalglist> 611b077aed3SPierre Pronchery 612b077aed3SPierre ProncherySpecifies the list of signature algorithms that are sent by the client. 613b077aed3SPierre ProncheryThe server selects one entry in the list based on its preferences. 614b077aed3SPierre ProncheryFor example strings, see L<SSL_CTX_set1_sigalgs(3)> 615b077aed3SPierre Pronchery 616b077aed3SPierre Pronchery=item B<-curves> I<curvelist> 617b077aed3SPierre Pronchery 618b077aed3SPierre ProncherySpecifies the list of supported curves to be sent by the client. The curve is 619*a7148ab3SEnji Cooperultimately selected by the server. 620*a7148ab3SEnji Cooper 621*a7148ab3SEnji CooperThe list of all supported groups includes named EC parameters as well as X25519 622*a7148ab3SEnji Cooperand X448 or FFDHE groups, and may also include groups implemented in 3rd-party 623*a7148ab3SEnji Cooperproviders. For a list of named EC parameters, use: 624b077aed3SPierre Pronchery 625b077aed3SPierre Pronchery $ openssl ecparam -list_curves 626b077aed3SPierre Pronchery 627b077aed3SPierre Pronchery=item B<-cipher> I<cipherlist> 628b077aed3SPierre Pronchery 629b077aed3SPierre ProncheryThis allows the TLSv1.2 and below cipher list sent by the client to be modified. 630b077aed3SPierre ProncheryThis list will be combined with any TLSv1.3 ciphersuites that have been 631b077aed3SPierre Proncheryconfigured. Although the server determines which ciphersuite is used it should 632b077aed3SPierre Proncherytake the first supported cipher in the list sent by the client. See 633b077aed3SPierre ProncheryL<openssl-ciphers(1)> for more information. 634b077aed3SPierre Pronchery 635b077aed3SPierre Pronchery=item B<-ciphersuites> I<val> 636b077aed3SPierre Pronchery 637b077aed3SPierre ProncheryThis allows the TLSv1.3 ciphersuites sent by the client to be modified. This 638b077aed3SPierre Proncherylist will be combined with any TLSv1.2 and below ciphersuites that have been 639b077aed3SPierre Proncheryconfigured. Although the server determines which cipher suite is used it should 640b077aed3SPierre Proncherytake the first supported cipher in the list sent by the client. See 641b077aed3SPierre ProncheryL<openssl-ciphers(1)> for more information. The format for this list is a simple 642b077aed3SPierre Proncherycolon (":") separated list of TLSv1.3 ciphersuite names. 643b077aed3SPierre Pronchery 644b077aed3SPierre Pronchery=item B<-starttls> I<protocol> 645b077aed3SPierre Pronchery 646b077aed3SPierre ProncherySend the protocol-specific message(s) to switch to TLS for communication. 647b077aed3SPierre ProncheryI<protocol> is a keyword for the intended protocol. Currently, the only 648b077aed3SPierre Proncherysupported keywords are "smtp", "pop3", "imap", "ftp", "xmpp", "xmpp-server", 649b077aed3SPierre Pronchery"irc", "postgres", "mysql", "lmtp", "nntp", "sieve" and "ldap". 650b077aed3SPierre Pronchery 651b077aed3SPierre Pronchery=item B<-xmpphost> I<hostname> 652b077aed3SPierre Pronchery 653b077aed3SPierre ProncheryThis option, when used with "-starttls xmpp" or "-starttls xmpp-server", 654b077aed3SPierre Proncheryspecifies the host for the "to" attribute of the stream element. 655b077aed3SPierre ProncheryIf this option is not specified, then the host specified with "-connect" 656b077aed3SPierre Proncherywill be used. 657b077aed3SPierre Pronchery 658b077aed3SPierre ProncheryThis option is an alias of the B<-name> option for "xmpp" and "xmpp-server". 659b077aed3SPierre Pronchery 660b077aed3SPierre Pronchery=item B<-name> I<hostname> 661b077aed3SPierre Pronchery 662b077aed3SPierre ProncheryThis option is used to specify hostname information for various protocols 663b077aed3SPierre Proncheryused with B<-starttls> option. Currently only "xmpp", "xmpp-server", 664b077aed3SPierre Pronchery"smtp" and "lmtp" can utilize this B<-name> option. 665b077aed3SPierre Pronchery 666b077aed3SPierre ProncheryIf this option is used with "-starttls xmpp" or "-starttls xmpp-server", 667b077aed3SPierre Proncheryif specifies the host for the "to" attribute of the stream element. If this 668b077aed3SPierre Proncheryoption is not specified, then the host specified with "-connect" will be used. 669b077aed3SPierre Pronchery 670b077aed3SPierre ProncheryIf this option is used with "-starttls lmtp" or "-starttls smtp", it specifies 671b077aed3SPierre Proncherythe name to use in the "LMTP LHLO" or "SMTP EHLO" message, respectively. If 672b077aed3SPierre Proncherythis option is not specified, then "mail.example.com" will be used. 673b077aed3SPierre Pronchery 674b077aed3SPierre Pronchery=item B<-tlsextdebug> 675b077aed3SPierre Pronchery 676b077aed3SPierre ProncheryPrint out a hex dump of any TLS extensions received from the server. 677b077aed3SPierre Pronchery 678b077aed3SPierre Pronchery=item B<-no_ticket> 679b077aed3SPierre Pronchery 680b077aed3SPierre ProncheryDisable RFC4507bis session ticket support. 681b077aed3SPierre Pronchery 682b077aed3SPierre Pronchery=item B<-sess_out> I<filename> 683b077aed3SPierre Pronchery 684b077aed3SPierre ProncheryOutput SSL session to I<filename>. 685b077aed3SPierre Pronchery 686b077aed3SPierre Pronchery=item B<-sess_in> I<filename> 687b077aed3SPierre Pronchery 688b077aed3SPierre ProncheryLoad SSL session from I<filename>. The client will attempt to resume a 689b077aed3SPierre Proncheryconnection from this session. 690b077aed3SPierre Pronchery 691b077aed3SPierre Pronchery=item B<-serverinfo> I<types> 692b077aed3SPierre Pronchery 693b077aed3SPierre ProncheryA list of comma-separated TLS Extension Types (numbers between 0 and 694b077aed3SPierre Pronchery65535). Each type will be sent as an empty ClientHello TLS Extension. 695b077aed3SPierre ProncheryThe server's response (if any) will be encoded and displayed as a PEM 696b077aed3SPierre Proncheryfile. 697b077aed3SPierre Pronchery 698b077aed3SPierre Pronchery=item B<-status> 699b077aed3SPierre Pronchery 700b077aed3SPierre ProncherySends a certificate status request to the server (OCSP stapling). The server 701b077aed3SPierre Proncheryresponse (if any) is printed out. 702b077aed3SPierre Pronchery 703b077aed3SPierre Pronchery=item B<-alpn> I<protocols>, B<-nextprotoneg> I<protocols> 704b077aed3SPierre Pronchery 705b077aed3SPierre ProncheryThese flags enable the Enable the Application-Layer Protocol Negotiation 706b077aed3SPierre Proncheryor Next Protocol Negotiation (NPN) extension, respectively. ALPN is the 707b077aed3SPierre ProncheryIETF standard and replaces NPN. 708b077aed3SPierre ProncheryThe I<protocols> list is a comma-separated list of protocol names that 709b077aed3SPierre Proncherythe client should advertise support for. The list should contain the most 710b077aed3SPierre Proncherydesirable protocols first. Protocol names are printable ASCII strings, 711b077aed3SPierre Proncheryfor example "http/1.1" or "spdy/3". 712b077aed3SPierre ProncheryAn empty list of protocols is treated specially and will cause the 713b077aed3SPierre Proncheryclient to advertise support for the TLS extension but disconnect just 714b077aed3SPierre Proncheryafter receiving ServerHello with a list of server supported protocols. 715b077aed3SPierre ProncheryThe flag B<-nextprotoneg> cannot be specified if B<-tls1_3> is used. 716b077aed3SPierre Pronchery 717b077aed3SPierre Pronchery=item B<-ct>, B<-noct> 718b077aed3SPierre Pronchery 719b077aed3SPierre ProncheryUse one of these two options to control whether Certificate Transparency (CT) 720b077aed3SPierre Proncheryis enabled (B<-ct>) or disabled (B<-noct>). 721b077aed3SPierre ProncheryIf CT is enabled, signed certificate timestamps (SCTs) will be requested from 722b077aed3SPierre Proncherythe server and reported at handshake completion. 723b077aed3SPierre Pronchery 724b077aed3SPierre ProncheryEnabling CT also enables OCSP stapling, as this is one possible delivery method 725b077aed3SPierre Proncheryfor SCTs. 726b077aed3SPierre Pronchery 727b077aed3SPierre Pronchery=item B<-ctlogfile> 728b077aed3SPierre Pronchery 729b077aed3SPierre ProncheryA file containing a list of known Certificate Transparency logs. See 730b077aed3SPierre ProncheryL<SSL_CTX_set_ctlog_list_file(3)> for the expected file format. 731b077aed3SPierre Pronchery 732b077aed3SPierre Pronchery=item B<-keylogfile> I<file> 733b077aed3SPierre Pronchery 734b077aed3SPierre ProncheryAppends TLS secrets to the specified keylog file such that external programs 735b077aed3SPierre Pronchery(like Wireshark) can decrypt TLS connections. 736b077aed3SPierre Pronchery 737b077aed3SPierre Pronchery=item B<-early_data> I<file> 738b077aed3SPierre Pronchery 739b077aed3SPierre ProncheryReads the contents of the specified file and attempts to send it as early data 740b077aed3SPierre Proncheryto the server. This will only work with resumed sessions that support early 741b077aed3SPierre Proncherydata and when the server accepts the early data. 742b077aed3SPierre Pronchery 743b077aed3SPierre Pronchery=item B<-enable_pha> 744b077aed3SPierre Pronchery 745b077aed3SPierre ProncheryFor TLSv1.3 only, send the Post-Handshake Authentication extension. This will 746b077aed3SPierre Proncheryhappen whether or not a certificate has been provided via B<-cert>. 747b077aed3SPierre Pronchery 748b077aed3SPierre Pronchery=item B<-use_srtp> I<value> 749b077aed3SPierre Pronchery 750b077aed3SPierre ProncheryOffer SRTP key management, where B<value> is a colon-separated profile list. 751b077aed3SPierre Pronchery 752b077aed3SPierre Pronchery=item B<-srpuser> I<value> 753b077aed3SPierre Pronchery 754b077aed3SPierre ProncherySet the SRP username to the specified value. This option is deprecated. 755b077aed3SPierre Pronchery 756b077aed3SPierre Pronchery=item B<-srppass> I<value> 757b077aed3SPierre Pronchery 758b077aed3SPierre ProncherySet the SRP password to the specified value. This option is deprecated. 759b077aed3SPierre Pronchery 760b077aed3SPierre Pronchery=item B<-srp_lateuser> 761b077aed3SPierre Pronchery 762b077aed3SPierre ProncherySRP username for the second ClientHello message. This option is deprecated. 763b077aed3SPierre Pronchery 764b077aed3SPierre Pronchery=item B<-srp_moregroups> This option is deprecated. 765b077aed3SPierre Pronchery 766b077aed3SPierre ProncheryTolerate other than the known B<g> and B<N> values. 767b077aed3SPierre Pronchery 768b077aed3SPierre Pronchery=item B<-srp_strength> I<number> 769b077aed3SPierre Pronchery 770b077aed3SPierre ProncherySet the minimal acceptable length, in bits, for B<N>. This option is 771b077aed3SPierre Proncherydeprecated. 772b077aed3SPierre Pronchery 773b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_version_item -} 774b077aed3SPierre Pronchery 775b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_name_item -} 776b077aed3SPierre Pronchery 777b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_x_item -} 778b077aed3SPierre Pronchery 779b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_trust_item -} 780b077aed3SPierre Pronchery 781b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_s_item -} 782b077aed3SPierre Pronchery 783b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_r_item -} 784b077aed3SPierre Pronchery 785b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_provider_item -} 786b077aed3SPierre Pronchery 787b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_engine_item -} 788b077aed3SPierre Pronchery 789b077aed3SPierre Pronchery{- output_off() if $disabled{"deprecated-3.0"}; "" -} 790b077aed3SPierre Pronchery=item B<-ssl_client_engine> I<id> 791b077aed3SPierre Pronchery 792b077aed3SPierre ProncherySpecify engine to be used for client certificate operations. 793b077aed3SPierre Pronchery{- output_on() if $disabled{"deprecated-3.0"}; "" -} 794b077aed3SPierre Pronchery 795b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_v_item -} 796b077aed3SPierre Pronchery 797b077aed3SPierre ProncheryVerification errors are displayed, for debugging, but the command will 798b077aed3SPierre Proncheryproceed unless the B<-verify_return_error> option is used. 799b077aed3SPierre Pronchery 800b077aed3SPierre Pronchery=item I<host>:I<port> 801b077aed3SPierre Pronchery 802b077aed3SPierre ProncheryRather than providing B<-connect>, the target hostname and optional port may 803b077aed3SPierre Proncherybe provided as a single positional argument after all options. If neither this 804b077aed3SPierre Proncherynor B<-connect> are provided, falls back to attempting to connect to 805b077aed3SPierre ProncheryI<localhost> on port I<4433>. 806b077aed3SPierre Pronchery 807b077aed3SPierre Pronchery=back 808b077aed3SPierre Pronchery 809b077aed3SPierre Pronchery=head1 CONNECTED COMMANDS 810b077aed3SPierre Pronchery 811b077aed3SPierre ProncheryIf a connection is established with an SSL server then any data received 812b077aed3SPierre Proncheryfrom the server is displayed and any key presses will be sent to the 813b077aed3SPierre Proncheryserver. If end of file is reached then the connection will be closed down. When 814b077aed3SPierre Proncheryused interactively (which means neither B<-quiet> nor B<-ign_eof> have been 815b077aed3SPierre Proncherygiven), then certain commands are also recognized which perform special 816b077aed3SPierre Proncheryoperations. These commands are a letter which must appear at the start of a 817b077aed3SPierre Proncheryline. They are listed below. 818b077aed3SPierre Pronchery 819b077aed3SPierre Pronchery=over 4 820b077aed3SPierre Pronchery 821b077aed3SPierre Pronchery=item B<Q> 822b077aed3SPierre Pronchery 823b077aed3SPierre ProncheryEnd the current SSL connection and exit. 824b077aed3SPierre Pronchery 825b077aed3SPierre Pronchery=item B<R> 826b077aed3SPierre Pronchery 827b077aed3SPierre ProncheryRenegotiate the SSL session (TLSv1.2 and below only). 828b077aed3SPierre Pronchery 829b077aed3SPierre Pronchery=item B<k> 830b077aed3SPierre Pronchery 831b077aed3SPierre ProncherySend a key update message to the server (TLSv1.3 only) 832b077aed3SPierre Pronchery 833b077aed3SPierre Pronchery=item B<K> 834b077aed3SPierre Pronchery 835b077aed3SPierre ProncherySend a key update message to the server and request one back (TLSv1.3 only) 836b077aed3SPierre Pronchery 837b077aed3SPierre Pronchery=back 838b077aed3SPierre Pronchery 839b077aed3SPierre Pronchery=head1 NOTES 840b077aed3SPierre Pronchery 841b077aed3SPierre ProncheryThis command can be used to debug SSL servers. To connect to an SSL HTTP 842b077aed3SPierre Proncheryserver the command: 843b077aed3SPierre Pronchery 844b077aed3SPierre Pronchery openssl s_client -connect servername:443 845b077aed3SPierre Pronchery 846b077aed3SPierre Proncherywould typically be used (https uses port 443). If the connection succeeds 847b077aed3SPierre Proncherythen an HTTP command can be given such as "GET /" to retrieve a web page. 848b077aed3SPierre Pronchery 849b077aed3SPierre ProncheryIf the handshake fails then there are several possible causes, if it is 850b077aed3SPierre Proncherynothing obvious like no client certificate then the B<-bugs>, 851b077aed3SPierre ProncheryB<-ssl3>, B<-tls1>, B<-no_ssl3>, B<-no_tls1> options can be tried 852b077aed3SPierre Proncheryin case it is a buggy server. In particular you should play with these 853b077aed3SPierre Proncheryoptions B<before> submitting a bug report to an OpenSSL mailing list. 854b077aed3SPierre Pronchery 855b077aed3SPierre ProncheryA frequent problem when attempting to get client certificates working 856b077aed3SPierre Proncheryis that a web client complains it has no certificates or gives an empty 857b077aed3SPierre Proncherylist to choose from. This is normally because the server is not sending 858b077aed3SPierre Proncherythe clients certificate authority in its "acceptable CA list" when it 859b077aed3SPierre Proncheryrequests a certificate. By using this command, the CA list can be viewed 860b077aed3SPierre Proncheryand checked. However, some servers only request client authentication 861b077aed3SPierre Proncheryafter a specific URL is requested. To obtain the list in this case it 862b077aed3SPierre Proncheryis necessary to use the B<-prexit> option and send an HTTP request 863b077aed3SPierre Proncheryfor an appropriate page. 864b077aed3SPierre Pronchery 865b077aed3SPierre ProncheryIf a certificate is specified on the command line using the B<-cert> 866b077aed3SPierre Proncheryoption it will not be used unless the server specifically requests 867b077aed3SPierre Proncherya client certificate. Therefore, merely including a client certificate 868b077aed3SPierre Proncheryon the command line is no guarantee that the certificate works. 869b077aed3SPierre Pronchery 870b077aed3SPierre ProncheryIf there are problems verifying a server certificate then the 871b077aed3SPierre ProncheryB<-showcerts> option can be used to show all the certificates sent by the 872b077aed3SPierre Proncheryserver. 873b077aed3SPierre Pronchery 874b077aed3SPierre ProncheryThis command is a test tool and is designed to continue the 875b077aed3SPierre Proncheryhandshake after any certificate verification errors. As a result it will 876b077aed3SPierre Proncheryaccept any certificate chain (trusted or not) sent by the peer. Non-test 877b077aed3SPierre Proncheryapplications should B<not> do this as it makes them vulnerable to a MITM 878b077aed3SPierre Proncheryattack. This behaviour can be changed by with the B<-verify_return_error> 879b077aed3SPierre Proncheryoption: any verify errors are then returned aborting the handshake. 880b077aed3SPierre Pronchery 881b077aed3SPierre ProncheryThe B<-bind> option may be useful if the server or a firewall requires 882b077aed3SPierre Proncheryconnections to come from some particular address and or port. 883b077aed3SPierre Pronchery 884b077aed3SPierre Pronchery=head1 BUGS 885b077aed3SPierre Pronchery 886b077aed3SPierre ProncheryBecause this program has a lot of options and also because some of the 887b077aed3SPierre Proncherytechniques used are rather old, the C source for this command is rather 888b077aed3SPierre Proncheryhard to read and not a model of how things should be done. 889b077aed3SPierre ProncheryA typical SSL client program would be much simpler. 890b077aed3SPierre Pronchery 891b077aed3SPierre ProncheryThe B<-prexit> option is a bit of a hack. We should really report 892b077aed3SPierre Proncheryinformation whenever a session is renegotiated. 893b077aed3SPierre Pronchery 894b077aed3SPierre Pronchery=head1 SEE ALSO 895b077aed3SPierre Pronchery 896b077aed3SPierre ProncheryL<openssl(1)>, 897b077aed3SPierre ProncheryL<openssl-sess_id(1)>, 898b077aed3SPierre ProncheryL<openssl-s_server(1)>, 899b077aed3SPierre ProncheryL<openssl-ciphers(1)>, 900b077aed3SPierre ProncheryL<SSL_CONF_cmd(3)>, 901b077aed3SPierre ProncheryL<SSL_CTX_set_max_send_fragment(3)>, 902b077aed3SPierre ProncheryL<SSL_CTX_set_split_send_fragment(3)>, 903b077aed3SPierre ProncheryL<SSL_CTX_set_max_pipelines(3)>, 904b077aed3SPierre ProncheryL<ossl_store-file(7)> 905b077aed3SPierre Pronchery 906b077aed3SPierre Pronchery=head1 HISTORY 907b077aed3SPierre Pronchery 908b077aed3SPierre ProncheryThe B<-no_alt_chains> option was added in OpenSSL 1.1.0. 909b077aed3SPierre ProncheryThe B<-name> option was added in OpenSSL 1.1.1. 910b077aed3SPierre Pronchery 911b077aed3SPierre ProncheryThe B<-certform> option has become obsolete in OpenSSL 3.0.0 and has no effect. 912b077aed3SPierre Pronchery 913b077aed3SPierre ProncheryThe B<-engine> option was deprecated in OpenSSL 3.0. 914b077aed3SPierre Pronchery 915b077aed3SPierre Pronchery=head1 COPYRIGHT 916b077aed3SPierre Pronchery 917*a7148ab3SEnji CooperCopyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved. 918b077aed3SPierre Pronchery 919b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 920b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 921b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 922b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 923b077aed3SPierre Pronchery 924b077aed3SPierre Pronchery=cut 925