next up previous contents
Next: Templates Up: PKCS #11 Previous: PKCS #11   Contents

Function definitions

A typical function definition in the specification looks like this:

CK_DEFINE_FUNCTION(CK_RV, C_GetObjectSize)(
   CK_SESSION_HANDLE hSession,
   CK_OBJECT_HANDLE hObject,
   CK_ULONG_PTR pulSize
);

This defines a function named 'C_GetObjectSize', the return value of which is of type 'CK_RV'.

It takes three arguments:

  1. a CK_SESSION_HANDLE, which refers to a session
  2. a CK_OBJECT_HANDLE, which refers to an object (for instance a key)
  3. a CK_ULONG_PTR, which is a pointer to a CK_ULONG type.

An overview of all functions is presented in chapter 11 of the specification.

What functions, mechanisms and operations depends on the module that is used, and what state it is in. Refer to the documentation of your specific module for more information about this.



Written by Jelte Jansen
© NLnet Labs, May 13, 2008
jelte@nlnetlabs.nl