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
For the C_GetAttributeValue function, the standard states the following:
Note that the error codes CKR_ATTRIBUTE_SENSITIVE, CKR_ATTRIBUTE_TYPE_INVALID, and CKR_BUFFER_TOO_SMALL do not denote true errors for C_GetAttributeValue. If a call to C_GetAttributeValue returns any of these three values, then the call MUST nonetheless have processed every attribute in the template supplied to C_GetAttributeValue. Each attribute in the template whose value can be returned by the call to C_GetAttributeValue will be returned by the call to C_GetAttributeValue.
But based on my reading of the implementation of the wrapper function in this package, regardless of the type of error that is thrown by the C function, if there is one thrown, then the first value returned by GetAttributeValue will be nil. Is my understanding here correct? If so, is that expected? If this package aims to be an implementation of the PKCS#11 API, I think it would be best if it stuck to the standard here.
The text was updated successfully, but these errors were encountered:
13ajay
changed the title
Returning attributes in GetAttributeValue in certain error scenarios
Returning attributes through GetAttributeValue in certain error scenarios
Nov 2, 2023
For the
C_GetAttributeValue
function, the standard states the following:But based on my reading of the implementation of the wrapper function in this package, regardless of the type of error that is thrown by the C function, if there is one thrown, then the first value returned by
GetAttributeValue
will benil
. Is my understanding here correct? If so, is that expected? If this package aims to be an implementation of the PKCS#11 API, I think it would be best if it stuck to the standard here.The text was updated successfully, but these errors were encountered: