g_autofree uint8_t *ciphertext = NULL;
size_t ciphertextlen = 0;
- if (!qemuDomainSupportsEncryptedSecret(priv)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("encrypted secrets are not supported"));
- return NULL;
- }
-
secinfo = g_new0(qemuDomainSecretInfo, 1);
secinfo->type = VIR_DOMAIN_SECRET_INFO_TYPE_AES;
}
-/**
- * qemuDomainSupportsEncryptedSecret:
- * @priv: qemu domain private data
- *
- * Returns true if libvirt can use encrypted 'secret' objects with VM which
- * @priv belongs to.
- */
-bool
-qemuDomainSupportsEncryptedSecret(qemuDomainObjPrivate *priv)
-{
- return !!priv->masterKey;
-}
-
-
/* qemuDomainSecretInfoNewPlain:
* @usageType: Secret usage type
* @username: username
if (src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD)
usageType = VIR_SECRET_USAGE_TYPE_CEPH;
- if (!qemuDomainSupportsEncryptedSecret(priv) ||
- (src->protocol == VIR_STORAGE_NET_PROTOCOL_ISCSI && !iscsiHasPS)) {
+ if (src->protocol == VIR_STORAGE_NET_PROTOCOL_ISCSI && !iscsiHasPS) {
srcPriv->secinfo = qemuDomainSecretInfoNewPlain(usageType,
src->auth->username,
&src->auth->seclookupdef);
virSecretUsageType usageType = VIR_SECRET_USAGE_TYPE_ISCSI;
qemuDomainStorageSourcePrivate *srcPriv = qemuDomainStorageSourcePrivateFetch(src);
- if (!qemuDomainSupportsEncryptedSecret(priv) || !iscsiHasPS) {
+ if (!iscsiHasPS) {
srcPriv->secinfo = qemuDomainSecretInfoNewPlain(usageType,
src->auth->username,
&src->auth->seclookupdef);