| 1694 | } |
| 1695 | |
| 1696 | int __must_check |
| 1697 | ccp_authenc(struct ccp_queue *qp, struct ccp_session *s, struct cryptop *crp) |
| 1698 | { |
| 1699 | struct ccp_completion_ctx ctx; |
| 1700 | int error; |
| 1701 | |
| 1702 | ctx.callback_fn = ccp_authenc_done; |
| 1703 | ctx.session = s; |
| 1704 | ctx.callback_arg = crp; |
| 1705 | |
| 1706 | /* Perform first operation */ |
| 1707 | if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) |
| 1708 | error = ccp_do_blkcipher(qp, s, crp, NULL); |
| 1709 | else |
| 1710 | error = ccp_do_hmac(qp, s, crp, NULL); |
| 1711 | if (error != 0) |
| 1712 | return (error); |
| 1713 | |
| 1714 | /* Perform second operation */ |
| 1715 | if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) |
| 1716 | error = ccp_do_hmac(qp, s, crp, &ctx); |
| 1717 | else |
| 1718 | error = ccp_do_blkcipher(qp, s, crp, &ctx); |
| 1719 | return (error); |
| 1720 | } |
| 1721 | |
| 1722 | static int __must_check |
| 1723 | ccp_do_ghash_aad(struct ccp_queue *qp, struct ccp_session *s) |
no test coverage detected