| 137 | }; |
| 138 | |
| 139 | static enum ccp_cmd_order |
| 140 | ccp_get_cmd_id(const struct rte_crypto_sym_xform *xform) |
| 141 | { |
| 142 | enum ccp_cmd_order res = CCP_CMD_NOT_SUPPORTED; |
| 143 | |
| 144 | if (xform == NULL) |
| 145 | return res; |
| 146 | if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) { |
| 147 | if (xform->next == NULL) |
| 148 | return CCP_CMD_AUTH; |
| 149 | else if (xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER) |
| 150 | return CCP_CMD_HASH_CIPHER; |
| 151 | } |
| 152 | if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { |
| 153 | if (xform->next == NULL) |
| 154 | return CCP_CMD_CIPHER; |
| 155 | else if (xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH) |
| 156 | return CCP_CMD_CIPHER_HASH; |
| 157 | } |
| 158 | if (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD) |
| 159 | return CCP_CMD_COMBINED; |
| 160 | return res; |
| 161 | } |
| 162 | |
| 163 | /* partial hash using openssl */ |
| 164 | static int partial_hash_sha1(uint8_t *data_in, uint8_t *data_out) |
no outgoing calls
no test coverage detected