Skip to content

Commit

Permalink
show 'sign' usage for secret keys
Browse files Browse the repository at this point in the history
Secret keys can be used for signing in algorithms like HMAC and
CMAC so they should display their CKA_SIGN attribute value
when listing object attributes

Fixes #2851
  • Loading branch information
dlegaultbbry authored and Jakuje committed Sep 22, 2023
1 parent f7dc164 commit 05c7bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/pkcs11-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5199,7 +5199,7 @@ show_key(CK_SESSION_HANDLE sess, CK_OBJECT_HANDLE obj)
printf("%sdecrypt", sepa);
sepa = ", ";
}
if (!pub && getSIGN(sess, obj)) {
if ((!pub || sec) && getSIGN(sess, obj)) {
printf("%ssign", sepa);
sepa = ", ";
}
Expand Down

0 comments on commit 05c7bff

Please sign in to comment.