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 1de9cde..ab7718d 100644 --- a/apps/s_client.c +++ b/apps/s_client.c
@@ -3602,7 +3602,7 @@ 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 @@ || 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 0b6988b..ea6993a 100644 --- a/apps/s_server.c +++ b/apps/s_server.c
@@ -1594,7 +1594,7 @@ && (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 @@ 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 @@ 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);