Commit 99e44fd567 for openssl.org
commit 99e44fd5676c8363325373f2811bbdd9364aacef
Author: Norbert Pocs <norbertp@openssl.org>
Date: Thu Aug 27 16:17:32 2026 +0200
Don't use BIO_snprintf as it is deprecated
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Milan Broz <mbroz@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Thu Aug 27 14:35:30 2026
Merged-from: https://github.com/openssl/openssl/pull/32547
diff --git a/apps/ca.c b/apps/ca.c
index 4fb4fe3d74..15a8c6c354 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -2428,7 +2428,7 @@ static char *make_revocation_str(REVINFO_TYPE rev_type, const char *rev_arg)
i += strlen(other) + 1;
str = app_malloc(i, "revocation reason");
- BIO_snprintf(str, i, "%.*s", (int)ASN1_STRING_get_length(revtm),
+ snprintf(str, i, "%.*s", (int)ASN1_STRING_get_length(revtm),
(const char *)ASN1_STRING_get0_data(revtm));
if (reason) {
OPENSSL_strlcat(str, ",", i);
diff --git a/test/endecode_api_test.c b/test/endecode_api_test.c
index 44d45fa19d..0ed9c32c66 100644
--- a/test/endecode_api_test.c
+++ b/test/endecode_api_test.c
@@ -522,7 +522,7 @@ end:
static int make_expected(const struct test_key_st *key, char *buf,
size_t bufsz, size_t *len)
{
- int n = BIO_snprintf(buf, bufsz,
+ int n = snprintf(buf, bufsz,
PEM_HEADER INTER_PREFIX "%u:%s" PEM_FOOTER, key->seed, key->label);
if (n <= 0)