crypto: purge 'loaded' property that was not fully removed
The 'loaded' property on TLS creds and secret objects was marked as deprecated in 6.0.0. In 7.1.0 the deprecation info was moved into the 'removed-features.rst' file, but the property was not actually removed, just made read-only. This was a highly unusual practice, so finish the long overdue removal job. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
44a9394b1d
commit
62eb377e0a
@ -191,15 +191,6 @@ qcrypto_secret_complete(UserCreatable *uc, Error **errp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_secret_prop_get_loaded(Object *obj,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
QCryptoSecretCommon *secret = QCRYPTO_SECRET_COMMON(obj);
|
|
||||||
return secret->rawdata != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qcrypto_secret_prop_set_format(Object *obj,
|
qcrypto_secret_prop_set_format(Object *obj,
|
||||||
int value,
|
int value,
|
||||||
@ -278,9 +269,6 @@ qcrypto_secret_class_init(ObjectClass *oc, void *data)
|
|||||||
|
|
||||||
ucc->complete = qcrypto_secret_complete;
|
ucc->complete = qcrypto_secret_complete;
|
||||||
|
|
||||||
object_class_property_add_bool(oc, "loaded",
|
|
||||||
qcrypto_secret_prop_get_loaded,
|
|
||||||
NULL);
|
|
||||||
object_class_property_add_enum(oc, "format",
|
object_class_property_add_enum(oc, "format",
|
||||||
"QCryptoSecretFormat",
|
"QCryptoSecretFormat",
|
||||||
&QCryptoSecretFormat_lookup,
|
&QCryptoSecretFormat_lookup,
|
||||||
|
@ -127,37 +127,6 @@ qcrypto_tls_creds_anon_complete(UserCreatable *uc, Error **errp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_GNUTLS
|
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_tls_creds_anon_prop_get_loaded(Object *obj,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
QCryptoTLSCredsAnon *creds = QCRYPTO_TLS_CREDS_ANON(obj);
|
|
||||||
|
|
||||||
if (creds->parent_obj.endpoint == QCRYPTO_TLS_CREDS_ENDPOINT_SERVER) {
|
|
||||||
return creds->data.server != NULL;
|
|
||||||
} else {
|
|
||||||
return creds->data.client != NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else /* ! CONFIG_GNUTLS */
|
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_tls_creds_anon_prop_get_loaded(Object *obj G_GNUC_UNUSED,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* ! CONFIG_GNUTLS */
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qcrypto_tls_creds_anon_finalize(Object *obj)
|
qcrypto_tls_creds_anon_finalize(Object *obj)
|
||||||
{
|
{
|
||||||
@ -173,10 +142,6 @@ qcrypto_tls_creds_anon_class_init(ObjectClass *oc, void *data)
|
|||||||
UserCreatableClass *ucc = USER_CREATABLE_CLASS(oc);
|
UserCreatableClass *ucc = USER_CREATABLE_CLASS(oc);
|
||||||
|
|
||||||
ucc->complete = qcrypto_tls_creds_anon_complete;
|
ucc->complete = qcrypto_tls_creds_anon_complete;
|
||||||
|
|
||||||
object_class_property_add_bool(oc, "loaded",
|
|
||||||
qcrypto_tls_creds_anon_prop_get_loaded,
|
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,37 +206,6 @@ qcrypto_tls_creds_psk_complete(UserCreatable *uc, Error **errp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_GNUTLS
|
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_tls_creds_psk_prop_get_loaded(Object *obj,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
QCryptoTLSCredsPSK *creds = QCRYPTO_TLS_CREDS_PSK(obj);
|
|
||||||
|
|
||||||
if (creds->parent_obj.endpoint == QCRYPTO_TLS_CREDS_ENDPOINT_SERVER) {
|
|
||||||
return creds->data.server != NULL;
|
|
||||||
} else {
|
|
||||||
return creds->data.client != NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else /* ! CONFIG_GNUTLS */
|
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_tls_creds_psk_prop_get_loaded(Object *obj G_GNUC_UNUSED,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* ! CONFIG_GNUTLS */
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qcrypto_tls_creds_psk_finalize(Object *obj)
|
qcrypto_tls_creds_psk_finalize(Object *obj)
|
||||||
{
|
{
|
||||||
@ -273,9 +242,6 @@ qcrypto_tls_creds_psk_class_init(ObjectClass *oc, void *data)
|
|||||||
|
|
||||||
ucc->complete = qcrypto_tls_creds_psk_complete;
|
ucc->complete = qcrypto_tls_creds_psk_complete;
|
||||||
|
|
||||||
object_class_property_add_bool(oc, "loaded",
|
|
||||||
qcrypto_tls_creds_psk_prop_get_loaded,
|
|
||||||
NULL);
|
|
||||||
object_class_property_add_str(oc, "username",
|
object_class_property_add_str(oc, "username",
|
||||||
qcrypto_tls_creds_psk_prop_get_username,
|
qcrypto_tls_creds_psk_prop_get_username,
|
||||||
qcrypto_tls_creds_psk_prop_set_username);
|
qcrypto_tls_creds_psk_prop_set_username);
|
||||||
|
@ -695,33 +695,6 @@ qcrypto_tls_creds_x509_complete(UserCreatable *uc, Error **errp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_GNUTLS
|
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_tls_creds_x509_prop_get_loaded(Object *obj,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
QCryptoTLSCredsX509 *creds = QCRYPTO_TLS_CREDS_X509(obj);
|
|
||||||
|
|
||||||
return creds->data != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else /* ! CONFIG_GNUTLS */
|
|
||||||
|
|
||||||
|
|
||||||
static bool
|
|
||||||
qcrypto_tls_creds_x509_prop_get_loaded(Object *obj G_GNUC_UNUSED,
|
|
||||||
Error **errp G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* ! CONFIG_GNUTLS */
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qcrypto_tls_creds_x509_prop_set_sanity(Object *obj,
|
qcrypto_tls_creds_x509_prop_set_sanity(Object *obj,
|
||||||
bool value,
|
bool value,
|
||||||
@ -838,9 +811,6 @@ qcrypto_tls_creds_x509_class_init(ObjectClass *oc, void *data)
|
|||||||
|
|
||||||
ucc->complete = qcrypto_tls_creds_x509_complete;
|
ucc->complete = qcrypto_tls_creds_x509_complete;
|
||||||
|
|
||||||
object_class_property_add_bool(oc, "loaded",
|
|
||||||
qcrypto_tls_creds_x509_prop_get_loaded,
|
|
||||||
NULL);
|
|
||||||
object_class_property_add_bool(oc, "sanity-check",
|
object_class_property_add_bool(oc, "sanity-check",
|
||||||
qcrypto_tls_creds_x509_prop_get_sanity,
|
qcrypto_tls_creds_x509_prop_get_sanity,
|
||||||
qcrypto_tls_creds_x509_prop_set_sanity);
|
qcrypto_tls_creds_x509_prop_set_sanity);
|
||||||
|
@ -355,13 +355,13 @@ The ``-writeconfig`` option was not able to serialize the entire contents
|
|||||||
of the QEMU command line. It is thus considered a failed experiment
|
of the QEMU command line. It is thus considered a failed experiment
|
||||||
and removed without a replacement.
|
and removed without a replacement.
|
||||||
|
|
||||||
``loaded`` property of ``secret`` and ``secret_keyring`` objects (removed in 7.1)
|
``loaded`` property of secret and TLS credential objects (removed in 9.2)
|
||||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
The ``loaded=on`` option in the command line or QMP ``object-add`` either had
|
The ``loaded=on`` option in the command line or QMP ``object-add`` either had
|
||||||
no effect (if ``loaded`` was the last option) or caused options to be
|
no effect (if ``loaded`` was the last option) or caused options to be
|
||||||
effectively ignored as if they were not given. The property is therefore
|
effectively ignored as if they were not given. The property is therefore
|
||||||
useless and should simply be removed.
|
useless and has been removed.
|
||||||
|
|
||||||
``opened`` property of ``rng-*`` objects (removed in 7.1)
|
``opened`` property of ``rng-*`` objects (removed in 7.1)
|
||||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||||
|
@ -419,11 +419,6 @@
|
|||||||
#
|
#
|
||||||
# Properties for objects of classes derived from secret-common.
|
# Properties for objects of classes derived from secret-common.
|
||||||
#
|
#
|
||||||
# @loaded: if true, the secret is loaded immediately when applying
|
|
||||||
# this option and will probably fail when processing the next
|
|
||||||
# option. Don't use; only provided for compatibility.
|
|
||||||
# (default: false)
|
|
||||||
#
|
|
||||||
# @format: the data format that the secret is provided in
|
# @format: the data format that the secret is provided in
|
||||||
# (default: raw)
|
# (default: raw)
|
||||||
#
|
#
|
||||||
@ -436,16 +431,10 @@
|
|||||||
# 16-byte IV. Mandatory if @keyid is given. Ignored if @keyid is
|
# 16-byte IV. Mandatory if @keyid is given. Ignored if @keyid is
|
||||||
# absent.
|
# absent.
|
||||||
#
|
#
|
||||||
# Features:
|
|
||||||
#
|
|
||||||
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
||||||
# make sense, and false is already the default.
|
|
||||||
#
|
|
||||||
# Since: 2.6
|
# Since: 2.6
|
||||||
##
|
##
|
||||||
{ 'struct': 'SecretCommonProperties',
|
{ 'struct': 'SecretCommonProperties',
|
||||||
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
|
'data': { '*format': 'QCryptoSecretFormat',
|
||||||
'*format': 'QCryptoSecretFormat',
|
|
||||||
'*keyid': 'str',
|
'*keyid': 'str',
|
||||||
'*iv': 'str' } }
|
'*iv': 'str' } }
|
||||||
|
|
||||||
@ -512,58 +501,32 @@
|
|||||||
#
|
#
|
||||||
# Properties for tls-creds-anon objects.
|
# Properties for tls-creds-anon objects.
|
||||||
#
|
#
|
||||||
# @loaded: if true, the credentials are loaded immediately when
|
|
||||||
# applying this option and will ignore options that are processed
|
|
||||||
# later. Don't use; only provided for compatibility.
|
|
||||||
# (default: false)
|
|
||||||
#
|
|
||||||
# Features:
|
|
||||||
#
|
|
||||||
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
||||||
# make sense, and false is already the default.
|
|
||||||
#
|
|
||||||
# Since: 2.5
|
# Since: 2.5
|
||||||
##
|
##
|
||||||
{ 'struct': 'TlsCredsAnonProperties',
|
{ 'struct': 'TlsCredsAnonProperties',
|
||||||
'base': 'TlsCredsProperties',
|
'base': 'TlsCredsProperties',
|
||||||
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] } } }
|
'data': { } }
|
||||||
|
|
||||||
##
|
##
|
||||||
# @TlsCredsPskProperties:
|
# @TlsCredsPskProperties:
|
||||||
#
|
#
|
||||||
# Properties for tls-creds-psk objects.
|
# Properties for tls-creds-psk objects.
|
||||||
#
|
#
|
||||||
# @loaded: if true, the credentials are loaded immediately when
|
|
||||||
# applying this option and will ignore options that are processed
|
|
||||||
# later. Don't use; only provided for compatibility.
|
|
||||||
# (default: false)
|
|
||||||
#
|
|
||||||
# @username: the username which will be sent to the server. For
|
# @username: the username which will be sent to the server. For
|
||||||
# clients only. If absent, "qemu" is sent and the property will
|
# clients only. If absent, "qemu" is sent and the property will
|
||||||
# read back as an empty string.
|
# read back as an empty string.
|
||||||
#
|
#
|
||||||
# Features:
|
|
||||||
#
|
|
||||||
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
||||||
# make sense, and false is already the default.
|
|
||||||
#
|
|
||||||
# Since: 3.0
|
# Since: 3.0
|
||||||
##
|
##
|
||||||
{ 'struct': 'TlsCredsPskProperties',
|
{ 'struct': 'TlsCredsPskProperties',
|
||||||
'base': 'TlsCredsProperties',
|
'base': 'TlsCredsProperties',
|
||||||
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
|
'data': { '*username': 'str' } }
|
||||||
'*username': 'str' } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @TlsCredsX509Properties:
|
# @TlsCredsX509Properties:
|
||||||
#
|
#
|
||||||
# Properties for tls-creds-x509 objects.
|
# Properties for tls-creds-x509 objects.
|
||||||
#
|
#
|
||||||
# @loaded: if true, the credentials are loaded immediately when
|
|
||||||
# applying this option and will ignore options that are processed
|
|
||||||
# later. Don't use; only provided for compatibility.
|
|
||||||
# (default: false)
|
|
||||||
#
|
|
||||||
# @sanity-check: if true, perform some sanity checks before using the
|
# @sanity-check: if true, perform some sanity checks before using the
|
||||||
# credentials (default: true)
|
# credentials (default: true)
|
||||||
#
|
#
|
||||||
@ -573,17 +536,11 @@
|
|||||||
# provides the ID of a previously created secret object containing
|
# provides the ID of a previously created secret object containing
|
||||||
# the password for decryption.
|
# the password for decryption.
|
||||||
#
|
#
|
||||||
# Features:
|
|
||||||
#
|
|
||||||
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
||||||
# make sense, and false is already the default.
|
|
||||||
#
|
|
||||||
# Since: 2.5
|
# Since: 2.5
|
||||||
##
|
##
|
||||||
{ 'struct': 'TlsCredsX509Properties',
|
{ 'struct': 'TlsCredsX509Properties',
|
||||||
'base': 'TlsCredsProperties',
|
'base': 'TlsCredsProperties',
|
||||||
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
|
'data': { '*sanity-check': 'bool',
|
||||||
'*sanity-check': 'bool',
|
|
||||||
'*passwordid': 'str' } }
|
'*passwordid': 'str' } }
|
||||||
##
|
##
|
||||||
# @QCryptoAkCipherAlgo:
|
# @QCryptoAkCipherAlgo:
|
||||||
|
Loading…
Reference in New Issue
Block a user