CT_ReadObject
Get the value of an object.
Synopsis
CK_RV CT_ReadObject(
CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObj,
unsigned char * buf,
unsigned int len,
unsigned int * pbr); Parameters
Parameter | Description |
---|---|
hSession | open session on the slot containing the object |
hObj | object whose value is to be returned |
buf | buffer to hold the object value |
len | total number of bytes referenced by buf |
pbr | reference to int to hold number of bytes copied into buf |
On successful return
buf — contains the object value
*pbr — number of bytes copied into buf
If buf is too small to hold the attribute value (that is, len is < attribute value length), then CKR_ATTRIBUTE_TYPE_INVALID is returned.
To determine the attribute value length, pass in 0 for len, and check the resulting value of *pbr.