From: Thomas Egerer Date: Mon, 12 Oct 2020 16:41:53 +0000 (+0000) Subject: drbg: Add missing format specifiers to debug output X-Git-Tag: 5.9.1rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e635d3dcbd7a2b6923d880be2e2a6cc2bf27abb4;p=thirdparty%2Fstrongswan.git drbg: Add missing format specifiers to debug output Fixes: 737375a2d27e ("drbg: Implemented NIST SP-800-90A DRBG") Signed-off-by: Thomas Egerer --- diff --git a/src/libstrongswan/plugins/drbg/drbg_ctr.c b/src/libstrongswan/plugins/drbg/drbg_ctr.c index a40cf4405e..22aa6f1302 100644 --- a/src/libstrongswan/plugins/drbg/drbg_ctr.c +++ b/src/libstrongswan/plugins/drbg/drbg_ctr.c @@ -283,7 +283,7 @@ drbg_ctr_t *drbg_ctr_create(drbg_type_t type, uint32_t strength, if (strength > key_len * BITS_PER_BYTE) { DBG1(DBG_LIB, "%d bit block encryption key not sufficient for security " - "strength of % bits", key_len * BITS_PER_BYTE, strength); + "strength of %u bits", key_len * BITS_PER_BYTE, strength); return NULL; } @@ -300,7 +300,7 @@ drbg_ctr_t *drbg_ctr_create(drbg_type_t type, uint32_t strength, if (personalization_str.len > seed_len) { DBG1(DBG_LIB, "personalization string length of %d bytes is larger " - "than seed length of % bytes", personalization_str.len, seed_len); + "than seed length of %u bytes", personalization_str.len, seed_len); crypter->destroy(crypter); return NULL; } diff --git a/src/libstrongswan/plugins/drbg/drbg_hmac.c b/src/libstrongswan/plugins/drbg/drbg_hmac.c index 577044dd65..a7acd3352a 100644 --- a/src/libstrongswan/plugins/drbg/drbg_hmac.c +++ b/src/libstrongswan/plugins/drbg/drbg_hmac.c @@ -266,7 +266,7 @@ drbg_hmac_t *drbg_hmac_create(drbg_type_t type, uint32_t strength, if (strength > out_len * BITS_PER_BYTE) { - DBG1(DBG_LIB, "%N not sufficient for security strength of % bits", + DBG1(DBG_LIB, "%N not sufficient for security strength of %u bits", pseudo_random_function_names, prf_type, strength); prf->destroy(prf); return NULL;