#60: pkcs11-tool: print key sizes from CK_MECHANISM_INFO
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4513 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
b78d7630e7
commit
1090d19d30
|
@ -799,6 +799,15 @@ static void list_mechs(CK_SLOT_ID slot)
|
|||
printf(" %s", p11_mechanism_to_name(mechs[n]));
|
||||
rv = p11->C_GetMechanismInfo(slot, mechs[n], &info);
|
||||
if (rv == CKR_OK) {
|
||||
if (info.ulMinKeySize || info.ulMaxKeySize) {
|
||||
printf(", keySize={");
|
||||
if (info.ulMinKeySize)
|
||||
printf("%li", info.ulMinKeySize);
|
||||
printf(",");
|
||||
if (info.ulMaxKeySize)
|
||||
printf("%li", info.ulMaxKeySize);
|
||||
printf("}");
|
||||
}
|
||||
if (info.flags & CKF_DIGEST)
|
||||
printf(", digest");
|
||||
if (info.flags & CKF_SIGN)
|
||||
|
|
Loading…
Reference in New Issue