]> git.ipfire.org Git - thirdparty/openssl.git/commit
s_client -proxy / -starttls shouldn't be mutually exclusive
authorVita Batrla <vitezslav.batrla@oracle.com>
Fri, 18 Mar 2022 21:02:50 +0000 (22:02 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 5 May 2022 11:36:23 +0000 (13:36 +0200)
commit802cacf34f2db9111becb4f0d3aa00460df13a19
tree6043bc8fa7e3dc272efeae8d8594076ee5f30d25
parentde56f726e163e99128ff93a04d74a8461f5a724b
s_client -proxy / -starttls shouldn't be mutually exclusive

The option -proxy of openssl s_client works fine. The option
-starttls also works fine. However, try putting both of them
on command line. It breaks, these options don't work together.

The problem is that -proxy option is implemented using starttls_proto
(the option parsing code sets it to PROTO_CONNECT) and -starttls option
overwrites the same variable again based on argument value.

The suggested fix is to independently handle -proxy option before
-starttls so the s_client can connect through HTTP proxy server and
then use STARTTLS command.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17925)
apps/s_client.c