vnet_crypto_op_id_t id = ad->op_by_type[i];
if (id == 0)
continue;
- od = vec_elt_at_index (cm->opt_data, id);
+ od = cm->opt_data + id;
if (ce->ops_handlers[id])
{
od->active_engine_index = p[0];
{
vnet_crypto_main_t *cm = &crypto_main;
- return (NULL != cm->ops_handlers[alg]);
+ return (alg < vec_len (cm->ops_handlers) && NULL != cm->ops_handlers[alg]);
}
void