length of the buffer would also terminate the active operation if the
buffer length is 0. PKCS#11 says it doesn't, so we need to make the
additional C_XxxFinal call even if the buffer length is 0. Allocate a
buffer from the heap if the stack buffer is too small and free the
heap-allocated buffer before we return from pk11_Finalize. We can use the
stack buffer if count is equal to its size.
git-svn-id: svn://10.0.0.236/trunk@136742 18797224-902f-48f8-a5cc-f745e15eee43