aboutsummaryrefslogtreecommitdiff
path: root/backends/cryptodev-vhost-user.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2018-03-01 21:46:31 +0800
committerMichael S. Tsirkin <mst@redhat.com>2018-03-01 18:26:17 +0200
commit0a9b9be9eb40055d2d1bb5b8fc4d4faefecb22c3 (patch)
tree3bc51611c611fe4b2077648e0b4942e5536f820a /backends/cryptodev-vhost-user.c
parentefbfeb81802cf9723a4663fadd674bf452a07e11 (diff)
cryptodev-vhost-user: set the key length
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'backends/cryptodev-vhost-user.c')
-rw-r--r--backends/cryptodev-vhost-user.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c
index 9cd06c4b9e..862d4f2580 100644
--- a/backends/cryptodev-vhost-user.c
+++ b/backends/cryptodev-vhost-user.c
@@ -224,6 +224,10 @@ static void cryptodev_vhost_user_init(
1u << VIRTIO_CRYPTO_SERVICE_MAC;
backend->conf.cipher_algo_l = 1u << VIRTIO_CRYPTO_CIPHER_AES_CBC;
backend->conf.hash_algo = 1u << VIRTIO_CRYPTO_HASH_SHA1;
+
+ backend->conf.max_size = UINT64_MAX;
+ backend->conf.max_cipher_key_len = VHOST_USER_MAX_CIPHER_KEY_LEN;
+ backend->conf.max_auth_key_len = VHOST_USER_MAX_AUTH_KEY_LEN;
}
static int64_t cryptodev_vhost_user_sym_create_session(