As the comment in b_print.c says; "As snprintf is not available everywhere, we provide our own implementation...."
So we should use BIO_snprintf() in apps/s_client.c and ssl/ssltest.c. The other patch to ssltest.c fixes the missing newline problem under DOS and Windows. Patch attached. --gv
--- orig/apps/s_client.c 2006-03-11 14:00:12 +0100 +++ apps/s_client.c 2006-03-12 16:25:04 +0100 @@ -223,7 +223,7 @@ BIO_printf(bio_c_out, "Received PSK identity hint '%s'\n", hint); /* lookup PSK identity and PSK key based on the given identity hint here */ - ret = snprintf(identity, max_identity_len, psk_identity); + ret = BIO_snprintf(identity, max_identity_len, psk_identity); if (ret < 0 || (unsigned int)ret > max_identity_len) goto out_err; if (c_debug) --- orig/ssl/ssltest.c 2006-03-11 01:00:50 +0100 +++ ssl/ssltest.c 2006-03-11 16:48:56 +0100 @@ -470,7 +470,7 @@ debug = 0; cipher = 0; - bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); + bio_err=BIO_new_fp(stderr,BIO_NOCLOSE|BIO_FP_TEXT); CRYPTO_set_locking_callback(lock_dbg_cb); @@ -489,7 +489,7 @@ RAND_seed(rnd_seed, sizeof rnd_seed); - bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE); + bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE|BIO_FP_TEXT); argc--; argv++; @@ -2350,7 +2350,7 @@ int ret; unsigned int psk_len = 0; - ret = snprintf(identity, max_identity_len, "Client_identity"); + ret = BIO_snprintf(identity, max_identity_len, "Client_identity"); if (ret < 0) goto out_err; if (debug)