Commit bf1f522f34 for openssl.org
commit bf1f522f34ed253a6139ed197f50043217fca62a
Author: Eugene Syromiatnikov <esyr@openssl.org>
Date: Sat Jun 27 12:40:59 2026 +0200
demos/sslecho/echecho.c: declare locally used functions as static
Otherwise it triggers -Werror=missing-prototypes when built
with --strict-warnings.
Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs."
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
MergeDate: Mon Jul 20 11:18:59 2026
(Merged from https://github.com/openssl/openssl/pull/31751)
diff --git a/demos/sslecho/echecho.c b/demos/sslecho/echecho.c
index 3977f6756e..2e300b95a1 100644
--- a/demos/sslecho/echecho.c
+++ b/demos/sslecho/echecho.c
@@ -36,7 +36,7 @@ static const char echprivbuf[]
*/
static volatile bool server_running = true;
-int create_socket(bool isServer)
+static int create_socket(bool isServer)
{
int s;
int optval = 1;
@@ -74,7 +74,7 @@ int create_socket(bool isServer)
return s;
}
-SSL_CTX *create_context(bool isServer)
+static SSL_CTX *create_context(bool isServer)
{
const SSL_METHOD *method;
SSL_CTX *ctx;
@@ -116,7 +116,7 @@ err:
return 0;
}
-void configure_server_context(SSL_CTX *ctx)
+static void configure_server_context(SSL_CTX *ctx)
{
/* Set the key and cert */
if (SSL_CTX_use_certificate_chain_file(ctx, "cert.pem") <= 0) {
@@ -137,7 +137,7 @@ void configure_server_context(SSL_CTX *ctx)
}
}
-void configure_client_context(SSL_CTX *ctx)
+static void configure_client_context(SSL_CTX *ctx)
{
/*
* Configure the client to abort the handshake if certificate verification
@@ -163,7 +163,7 @@ void configure_client_context(SSL_CTX *ctx)
}
}
-void usage()
+static void usage(void)
{
printf("Usage: echecho s\n");
printf(" --or--\n");