Skip to content

Commit 5b9b5e4

Browse files
olszomalmtrojnar
authored andcommitted
Fix format specifier for CK_KEY_TYPE and CK_CERTIFICATE_TYPE logging, CID 456747, 456748
1 parent fae0231 commit 5b9b5e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/p11_key.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ PKCS11_OBJECT_private *pkcs11_object_from_handle(PKCS11_SLOT_private *slot,
100100
default:
101101
/* Ignore any keys we don't understand */
102102
pkcs11_log(ctx, LOG_DEBUG,
103-
"Unsupported CKA_KEY_TYPE attribute value: %d\n",
104-
key_type);
103+
"Unsupported CKA_KEY_TYPE attribute value: %lu\n",
104+
(unsigned long)key_type);
105105
return NULL;
106106
}
107107
break;
@@ -114,8 +114,8 @@ PKCS11_OBJECT_private *pkcs11_object_from_handle(PKCS11_SLOT_private *slot,
114114
/* Ignore unknown certificate types */
115115
if (cert_type != CKC_X_509) {
116116
pkcs11_log(ctx, LOG_DEBUG,
117-
"Unsupported CKA_CERTIFICATE_TYPE attribute value: %d\n",
118-
cert_type);
117+
"Unsupported CKA_CERTIFICATE_TYPE attribute value: %lu\n",
118+
(unsigned long)cert_type);
119119
return NULL;
120120
}
121121
break;

0 commit comments

Comments
 (0)