You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attribute length is only set when the pointer is NULL. It should also be set in cases where the buffer is too large or too small.
From PKCS11-base-v2.40:
For each (type, pValue, ulValueLen) triple in the template, C_GetAttributeValue performs the following algorithm:
If the specified attribute (i.e., the attribute specified by the type field) for the object cannot be revealed because the object is sensitive or unextractable, then the ulValueLen field in that triple is modified to hold the value CK_UNAVAILABLE_INFORMATION.
Otherwise, if the specified value for the object is invalid (the object does not possess such an attribute), then the ulValueLen field in that triple is modified to hold the value CK_UNAVAILABLE_INFORMATION.
Otherwise, if the pValue field has the value NULL_PTR, then the ulValueLen field is modified to hold the exact length of the specified attribute for the object.
Otherwise, if the length specified in ulValueLen is large enough to hold the value of the specified attribute for the object, then that attribute is copied into the buffer located at pValue, and the ulValueLen field is modified to hold the exact length of the attribute.
Otherwise, the ulValueLen field is modified to hold the value CK_UNAVAILABLE_INFORMATION.
The text was updated successfully, but these errors were encountered:
@sbertin-telular
I have created a pull request #193 to address this issue, and I would like to invite you to review the proposed changes to see if they adequately resolve the issue.
The attribute length is only set when the pointer is NULL. It should also be set in cases where the buffer is too large or too small.
From PKCS11-base-v2.40:
For each (type, pValue, ulValueLen) triple in the template, C_GetAttributeValue performs the following algorithm:
The text was updated successfully, but these errors were encountered: