Lines Matching defs:decrypt
67 session_p->decrypt.flags = CRYPTO_OPERATION_ACTIVE;
99 session_p->decrypt.mech = *pMechanism;
102 if (INPLACE_MECHANISM(session_p->decrypt.mech.mechanism)) {
103 session_p->decrypt.flags |= CRYPTO_OPERATION_INPLACE_OK;
139 session_p->decrypt.flags &= ~CRYPTO_OPERATION_ACTIVE;
185 * Real decrypt work. The caller doesn't hold the session lock.
191 crypto_decrypt_t decrypt;
201 if (!(session_p->decrypt.flags & CRYPTO_OPERATION_ACTIVE)) {
210 if (session_p->decrypt.flags & CRYPTO_OPERATION_UPDATE) {
213 * operation, so we'll leave the active decrypt operation
215 * decrypt update operation.
221 decrypt.cd_session = session_p->k_session;
230 inplace = (session_p->decrypt.flags & CRYPTO_OPERATION_INPLACE_OK) != 0;
233 decrypt.cd_datalen = ulEncryptedData;
235 decrypt.cd_datalen = *pulDataLen;
240 decrypt.cd_databuf = (char *)pData;
241 decrypt.cd_encrlen = ulEncryptedData;
242 decrypt.cd_encrbuf = (char *)pEncryptedData;
243 decrypt.cd_flags =
245 (decrypt.cd_datalen == decrypt.cd_encrlen) ?
248 while ((r = ioctl(kernel_fd, CRYPTO_DECRYPT, &decrypt)) < 0) {
255 rv = crypto2pkcs11_error_number(decrypt.cd_return_value);
259 *pulDataLen = decrypt.cd_datalen;
300 * We will not terminate the active decrypt operation flag,
311 * Terminates the active decrypt operation.
313 * decrypt operation.
316 session_p->decrypt.flags = 0;
368 if (!(session_p->decrypt.flags & CRYPTO_OPERATION_ACTIVE)) {
373 session_p->decrypt.flags |= CRYPTO_OPERATION_UPDATE;
384 inplace = (session_p->decrypt.flags & CRYPTO_OPERATION_INPLACE_OK) != 0;
414 * After an error occurred, terminate the current decrypt
418 session_p->decrypt.flags = 0;
457 if (!(session_p->decrypt.flags & CRYPTO_OPERATION_ACTIVE)) {
486 * We will not terminate the active decrypt operation flag,
496 /* Terminates the active decrypt operation */
498 session_p->decrypt.flags = 0;