mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoAkCipherAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_AKCIPHER_ALG. We could simply drop 'prefix', but then the prefix becomes QCRYPTO_AK_CIPHER_ALGORITHM, which is rather long. We could additionally rename the type to QCryptoAkCipherAlg, but I think the abbreviation "alg" is less than clear. Rename the type to QCryptoAkCipherAlgo instead. The prefix becomes QCRYPTO_AK_CIPHER_ALGO. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240904111836.3273842-15-armbru@redhat.com>
This commit is contained in:
parent
5e0e510246
commit
cd48d82a50
9 changed files with 19 additions and 20 deletions
|
@ -64,7 +64,7 @@ static void cryptodev_builtin_init_akcipher(CryptoDevBackend *backend)
|
|||
{
|
||||
QCryptoAkCipherOptions opts;
|
||||
|
||||
opts.alg = QCRYPTO_AKCIPHER_ALG_RSA;
|
||||
opts.alg = QCRYPTO_AK_CIPHER_ALGO_RSA;
|
||||
opts.u.rsa.padding_alg = QCRYPTO_RSA_PADDING_ALG_RAW;
|
||||
if (qcrypto_akcipher_supports(&opts)) {
|
||||
backend->conf.crypto_services |=
|
||||
|
@ -318,7 +318,7 @@ static int cryptodev_builtin_create_akcipher_session(
|
|||
|
||||
switch (sess_info->algo) {
|
||||
case VIRTIO_CRYPTO_AKCIPHER_RSA:
|
||||
opts.alg = QCRYPTO_AKCIPHER_ALG_RSA;
|
||||
opts.alg = QCRYPTO_AK_CIPHER_ALGO_RSA;
|
||||
if (cryptodev_builtin_set_rsa_options(sess_info->u.rsa.padding_algo,
|
||||
sess_info->u.rsa.hash_algo, &opts.u.rsa, errp) != 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue