diff options
| author | Gonglei | 2016-09-26 11:23:21 +0200 |
|---|---|---|
| committer | Daniel P. Berrange | 2016-10-19 11:09:24 +0200 |
| commit | f844836ddccf3dbcba142128da5dd8ee618f3e91 (patch) | |
| tree | 91556d3ea8b8236cf10d16681dacf2d95dfb4232 /include/crypto | |
| parent | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into st... (diff) | |
| download | qemu-f844836ddccf3dbcba142128da5dd8ee618f3e91.tar.gz qemu-f844836ddccf3dbcba142128da5dd8ee618f3e91.tar.xz qemu-f844836ddccf3dbcba142128da5dd8ee618f3e91.zip | |
crypto: extend mode as a parameter in qcrypto_cipher_supports()
It can't guarantee all cipher modes are supported
if one cipher algorithm is supported by a backend.
Let's extend qcrypto_cipher_supports() to take both
the algorithm and mode as parameters.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include/crypto')
| -rw-r--r-- | include/crypto/cipher.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/crypto/cipher.h b/include/crypto/cipher.h index 376654dcdd..97638e7bbf 100644 --- a/include/crypto/cipher.h +++ b/include/crypto/cipher.h @@ -85,13 +85,15 @@ struct QCryptoCipher { /** * qcrypto_cipher_supports: * @alg: the cipher algorithm + * @mode: the cipher mode * - * Determine if @alg cipher algorithm is supported by the + * Determine if @alg cipher algorithm in @mode is supported by the * current configured build * * Returns: true if the algorithm is supported, false otherwise */ -bool qcrypto_cipher_supports(QCryptoCipherAlgorithm alg); +bool qcrypto_cipher_supports(QCryptoCipherAlgorithm alg, + QCryptoCipherMode mode); /** * qcrypto_cipher_get_block_len: |
