drbg: Add missing format specifiers to debug output

Fixes: 737375a2d2 ("drbg: Implemented NIST SP-800-90A DRBG")

Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
Thomas Egerer
2020-10-13 10:05:43 +02:00
committed by Tobias Brunner
parent c810912d2f
commit e635d3dcbd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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;