Skip to content

Commit

Permalink
pkcs11-tool: Fix format string
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Jelen <[email protected]>
  • Loading branch information
Jakuje committed Jan 7, 2025
1 parent 9cb58e6 commit d253d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/pkcs11-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,7 @@ static void sign_data(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
util_fatal("Cannot read from %s: %m", opt_input);

if (opt_mechanism == CKM_RSA_PKCS_PSS && (size_t)sz != hashlen) {
util_fatal("For %s mechanism, message size (got %z bytes) "
util_fatal("For %s mechanism, message size (got %zd bytes) "
"must be equal to specified digest length (%lu)\n",
p11_mechanism_to_name(opt_mechanism), sz, hashlen);
} else if (opt_mechanism == CKM_AES_CMAC_GENERAL) {
Expand Down Expand Up @@ -2653,7 +2653,7 @@ static void verify_signature(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
util_fatal("Cannot read from %s: %m", opt_input);

if (opt_mechanism == CKM_RSA_PKCS_PSS && (size_t)sz != hashlen) {
util_fatal("For %s mechanism, message size (got %z bytes)"
util_fatal("For %s mechanism, message size (got %zd bytes)"
" must be equal to specified digest length (%lu)\n",
p11_mechanism_to_name(opt_mechanism), sz, hashlen);
} else if (opt_mechanism == CKM_AES_CMAC_GENERAL) {
Expand Down

0 comments on commit d253d47

Please sign in to comment.