Closed Hlipa closed 1 year ago
All vendor defined values like CKM_VENDOR_DEFINED are minimal not exact value. Standard says:
[Mechanism types CKM_VENDOR_DEFINED and above are permanently reserved for token vendors.]
but in mechanism_type_name() we can see:
mechanism_type_name()
case CKR_VENDOR_DEFINED: return "CKR_VENDOR_DEFINED";
instead of:
if (val >= CKM_VENDOR_DEFINED) return "CKM_VENDOR_DEFINED";
It finally leads to situation when function returns "UNKNOWN" instead of "CKM_VENDOR_DEFINED" string.
Well spotted – could you send a PR?
yes, will do.
Hi, if it is still open. can I work on this as my first contribution to open source?
Sure, sounds good to me – thanks.
Fixed by #71
All vendor defined values like CKM_VENDOR_DEFINED are minimal not exact value. Standard says:
but in
mechanism_type_name()
we can see:case CKR_VENDOR_DEFINED: return "CKR_VENDOR_DEFINED";
instead of:
if (val >= CKM_VENDOR_DEFINED) return "CKM_VENDOR_DEFINED";
It finally leads to situation when function returns "UNKNOWN" instead of "CKM_VENDOR_DEFINED" string.