summaryrefslogtreecommitdiffstats
path: root/apps/s_client.c
diff options
context:
space:
mode:
authorVladimĂ­r Kotal <vladimir.kotal@oracle.com>2023-06-01 19:55:54 +0200
committerPauli <pauli@openssl.org>2023-06-06 11:05:02 +1000
commit3ca28c9e81fae36b0b44dc39beecd2b5a7561975 (patch)
tree4d1028ff958edec00915ef4b962c31c1c232ca9a /apps/s_client.c
parentc69756e7a0133b67df50525e89206c9cc4a7d2b8 (diff)
allow to disable http
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21108)
Diffstat (limited to 'apps/s_client.c')
-rw-r--r--apps/s_client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index fa45197070..56497a9f2b 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -1654,6 +1654,7 @@ int s_client_main(int argc, char **argv)
}
if (proxystr != NULL) {
+#ifndef OPENSSL_NO_HTTP
int res;
char *tmp_host = host, *tmp_port = port;
@@ -1688,8 +1689,14 @@ int s_client_main(int argc, char **argv)
"%s: -proxy argument malformed or ambiguous\n", prog);
goto end;
}
+#else
+ BIO_printf(bio_err,
+ "%s: -proxy not supported in no-http build\n", prog);
+ goto end;
+#endif
}
+
if (bindstr != NULL) {
int res;
res = BIO_parse_hostserv(bindstr, &bindhost, &bindport,
@@ -2341,12 +2348,14 @@ int s_client_main(int argc, char **argv)
sbuf_len = 0;
sbuf_off = 0;
+#ifndef OPENSSL_NO_HTTP
if (proxystr != NULL) {
/* Here we must use the connect string target host & port */
if (!OSSL_HTTP_proxy_connect(sbio, thost, tport, proxyuser, proxypass,
0 /* no timeout */, bio_err, prog))
goto shut;
}
+#endif
switch ((PROTOCOL_CHOICE) starttls_proto) {
case PROTO_OFF: