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>
This commit is contained in:
1 parent
e8ddc2eae5
commit
f844836ddc
8 files changed
+47
-9
No files matched your search
@@ -3606,7 +3606,7 @@ void vnc_display_open(const char *id, Error **errp)
|
||||
goto fail;
|
||||
}
|
||||
if (!qcrypto_cipher_supports(
|
||||
QCRYPTO_CIPHER_ALG_DES_RFB)) {
|
||||
QCRYPTO_CIPHER_ALG_DES_RFB, QCRYPTO_CIPHER_MODE_ECB)) {
|
||||
error_setg(errp,
|
||||
"Cipher backend does not support DES RFB algorithm");
|
||||
goto fail;
|
||||
|
||||
Reference in new issue
Block a user