]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add a new advanced command mode to s_client
authorMatt Caswell <matt@openssl.org>
Thu, 16 Mar 2023 15:08:04 +0000 (15:08 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 30 Mar 2023 07:53:39 +0000 (08:53 +0100)
commitd07b763bb9073945ba5e9912e56bc51fe18bdcb5
tree3ff7f6661b86c5c192d585829ed0da6e8540dabd
parent7c966ab6b332d3666870856edb122d67cb09ead5
Add a new advanced command mode to s_client

The s_client command mode just looks at the first letter on a line
and if it is one that maps to a "command" then that command is executed
and everything else on the line is ignored.

This means it is impossible to send anything over s_client that starts with
one of the "magic" letters unless you switch off command processing
entirely.

With the forthcoming quic support that will be added to s_client we expect
a significant new number of commands being added (for example to send fin
on a stream, or to list or swap between different streams, etc). This will
use up more "letters" and reduces the usability of s_client.

This PR adds a new "advanced" command processing mode. Commands are enclosed
in braces {}, and can appear anywhere in the text typed into s_client. A
brace can be escaped by sending a double {{. This gives much more
flexibility without reducing the usability of s_client. Commands can also
have "arguments" which also extends the scope of what they can be used for.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20566)
apps/s_client.c