Commit dba0ecd3bf for openssl.org

commit dba0ecd3bf1348bb875637fe9a97144b89fcda2c
Author: Tomas Mraz <tomas@openssl.org>
Date:   Wed Feb 18 15:09:11 2026 +0100

    ECH: Use BIO_puts when appropriate

    And also a few additional code cleanups.

    Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
    Reviewed-by: Paul Dale <paul.dale@oracle.com>
    Reviewed-by: Matt Caswell <matt@openssl.org>
    MergeDate: Fri Feb 20 10:11:20 2026
    (Merged from https://github.com/openssl/openssl/pull/30066)

diff --git a/apps/s_client.c b/apps/s_client.c
index 1de9cde34d..ab7718df70 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -3602,7 +3602,7 @@ static void print_ech_retry_configs(BIO *bio, SSL *s)
     BIO *biom = NULL;

     if (SSL_ech_get1_retry_config(s, &rtval, &rtlen) != 1) {
-        BIO_printf(bio, "ECH: Error getting retry-configs\n");
+        BIO_puts(bio, "ECH: Error getting retry-configs\n");
         return;
     }
     /*
@@ -3614,7 +3614,7 @@ static void print_ech_retry_configs(BIO *bio, SSL *s)
         || BIO_write(biom, rtval, (int)rtlen) <= 0
         || (es = OSSL_ECHSTORE_new(NULL, NULL)) == NULL
         || OSSL_ECHSTORE_read_echconfiglist(es, biom) != 1) {
-        BIO_printf(bio, "ECH: Error loading retry-configs\n");
+        BIO_puts(bio, "ECH: Error loading retry-configs\n");
         goto end;
     }
     if (OSSL_ECHSTORE_num_entries(es, &cnt) != 1)
diff --git a/apps/s_server.c b/apps/s_server.c
index 0b6988b873..ea6993a32b 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1594,7 +1594,7 @@ static int ech_load_dir(SSL_CTX *lctx, const char *thedir,
         && (es = OSSL_ECHSTORE_new(app_get0_libctx(),
                 app_get0_propq()))
             == NULL) {
-        BIO_printf(bio_err, "internal error\n");
+        BIO_puts(bio_err, "ECH: Internal error\n");
         return 0;
     }
     while ((thisfile = OPENSSL_DIR_read(&d, thedir))) {
@@ -1623,7 +1623,7 @@ static int ech_load_dir(SSL_CTX *lctx, const char *thedir,
         loaded++;
     }
     if (SSL_CTX_set1_echstore(lctx, es) != 1) {
-        BIO_printf(bio_err, "internal error\n");
+        BIO_puts(bio_err, "ECH: Internal error\n");
         return 0;
     }
     if (bio_s_out != NULL)
@@ -2722,7 +2722,7 @@ int s_server_main(int argc, char *argv[])
         if ((in = BIO_new_file(echkeyfile, "r")) == NULL
             || (es = OSSL_ECHSTORE_new(app_get0_libctx(),
                     app_get0_propq()))
-                == 0
+                == NULL
             || OSSL_ECHSTORE_read_pem(es, in, OSSL_ECH_FOR_RETRY) != 1
             || SSL_CTX_set1_echstore(ctx, es) != 1) {
             BIO_printf(bio_err, "Failed reading: %s\n", echkeyfile);