Commit 4e78dbf925 for openssl.org
commit 4e78dbf925d5b37b1b8affecbce8c521db8dc6af
Author: Tomas Mraz <tomas@openssl.foundation>
Date: Mon Sep 7 16:34:18 2026 +0200
statem_clnt_construct_test.c: Use snprintf() instead of BIO_snprintf()
Fixes bfa50e13f85
Reviewed-by: Daniel Kubec <kubec@openssl.foundation>
Reviewed-by: Milan Broz <mbroz@openssl.org>
Merge-date: Mon Sep 7 14:48:56 2026
Merged-from: https://github.com/openssl/openssl/pull/32723
diff --git a/test/statem_clnt_construct_test.c b/test/statem_clnt_construct_test.c
index 449605ef78..da2fd39f88 100644
--- a/test/statem_clnt_construct_test.c
+++ b/test/statem_clnt_construct_test.c
@@ -15,6 +15,7 @@
* are covered with mfail tests.
*/
+#include <stdio.h>
#include <openssl/ssl.h>
#include <openssl/ec.h>
#ifndef OPENSSL_NO_ECH
@@ -1411,7 +1412,7 @@ static unsigned int psk_client_cb(SSL *ssl, const char *hint, char *identity,
unsigned int max_identity_len, unsigned char *psk,
unsigned int max_psk_len)
{
- if (BIO_snprintf(identity, max_identity_len, "%s", CKE_PSK_IDENTITY) <= 0
+ if (snprintf(identity, max_identity_len, "%s", CKE_PSK_IDENTITY) <= 0
|| max_psk_len < sizeof(cke_psk))
return 0;
memcpy(psk, cke_psk, sizeof(cke_psk));