crypto: omap-aes-gcm - fix failure with assocdata only
If we only have assocdata with an omap-aes-gcm, it currently just completes it directly without passing it over to the crypto HW. This produces wrong results. Fix by passing the request down to the crypto HW, and fix the DMA support code to accept a case where we don't expect any output data. In the case where only assocdata is provided, it just passes through the accelerator and provides authentication results, without any encrypted/decrypted buffer via DMA. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -244,7 +244,7 @@ static int omap_aes_gcm_handle_queue(struct omap_aes_dev *dd,
|
||||
|
||||
err = omap_aes_write_ctrl(dd);
|
||||
if (!err) {
|
||||
if (dd->in_sg_len && dd->out_sg_len)
|
||||
if (dd->in_sg_len)
|
||||
err = omap_aes_crypt_dma_start(dd);
|
||||
else
|
||||
omap_aes_gcm_dma_out_callback(dd);
|
||||
|
Reference in New Issue
Block a user