OPENSSL-S_SERVER(1SSL)
π openssl-s_server β SSL/TLS server program π
hiii bestie π okay so this is the manpage for openssl-s_server, straight out of the OpenSSL manual, section 1SSL. it's lowkey a whole chonky queen and we're only doing part one rn, so hydrate, sit down, and let's get into it. β¨
π NAME π
openssl-s_server β SSL/TLS server program π
π¦ SYNOPSIS π¦
openssl s_server [-help] [-port +int] [-accept val] [-unix val] [-4]
[-6] [-unlink] [-context val] [-verify int] [-Verify int] [-cert infile]
[-cert2 infile] [-certform DER|PEM|P12] [-cert_chain infile]
[-build_chain] [-serverinfo val] [-key filename|uri] [-key2
filename|uri] [-keyform DER|PEM|P12] [-pass val] [-dcert infile]
[-dcertform DER|PEM|P12] [-dcert_chain infile] [-dkey filename|uri]
[-dkeyform DER|PEM|P12] [-dpass val] [-nbio_test] [-crlf] [-debug]
[-msg] [-msgfile outfile] [-state] [-nocert] [-quiet]
[-no_resume_ephemeral] [-www] [-WWW] [-http_server_binmode]
[-no_ca_names] [-ignore_unexpected_eof] [-servername]
[-servername_fatal] [-tlsextdebug] [-HTTP] [-id_prefix val]
[-keymatexport val] [-keymatexportlen +int] [-CRL infile] [-CRLform
DER|PEM] [-crl_download] [-chainCAfile infile] [-chainCApath dir]
[-chainCAstore uri] [-verifyCAfile infile] [-verifyCApath dir]
[-verifyCAstore uri] [-no_cache] [-ext_cache] [-verify_return_error]
[-verify_quiet] [-ign_eof] [-no_ign_eof] [-no_ems] [-status]
[-status_all] [-status_verbose] [-status_timeout int] [-proxy
[http[s]://][userinfo@]host[:port][/path][?query][#fragment]] [-no_proxy
addresses] [-status_url val] [-status_file infile] [-ssl_config val]
[-trace] [-security_debug] [-security_debug_verbose] [-brief] [-rev]
[-async] [-max_send_frag +int] [-split_send_frag +int] [-max_pipelines
+int] [-naccept +int] [-read_buf +int] [-no_tx_cert_comp]
[-no_rx_cert_comp] [-dhparam infile] [-nbio] [-psk_identity val]
[-psk_hint val] [-psk val] [-psk_session file] [-srpvfile infile]
[-srpuserseed val] [-timeout] [-mtu +int] [-listen] [-sctp]
[-sctp_label_bug] [-use_srtp val] [-no_dhe] [-nextprotoneg val] [-alpn
val] [-ktls] [-sendfile] [-zerocopy_sendfile] [-keylogfile outfile]
[-recv_max_early_data int] [-max_early_data int] [-early_data]
[-stateless] [-anti_replay] [-no_anti_replay] [-num_tickets] [-tfo]
[-cert_comp] [-nameopt option] [-no_ssl3] [-no_tls1] [-no_tls1_1]
[-no_tls1_2] [-no_tls1_3] [-tls1] [-tls1_1] [-tls1_2] [-tls1_3] [-dtls]
[-dtls1] [-dtls1_2] [-allow_proxy_certs] [-attime timestamp]
[-no_check_time] [-check_ss_sig] [-crl_check] [-crl_check_all]
[-explicit_policy] [-extended_crl] [-ignore_critical] [-inhibit_any]
[-inhibit_map] [-partial_chain] [-policy arg] [-policy_check]
[-policy_print] [-purpose purpose] [-suiteB_128] [-suiteB_128_only]
[-suiteB_192] [-trusted_first] [-no_alt_chains] [-use_deltas]
[-auth_level num] [-verify_depth num] [-verify_email email]
[-verify_hostname hostname] [-verify_ip ip] [-verify_name name]
[-x509_strict] [-issuer_checks] [-bugs] [-no_comp] [-comp] [-no_ticket]
[-serverpref] [-client_renegotiation] [-legacy_renegotiation]
[-no_renegotiation] [-no_resumption_on_reneg] [-legacy_server_connect]
[-no_legacy_server_connect] [-no_etm] [-allow_no_dhe_kex]
[-prefer_no_dhe_kex] [-prioritize_chacha] [-strict] [-sigalgs algs]
[-client_sigalgs algs] [-groups groups] [-curves curves] [-named_curve
curve] [-cipher ciphers] [-ciphersuites 1.3ciphers] [-min_protocol
minprot] [-max_protocol maxprot] [-record_padding padding]
[-debug_broken_protocol] [-no_middlebox] [-xkey infile] [-xcert file]
[-xchain file] [-xchain_build file] [-xcertform DER|PEM]> [-xkeyform
DER|PEM]> [-CAfile file] [-no-CAfile] [-CApath dir] [-no-CApath]
[-CAstore uri] [-no-CAstore] [-rand files] [-writerand file] [-provider
name] [-provider-path path] [-provparam [name:]key=value] [-propquery
propq] [-enable_server_rpk] [-enable_client_rpk] [-expected-rpks]
[-ech_key filename] [-ech_dir dirname] [-ech_noretry_dir dirname]
[-ech_trialdecrypt] [-ech_greaseretries]
π« DESCRIPTION π«
this command runs a generic SSL/TLS server β it sits there listening for connections on a port you give it, and it speaks SSL/TLS to whoever shows up. iconic behavior honestly. π«Ά
β¨ OPTIONS β¨
okay so on top of everything listed here, this command ALSO supports the common and server-only options documented as "Supported Command Line Commands" over in SSL_CONF_cmd(3). two-for-one. π
-helpβ prints out a usage message. "help me help you," etc. π-port +intβ the TCP port to listen on for connections. if you don't say anything,4433is used. yes, that's the default, no cap.-accept valβ the optional TCP host and port to listen on for connections. if you don't specify it,*:4433is used.-unix valβ Unix domain socket to accept on.-4β use IPv4 only. old reliable.-6β use IPv6 only.-unlinkβ for-unix, unlink any existing socket first. like clearing the driveway before you park. π-context valβ sets the SSL context id. you can give it literally any string value. if this option isn't present, a default value gets used instead.-verify int,-Verify intβ the verify depth to use. this is the max length of the client certificate chain, and it makes the server request a certificate from the client. with-verify(lowercase bestie) a certificate is requested but the client doesn't have to send one; with-Verify(capital, no chill) the client must supply a certificate or an error occurs, periodt.
if the cipher suite can't request a client certificate (for example an anonymous cipher suite or PSK) this option has no effect β it just sits there β¨doing nothingβ¨.
by default, validation of any supplied client certificate and its chain is done w.r.t. the (D)TLS Client ("sslclient") purpose. for the deets, see "Certificate Extensions" in openssl-verification-options(1).
-cert infileβ the certificate to use. most server cipher suites really want a certificate, and some want one with a specific public key type: for example the DSS cipher suites need a certificate holding a DSS (DSA) key. if you don't specify it, the filenameserver.pemis used.-cert2 infileβ the certificate file to use for servername; default is"server2.pem".-certform DER|PEM|P12β the server certificate file format; unspecified by default. seeopenssl-format-options(1)for the specifics.-cert_chainβ a file or URI of untrusted certificates to use when you're trying to build the certificate chain related to the certificate given via-cert. these untrusted certs get sent to clients and used for generating certificate status (aka OCSP stapling) requests. the input can be in PEM, DER, or PKCS#12 format.-build_chainβ specify whether the application should build the server certificate chain to be provided to the client.-serverinfo valβ a file containing one or more blocks of PEM data. each PEM block must encode a TLS ServerHello extension (2 bytes type, 2 bytes length, followed by"length"bytes of extension data). if the client sends an empty TLS ClientHello extension matching the type, the corresponding ServerHello extension gets returned. matching energy. π-key filename|uriβ the private key to use. if you don't specify it, the certificate file will be used.-key2 filename|uriβ the private key file to use for servername, if it wasn't already given via-cert2.-keyform DER|PEM|P12β the key format; unspecified by default. seeopenssl-format-options(1).-pass valβ the private key and certificate file password source. for more on the format of val, seeopenssl-passphrase-options(1).-dcert infile,-dkey filename|uriβ specify an additional certificate and private key. these behave the same way as the-certand-keyoptions, except there's no default if you don't specify them (so: no additional certificate and key gets used). as noted above, some cipher suites need a certificate containing a key of a certain type β some cipher suites need an RSA key and some need a DSS (DSA) key. by using RSA and DSS certificates and keys, a server can support clients that only do RSA or only do DSS cipher suites, by picking the appropriate certificate. versatile queen. π-dcert_chainβ a file or URI of untrusted certificates to use when attempting to build the server certificate chain while a certificate specified via the-dcertoption is in use. the input can be in PEM, DER, or PKCS#12 format.-dcertform DER|PEM|P12β the format of the additional certificate file; unspecified by default. seeopenssl-format-options(1).-dkeyform DER|PEM|P12β the format of the additional private key; unspecified by default. seeopenssl-format-options(1).-dpass valβ the passphrase for the additional private key and certificate. for more on the format of val, seeopenssl-passphrase-options(1).-nbio_testβ tests non blocking I/O.-crlfβ this option translates a line feed from the terminal into CR+LF.-debugβ print extensive debugging information, including a hex dump of all traffic. every byte, bestie. π-security_debugβ print output from the SSL/TLS security framework.-security_debug_verboseβ print more output from the SSL/TLS security framework.-msgβ show all protocol messages with hex dump.-msgfile outfileβ the file to send output of-msgor-traceto; default is standard output.-stateβ prints the SSL session states.-CRL infileβ the CRL file to use.-CRLform DER|PEMβ the CRL file format; unspecified by default. seeopenssl-format-options(1).-crl_downloadβ download CRLs from distribution points given in CDP extensions of certificates.-verifyCAfile filenameβ a file in PEM format containing trusted CA certificates (root and/or intermediate) used to verify the client certificate chain.-verifyCApath dirβ a directory containing trusted certificates to use for verifying client certificates. this directory must be in"hash format", seeopenssl-verify(1)for more.-verifyCAstore uriβ the URI of a store containing trusted certificates to use for verifying client certificates.
when any of -verifyCAfile, -verifyCApath, or -verifyCAstore is specified, they get loaded into a separate verification store (via SSL_CTX_set1_verify_cert_store(3)) and used for client certificate verification instead of the store built from -CAfile, -CApath, and -CAstore. note that -CAfile is the sole source of acceptable issuing CA names sent to the client in the Certificate Request message during the handshake; -CApath, -CAstore, and the -verifyCA* options do not contribute to this list. important, don't skip it. π¨
-chainCAfile fileβ a file in PEM format containing trusted certificates to use when attempting to build the server certificate chain.
and that's where part one wraps, bestie β there's SO much more server to get through, so don't go anywhere. πβ¨
-chainCApath dirβ a directory full of trusted certs, used to build the server cert chain you hand over to the client. β¨ Heads up bestie: this dir has to be in "hash format" β peepopenssl-verify(1)for the deets.-chainCAstore uriβ same idea but as a URI pointing at a store of trusted certs for building that server-side chain. The URI can be a single cert or a whole collection. If it's a"file:"scheme URI it acts like-chainCAfileor-chainCApathdepending on whether it points to a directory or one file. More on the"file:"scheme inossl_store-file(7). π«Ά-nocertβ flip this on and no certificate gets used at all. π That locks you into the anonymous cipher suites (currently just anonymous DH, soβ¦ slim pickings).-quietβ stops it printing session and certificate info. Shhh. π€«-no_resume_ephemeralβ kills caching and tickets whenever ephemeral (EC)DH is in play.-tlsextdebugβ prints a hex dump of every TLS extension the server sends back. Delulu for debugging, iconic for snooping. π₯-wwwβ sends a lil status message back to the client the moment it connects. It spills info about the ciphers used plus various session params, all in HTML so you can literally open it in a browser. π Two special URLs:"/renegcert"turns on client cert validation, and"/reneg"tells the server to request renegotiation.-WWW,-HTTPβ emulates a basic web server. Pages resolve relative to the current directory, so if someone requestshttps://myhost/page.htmlyou're sending back./page.html. With the-HTTPflag the files go out directly and should already contain any HTTP response headers (status line included). With-WWWinstead, the server generates the headers for you and peeks at the file extension to decide theContent-Type. Extensions"html","htm", and"php"map totext/html; everything else istext/plain. Also, the special URL"/stats"returns status info just like-wwwdoes. π-http_server_binmodeβ when you're web-serving (via-WWWor-HTTP), open the files the client asks for in binary mode.-no_ca_namesβ disables the TLS Extension CA Names. You might want this for security reasons, or for compat with certain Windows TLS implementations that straight-up crash when this extension goes over 1024 bytes. π-ignore_unexpected_eofβ some TLS implementations just do NOT send the mandatoryclose_notifyalert on shutdown, smh. Normally if the app waits forclose_notifyand the peer bails without it, that's an error. Turn this on and the peer doesn't have to send it β a closed connection gets treated as ifclose_notifyshowed up anyway. More on shutting down a connection inSSL_shutdown(3).-servernameβ the servername for the HostName TLS extension.-servername_fatalβ on a servername mismatch, send a fatal alert (default is a warning alert, fyi).-id_prefix valβ generates SSL/TLS session IDs prefixed with val. Mostly useful when you're testing SSL/TLS code (proxies and such) that juggles multiple servers, where each one might be minting its own unique range of session IDs (say, with a certain prefix). π-keymatexportβ export keying material using label.-keymatexportlenβ export this many bytes of keying material; default is20.-no_cacheβ disable the session cache.-ext_cache.β disable the internal cache, then set up and use an external one.-verify_return_errorβ normally verification errors just print a message and let the connection keep going (it's a debugging thing). Use this and verification errors close the connection. No more second chances. π-verify_quietβ no verify output at all, except for verify errors.-ign_eofβ ignore input EOF (and yes, it's the default when-quietis on).-no_ign_eofβ do not ignore input EOF.-no_emsβ disable Extended master secret negotiation.-statusβ enables certificate status request support (aka OCSP stapling π): an OCSP response gets provided for the leaf (server) certificate if the client side asks for it.-status_allβ like the above, but for TLS v1.3 and beyond, status responses for all certs in the chain (except the trust anchor) are provided when the client asks.-status_verboseβ turns on certificate status request support (OCSP stapling again) AND gives you a verbose printout of the OCSP response. Use-cert_chainto specify the cert of the server's cert signer, which you need for certificate status requests.-status_timeout intβ sets the OCSP response timeout to int seconds.-proxy [http[s]://][userinfo@]host[:port][/path][?query][#fragment]β the HTTP(S) proxy to reach the OCSP server through, unless-no_proxyapplies (see below). If the host string is an IPv6 address it must be wrapped in"["and"]". Proxy port defaults to80, or443if the scheme is"https". Other than that, an optional"http://"or"https://"prefix is ignored, along with any userinfo, path, query, and fragment parts. Defaults to the env var"http_proxy"if it's set, else"HTTP_PROXY"when no TLS is used β otherwise"https_proxy"if set, else"HTTPS_PROXY".-no_proxy addressesβ a list of IPs and/or DNS names of servers that should not go through an HTTP(S) proxy, separated by commas and/or whitespace (and if you use whitespace, the whole argument has to be wrapped in"..."). Default comes from the env var"no_proxy"if set, else"NO_PROXY".-status_url valβ sets a fallback responder URL to use when the server certificate has no responder URL in it. Without this option you get an error if the server cert doesn't contain a responder address. The optional userinfo and fragment URL components get ignored, and any query component is treated as part of the path component.-status_file infileβ overrides any OCSP responder URLs from the cert and always provides the OCSP Response stored in the file. The file must be in DER format. You can use this option multiple times to specify OCSP responses for every cert in the server certificate chain. πΈ-ssl_config valβ configureSSL_CTXusing the given configuration value.-traceβ show verbose trace output of protocol messages.-briefβ give a brief summary of connection parameters instead of the usual verbose dump.-revβ a simple echo server that sends back received text reversed. Also sets-brief. Can't be used alongside-early_data. π-asyncβ switch on asynchronous mode, so cryptographic operations get performed asynchronously. Only actually does anything if an async-capable provider is also used via the-provideroption.-max_send_frag +intβ the maximum size of a data fragment to send. More inSSL_CTX_set_max_send_fragment(3).-split_send_frag +intβ this is for pipelines. There's currently no support for cipher pipelining in libssl. SeeSSL_CTX_set_max_send_fragment(3)for more.-max_pipelines +intβ also for pipelines. Again, no cipher pipelining support in libssl right now. CheckSSL_CTX_set_max_send_fragment(3).-naccept +intβ the server exits after it's received the specified number of connections; default is unlimited.-read_buf +intβ the default read buffer size for connections. Only does something if the buffer size is bigger than what would otherwise be used and pipelining is in use (seeSSL_CTX_set_default_read_buffer_len(3)for the full tea).-no_tx_cert_compβ disables support for sending TLSv1.3 compressed certificates.-no_rx_cert_compβ disables support for receiving TLSv1.3 compressed certificates.-no_compβ disable negotiation of TLS compression. Real talk: TLS compression is not recommended and has been off by default since OpenSSL 1.1.0. π-num_ticketsβ controls how many tickets get sent to the client after a full handshake in TLSv1.3. Default number of tickets is2. Doesn't affect the number of tickets sent after a resumption handshake.-dhparam infileβ the DH parameter file to use. The ephemeral DH cipher suites generate keys from a set of DH parameters. If you don't specify one, it tries to load them from the server certificate file. If that fails, a static hard-coded set of parameters baked into this command gets used. β¨-nbioβ turns on non-blocking I/O.-timeoutβ enable timeouts.-mtuβ set link-layer MTU.-psk_identity valβ expect the client to send PSK identity val when using a PSK cipher suite, and warn if they don't. By default the expected PSK identity is the string"Client_identity".-psk_hint valβ use the PSK identity hint val when using a PSK cipher suite.-psk valβ use the PSK key val when using a PSK cipher suite. The key is a hexadecimal number with no leading0x, e.g.-psk 1a2b3c4d. This one's mandatory if you wanna use a PSK cipher, no cap.-psk_session fileβ use the PEM-encodedSSL_SESSIONdata stored in file as the basis of a PSK. Heads up: this only works if TLSv1.3 is negotiated. π-srpvfileβ the verifier file for SRP. This option is deprecated. π¬-srpuserseedβ a seed string for a default user salt. Also deprecated.-listenβ only usable alongside one of the DTLS options above. With this on, the command listens on a UDP port for incoming connections. Any ClientHellos that show up get checked for a cookie β ones without get answered with aHelloVerifyRequest. Once a ClientHello with a cookie arrives, this command connects to that peer and completes the handshake. π¦-sctpβ use SCTP as the transport protocol instead of UDP when you're doing DTLS π. bestie, it MUST go with-dtls,-dtls1or-dtls1_2or it's literally not valid. and it's only available where OpenSSL has SCTP support compiled in, no cap.-sctp_label_bugβ this one makes OpenSSL use the incorrect behaviour that older OpenSSL versions had when computing endpoint-pair shared secrets for DTLS/SCTP. so like, it lets you talk to the old broken implementationsβ¦ but it also breaks interoperability with the implementations that do it correctly π. must be used together with-sctp. only available where OpenSSL has SCTP support enabled. > yes this is a pick-your-poison situation, choose wisely π-use_srtpβ offer SRTP key management, with a colon-separated profile list.-no_dheβ set this and no DH parameters get loaded, which effectively disables the ephemeral DH cipher suites. bye bye DHE β¨-alpn val,-nextprotoneg valβ these enable the Application-Layer Protocol Negotiation and the Next Protocol Negotiation (NPN) extensions, respectively. heads up bestie: ALPN is the IETF standard and it replaces NPN π. the val list is a comma-separated list of supported protocol names, and you should put the most desirable protocols first. protocol names are printable ASCII strings, like"http/1.1"or"spdy/3". important:-nextprotonegcannot be specified if-tls1_3is used.-ktlsβ enable Kernel TLS for sending and receiving π₯. this option was introduced in OpenSSL 3.2.0, and Kernel TLS is off by default as of OpenSSL 3.2.0.-sendfileβ if this is set and KTLS is enabled, thenSSL_sendfile()gets used instead ofBIO_write()to send the HTTP response the client asked for. this one is only valid when-ktlsis specified alongside-WWWor-HTTP. all three, bestie, no substitutions.-zerocopy_sendfileβ set this andSSL_sendfile()uses the zerocopy TX mode, which gives a performance boost when it's paired with KTLS hardware offload π¨. > β οΈ note that invalid TLS records might be transmitted if the file gets changed while it's being sent. this option depends on-sendfile; if you use it alone,-sendfileis implied and you'll get a warning. also note that KTLS sendfile on FreeBSD always runs in zerocopy mode. it's just built different π§-keylogfile outfileβ appends TLS secrets to the keylog file you name, so external programs (like Wireshark π) can decrypt the TLS connections. extremely useful, lowkey iconic.-max_early_data intβ changes the default maximum early data bytes specified for new sessions and for any incoming early data (when used together with the-early_dataflag). the default value is approximately 16k. the argument has to be an integer greater than or equal to 0.-recv_max_early_data intβ specify the hard limit on the maximum number of early data bytes that will be accepted. that's the ceiling, periodt.-early_dataβ accept early data where possible π±. cannot be used in conjunction with-www,-WWW,-HTTPor-rev.-statelessβ require TLSv1.3 cookies πͺ.-anti_replay,-no_anti_replayβ switcheroo: turns replay protection on or off, respectively. replay protection is on by default unless it's overridden by a configuration file. when it's on, OpenSSL will automatically detect if a session ticket has been used more than once, TLSv1.3 has been negotiated, and early data is enabled on the server. a full handshake is forced if a session ticket is used a second or subsequent time. any early data that was sent will be rejected.
also note that the server manages an internal cache of session tickets π. if a client closes the connection without sending the close_notify alert, the corresponding session ticket is removed and a full handshake is forced.
-tfoβ enable acceptance of TCP Fast Open (RFC7413) connections β‘.-cert_compβ pre-compresses certificates (RFC8879) that will be sent during the handshake. smol bytes, big wins.-nameopt optionβ specifies how the subject or issuer names get displayed π. seeopenssl-namedisplay-options(1)for the deets.-no_ssl3,-no_tls1,-no_tls1_1,-no_tls1_2,-no_tls1_3,-tls1,-tls1_1,-tls1_2,-tls1_3β see "TLS Version Options" inopenssl(1).-dtls,-dtls1,-dtls1_2β these specify the use of DTLS instead of TLS. see "TLS Version Options" inopenssl(1).-bugs,-comp,-no_comp,-no_ticket,-serverpref,-client_renegotiation,-legacy_renegotiation,-no_renegotiation,-no_resumption_on_reneg,-legacy_server_connect,-no_legacy_server_connect,-no_etm,-allow_no_dhe_kex,-prefer_no_dhe_kex,-prioritize_chacha,-strict,-sigalgs algs,-client_sigalgs algs,-groups groups,-curves curves,-named_curve curve,-cipher ciphers,-ciphersuites 1.3ciphers,-min_protocol minprot,-max_protocol maxprot,-record_padding padding,-debug_broken_protocol,-no_middleboxβ see "SUPPORTED COMMAND LINE COMMANDS" inSSL_CONF_cmd(3)for details π.-xkey infile,-xcert file,-xchain file,-xchain_build file,-xcertform DER|PEM,-xkeyform DER|PEMβ set extended certificate verification options. see "Extended Verification Options" inopenssl-verification-options(1)for details.-CAfile file,-no-CAfile,-CApath dir,-no-CApath,-CAstore uri,-no-CAstoreβ see "Trusted Certificate Options" inopenssl-verification-options(1)for details π.-rand files,-writerand fileβ see "Random State Options" inopenssl(1)for details π².-provider name-provider-path path-provparam [name:]key=value-propquery propqβ see "Provider Options" inopenssl(1),provider(7), andproperty(7).-allow_proxy_certs,-attime,-no_check_time,-check_ss_sig,-crl_check,-crl_check_all,-explicit_policy,-extended_crl,-ignore_critical,-inhibit_any,-inhibit_map,-no_alt_chains,-partial_chain,-policy,-policy_check,-policy_print,-purpose,-suiteB_128,-suiteB_128_only,-suiteB_192,-trusted_first,-use_deltas,-auth_level,-verify_depth,-verify_email,-verify_hostname,-verify_ip,-verify_name,-x509_strict,-issuer_checksβ these set various options of certificate chain verification, see "Verification Options" inopenssl-verification-options(1)for details.
and bestie, heads up: if the server requests a client certificate, then verification errors are displayed (for debugging) but the command will proceed anyway β unless you use the -verify_return_error option π«£.
-enable_server_rpkβ enable support for sending raw public keys (RFC7250) to the client β¨. a raw public key will be sent by the server, if it's solicited by the client, provided a suitable key and public certificate pair is configured. clients that don't support raw public keys, or that prefer X.509 certs, can still elect to receive X.509 certificates as usual β nobody's forced into anything π«Ά.
raw public keys are extracted from the configured certificate/private key.
-enable_client_rpkβ enable support for receiving raw public keys (RFC7250) from the client. use of X.509 certificates by the client becomes optional, and clients that support raw public keys may elect to use them. clients that don't support raw public keys or prefer X.509 certificates can still elect to send X.509 certificates as usual π.-expected-rpks fileβ this option implies the-enable_client_rpkoption and can be specified multiple times. each PEM file should contain one or more public keys, private keys or certificates. with a private key or certificate, an attempt is made to extract the associated public key. each resulting public key is added β via a call toSSL_add_expected_rpk(3)β as a valid raw public key that the client may present to be considered verified. if a client nevertheless presents an X.509 certificate, the enclosed public key is validated as though it were presented as a raw public key instead π.
verification success or failure is reported as a DANE verification success or failure, because verification of raw public keys is internally mapped to verification of DANE TLSA records derived from the specified keys π.
host:port-ech_key filenameβ load one Encrypted Client Hello (ECH) key pair π.-ech_dir dirnameβ attempt to load an ECH key pair from every file in the named directory. any keys that load successfully will be returned in'retry_configs'.-ech_noretry_dir dirnameβ attempt to load an ECH key pair from every file in the named directory. keys loaded this way will not be returned in'retry_configs'π.-ech_trialdecryptβ when an Encrypted Client Hello (ECH) extension is seen in a ClientHello, attempt to decrypt with all known ECH private keys if necessary. without this, the ECH"config_id"is used to match against the loaded ECH private keys, and decryption is only attempted when there's a match.-ech_greaseretriesβ if set, servers will add GREASEy ECHConfig values to those sent inretry_configsπ§.
πΈ CONNECTED COMMANDS πΈ
so this is the part where it gets interactive, bestie. if a connection request is established with an SSL client and neither the -www nor the -WWW option has been used, then normally any data received from the client is displayed, and any key presses get sent to the client β¨οΈ.
certain commands are also recognized, which perform special operations β¨. these commands are a letter that must appear at the start of a line. they're listed below:
qβ end the current SSL connection but still accept new connections.Qβ end the current SSL connection and exit π.rβ renegotiate the SSL session (TLSv1.2 and below only).Rβ renegotiate the SSL session and request a client certificate (TLSv1.2 and below only).Pβ send some plain text down the underlying TCP connection: this should cause the client to disconnect due to a protocol violation π.Sβ print out some session cache status information.kβ send a key update message to the client (TLSv1.3 only).Kβ send a key update message to the client and request one back (TLSv1.3 only).cβ send a certificate request to the client (TLSv1.3 only).
β¨ NOTES β¨
this command can be used to debug SSL clients π. to accept connections from a web browser, the command:
openssl s_server -accept 443 -www
can be used, for example.
even though specifying an empty list of CAs when requesting a client certificate is strictly speaking a protocol violation, some SSL clients interpret this to mean that any CA is acceptable π. this is useful for debugging purposes.
the session parameters can be printed out using the openssl-sess_id(1) command π.
π BUGS π
okay bestie, real talk, this one's a bit of a mess and we're just gonna say it out loud π
- So like... this program has a LOT of options, and also some of the techniques it uses are rather old, which means the C source for this command is rather hard to read and not a model of how things should be done. A typical SSL server program would be much simpler. Like, way simpler. Fr fr. π
- The output of
common ciphersis wrong: it just gives the list of ciphers that OpenSSL recognizes and the client supports. That's not it, bestie, that's not the vibe π - There should be a way for this command to print out details of any unknown cipher suites a client says it supports. There just... isn't. Not yet. We're manifesting it β¨π―οΈ
π SEE ALSO π
go read these next, they're all part of the same squad fr π«Ά
openssl(1)openssl-sess_id(1)openssl-s_client(1)openssl-ciphers(1)SSL_CONF_cmd(3)SSL_CTX_set_max_send_fragment(3)SSL_CTX_set_split_send_fragment(3)SSL_CTX_set_max_pipelines(3)ossl_store-file(7)
π HISTORY π
the lore drop π«Ά here's when everything showed up (or dipped):
- The
-no_alt_chainsoption was added in OpenSSL 1.1.0. - The
-allow-no-dhe-kexand-prioritize_chachaoptions were added in OpenSSL 1.1.1. - The
-srpvfileand-srpuserseedoption were deprecated in OpenSSL 3.0. - The
-enable_client_rpk,-enable_server_rpk,-no_rx_cert_comp,-no_tx_cert_comp, and-tfooptions were added in OpenSSL 3.2. - The
-status_alloption was added in OpenSSL 3.6. - The
echoptions were added in OpenSSL 4.0. - The
-engineoption was removed in OpenSSL 4.0. rest in peace king πποΈ - The
-expected-rpksoption was added in OpenSSL 4.0.
βοΈ COPYRIGHT βοΈ
Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.
that's the whole page bestie, you made it to the end πβ¨ this was OPENSSL-S_SERVER(1SSL), from the OpenSSL 4.0.3 source, dated 2026-09-29. go forth and serve some TLS, you absolute icon ππ
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms