GetObjAttrInfo

Get the list of attributes (type and size) of the specified object.

This function relies on the SafeNet extension CKA_ENUM_ATTRIBUTES to retrieve the list of attributes. Only the attribute type and size are returned. Attribute values must be retrieved by the caller as required.

Synopsis

CK_RV GetObjAttrInfo(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObj,
CK_ATTRIBUTE_PTR* ppAttributes,
CK_ULONG_PTR pAttrCount);
Parameter Description
hSession Handle to a valid session
hObj Handle to the object to operate on
ppAttributes Location to receive the attribute array (on return, *ppAttributes references an array of CK_ATTRIBUTE - the caller must free the memory allocated at *ppAttributes).
pAttrCount Location to hold the number of CK_ATTRIBUTE entries (on return, *pAttrCount is the number of CK_ATTRIBUTE entries referenced by *ppAttributes).

On Successful Return

*ppAttributes — handle that points to the returned attributes

pAttrCount — number of returned attributes