diff options
| author | Markus Armbruster <armbru@redhat.com> | 2024-09-04 13:18:32 +0200 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2024-09-10 14:03:30 +0200 |
| commit | c96050f43e35012331abfb5aa347fa6543826d0e (patch) | |
| tree | 2523b143e088259ebf343052a9a792ee7b8adf71 /tests/unit/test-crypto-akcipher.c | |
| parent | cd48d82a5068fe038719eeff8d3eab555e1f3bbb (diff) | |
| download | focaccia-qemu-c96050f43e35012331abfb5aa347fa6543826d0e.tar.gz focaccia-qemu-c96050f43e35012331abfb5aa347fa6543826d0e.zip | |
qapi/crypto: Rename QCryptoRSAPaddingAlgorithm 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. QCryptoRSAPaddingAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_RSA_PADDING_ALG. We could simply drop 'prefix', but then the prefix becomes QCRYPTO_RSA_PADDING_ALGORITHM, which is rather long. We could additionally rename the type to QCryptoRSAPaddingAlg, but I think the abbreviation "alg" is less than clear. Rename the type to QCryptoRSAPaddingAlgo instead. The prefix becomes QCRYPTO_RSA_PADDING_ALGO. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240904111836.3273842-16-armbru@redhat.com>
Diffstat (limited to 'tests/unit/test-crypto-akcipher.c')
| -rw-r--r-- | tests/unit/test-crypto-akcipher.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/test-crypto-akcipher.c b/tests/unit/test-crypto-akcipher.c index 7dd86125c2..53c2211ba8 100644 --- a/tests/unit/test-crypto-akcipher.c +++ b/tests/unit/test-crypto-akcipher.c @@ -787,7 +787,7 @@ static QCryptoAkCipherTestData akcipher_test_data[] = { .opt = { .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, .u.rsa = { - .padding_alg = QCRYPTO_RSA_PADDING_ALG_RAW, + .padding_alg = QCRYPTO_RSA_PADDING_ALGO_RAW, }, }, .pub_key = rsa1024_public_key, @@ -807,7 +807,7 @@ static QCryptoAkCipherTestData akcipher_test_data[] = { .opt = { .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, .u.rsa = { - .padding_alg = QCRYPTO_RSA_PADDING_ALG_PKCS1, + .padding_alg = QCRYPTO_RSA_PADDING_ALGO_PKCS1, .hash_alg = QCRYPTO_HASH_ALGO_SHA1, }, }, @@ -832,7 +832,7 @@ static QCryptoAkCipherTestData akcipher_test_data[] = { .opt = { .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, .u.rsa = { - .padding_alg = QCRYPTO_RSA_PADDING_ALG_RAW, + .padding_alg = QCRYPTO_RSA_PADDING_ALGO_RAW, }, }, .pub_key = rsa2048_public_key, @@ -852,7 +852,7 @@ static QCryptoAkCipherTestData akcipher_test_data[] = { .opt = { .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, .u.rsa = { - .padding_alg = QCRYPTO_RSA_PADDING_ALG_PKCS1, + .padding_alg = QCRYPTO_RSA_PADDING_ALGO_PKCS1, .hash_alg = QCRYPTO_HASH_ALGO_SHA1, }, }, @@ -946,7 +946,7 @@ static void test_rsakey(const void *opaque) QCryptoAkCipherOptions opt = { .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, .u.rsa = { - .padding_alg = QCRYPTO_RSA_PADDING_ALG_PKCS1, + .padding_alg = QCRYPTO_RSA_PADDING_ALGO_PKCS1, .hash_alg = QCRYPTO_HASH_ALGO_SHA1, } }; |