mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
crypto: support multiple threads accessing one QCryptoBlock
The two thing that should be handled are cipher and ivgen. For ivgen the solution is just mutex, as iv calculations should not be long in comparison with encryption/decryption. And for cipher let's just keep per-thread ciphers. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
0f0d596cb1
commit
c972fa123c
9 changed files with 172 additions and 44 deletions
|
@ -305,6 +305,7 @@ static void test_block(gconstpointer opaque)
|
|||
test_block_read_func,
|
||||
&header,
|
||||
0,
|
||||
1,
|
||||
NULL);
|
||||
g_assert(blk == NULL);
|
||||
|
||||
|
@ -313,6 +314,7 @@ static void test_block(gconstpointer opaque)
|
|||
test_block_read_func,
|
||||
&header,
|
||||
QCRYPTO_BLOCK_OPEN_NO_IO,
|
||||
1,
|
||||
&error_abort);
|
||||
|
||||
g_assert(qcrypto_block_get_cipher(blk) == NULL);
|
||||
|
@ -327,6 +329,7 @@ static void test_block(gconstpointer opaque)
|
|||
test_block_read_func,
|
||||
&header,
|
||||
0,
|
||||
1,
|
||||
&error_abort);
|
||||
g_assert(blk);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue