Exemplo n.º 1
0
int p11_get_session(unsigned int h, P11_SESSION **ppSession)
{
int ret = 0;

if ( (h == 0) || (h > nSessions) )
   return (CKR_SESSION_HANDLE_INVALID); //invalid handle

*ppSession = &gpSessions[h-1];

ret = cal_validate_session(*ppSession);

return (ret);
}
Exemplo n.º 2
0
int p11_get_session(unsigned int h, P11_SESSION **ppSession)
{
    int ret = 0;

    if ( (h == 0) || (h > nSessions) ) {
        //printf("Invalid?\n");
        return (CKR_SESSION_HANDLE_INVALID); //invalid handle
    }

    *ppSession = &gpSessions[h-1];
//printf("----- Try to validate...\n");
    ret = cal_validate_session(*ppSession);
//printf("----- Try to validate done... %d\n",ret);

    return (ret);
}