Skip to content
Snippets Groups Projects
Commit 0a9b9be9 authored by Gonglei (Arei)'s avatar Gonglei (Arei) Committed by Michael S. Tsirkin
Browse files

cryptodev-vhost-user: set the key length


Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent efbfeb81
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
......@@ -23,6 +23,9 @@
#ifndef CRYPTODEV_VHOST_USER_H
#define CRYPTODEV_VHOST_USER_H
#define VHOST_USER_MAX_AUTH_KEY_LEN 512
#define VHOST_USER_MAX_CIPHER_KEY_LEN 64
/**
* cryptodev_vhost_user_get_vhost:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment