Lines Matching refs:p11_module
84 static CK_FUNCTION_LIST_PTR p11_module; variable
158 heim_base_once_f(&once, &p11_module, p11_module_load_once); in p11_module_init()
160 if (p11_module == NULL) in p11_module_init()
170 rv = p11_module->C_Initialize(NULL); in p11_module_init()
196 assert(p11_module != NULL); in p11_session_init()
198 rv = p11_module->C_GetSlotList(CK_FALSE, NULL, &ulSlotCount); in p11_session_init()
208 rv = p11_module->C_GetSlotList(CK_FALSE, pSlotList, &ulSlotCount); in p11_session_init()
221 rv = p11_module->C_GetMechanismInfo(pSlotList[i], mechanismType, &info); in p11_session_init()
234 rv = p11_module->C_OpenSession(pSlotList[i], CKF_SERIAL_SESSION, NULL, NULL, phSession); in p11_session_init()
339 assert(p11_module != NULL); in p11_key_init()
342 rv = p11_module->C_CreateObject(p11ctx->hSession, attributes, in p11_key_init()
351 rv = p11_module->C_EncryptInit(p11ctx->hSession, &mechanism, p11ctx->hSecret); in p11_key_init()
353 rv = p11_module->C_DecryptInit(p11ctx->hSession, &mechanism, p11ctx->hSecret); in p11_key_init()
375 assert(p11_module != NULL); in p11_do_cipher()
380 …rv = p11_module->C_EncryptUpdate(p11ctx->hSession, (unsigned char *)in, size, out, &ulCipherTextLe… in p11_do_cipher()
382 …rv = p11_module->C_DecryptUpdate(p11ctx->hSession, (unsigned char *)in, size, out, &ulCipherTextLe… in p11_do_cipher()
393 p11_module->C_DestroyObject(p11ctx->hSession, p11ctx->hSecret); in p11_cleanup()
397 p11_module->C_CloseSession(p11ctx->hSession); in p11_cleanup()
427 assert(p11_module != NULL); in p11_md_hash_init()
429 rv = p11_module->C_DigestInit(p11ctx->hSession, &mechanism); in p11_md_hash_init()
441 assert(p11_module != NULL); in p11_md_update()
444 rv = p11_module->C_DigestUpdate(p11ctx->hSession, in p11_md_update()
458 assert(p11_module != NULL); in p11_md_final()
460 rv = p11_module->C_DigestFinal(p11ctx->hSession, NULL, &digestLen); in p11_md_final()
462 rv = p11_module->C_DigestFinal(p11ctx->hSession, digest, &digestLen); in p11_md_final()
473 assert(p11_module != NULL); in p11_md_cleanup()
475 rv = p11_module->C_CloseSession(p11ctx->hSession); in p11_md_cleanup()