QEMU main repository: Please see https://www.qemu.org/docs/master/devel/submitting-a-patch.html for how to submit changes to QEMU. Pull Requests are ignored. Please only use release tarballs from the QEMU website. http://www.qemu.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
847 B
30 lines
847 B
/*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*
|
|
* QEMU Crypto cipher impl stub
|
|
*
|
|
* Copyright (c) 2025 Red Hat, Inc.
|
|
*
|
|
*/
|
|
|
|
bool qcrypto_cipher_supports(QCryptoCipherAlgo alg,
|
|
QCryptoCipherMode mode)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
static QCryptoCipher *qcrypto_cipher_ctx_new(QCryptoCipherAlgo alg,
|
|
QCryptoCipherMode mode,
|
|
const uint8_t *key,
|
|
size_t nkey,
|
|
Error **errp)
|
|
{
|
|
if (!qcrypto_cipher_validate_key_length(alg, mode, nkey, errp)) {
|
|
return NULL;
|
|
}
|
|
|
|
error_setg(errp,
|
|
"Unsupported cipher algorithm %s, no crypto library enabled in build",
|
|
QCryptoCipherAlgo_str(alg));
|
|
return NULL;
|
|
}
|
|
|