]> git.ipfire.org Git - thirdparty/qemu.git/commit
crypto/hash-afalg: Implement new hash API
authorAlejandro Zeise <alejandro.zeise@seagate.com>
Tue, 8 Oct 2024 07:57:14 +0000 (09:57 +0200)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 10 Oct 2024 11:33:35 +0000 (12:33 +0100)
commit90c3dc60735a3ccd6a3d4235470bdb71b6d7eb32
tree9fbdbf47c14913c4b690e263aea4c9f1f1042bd1
parent78a5822820f9356bcd3bd8824186dd953c33028b
crypto/hash-afalg: Implement new hash API

Updates the afalg hash driver to support the new accumulative
hashing changes as part of the patch series.

Implements opening/closing of contexts, updating hash data
and finalizing the hash digest.

In order to support the update function, a flag needs to be passed
to the kernel via the socket send call (MSG_MORE) to notify it that more
data is to be expected to calculate the hash correctly.
As a result, a new function was added to the iov helper utils to allow
passing a flag to the socket send call.

Signed-off-by: Alejandro Zeise <alejandro.zeise@seagate.com>
[ clg: - Handled qcrypto_afalg_hash_ctx_new() errors in
         qcrypto_afalg_hash_new()
       - Freed alg_name in qcrypto_afalg_hash_new()
       - Reworked qcrypto_afalg_recv_from_kernel()
       - Split iov changes from original patch ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/hash-afalg.c