From b0da24bd2dc64e3a01df24e01aba37fe4c269230 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 7 Sep 2023 05:57:36 +0200 Subject: [PATCH] BIO_set_accept_name(): To accept from any interface, use * Using "*:{port}" is preferred to "[::]:{port}", because it won't break on IPv4-only machines. This fixes test failures in 79-test_http.t and 80-test_ssl_new.t on machines without IPv6. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21989) --- apps/lib/http_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c index f406bb06287..bca2e7110d4 100644 --- a/apps/lib/http_server.c +++ b/apps/lib/http_server.c @@ -200,7 +200,7 @@ BIO *http_server_init(const char *prog, const char *port, int verb) int port_num; char name[40]; - snprintf(name, sizeof(name), "[::]:%s", port); /* port may be "0" */ + snprintf(name, sizeof(name), "*:%s", port); /* port may be "0" */ if (verb >= 0 && !log_set_verbosity(prog, verb)) return NULL; bufbio = BIO_new(BIO_f_buffer()); -- 2.47.2