mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
fixup! lib/repo: Add ostree_repo_remote_get_gpg_keys()
This commit is contained in:
parent
90a3bda1f8
commit
30c054b521
@ -2413,9 +2413,9 @@ ostree_repo_remote_get_gpg_keys (OstreeRepo *self,
|
||||
gpgme_key_t key = gpg_keys->pdata[i];
|
||||
|
||||
g_auto(GVariantBuilder) subkeys_builder = OT_VARIANT_BUILDER_INITIALIZER;
|
||||
g_variant_builder_init (&subkeys_builder, G_VARIANT_TYPE ("a(a{sv})"));
|
||||
g_variant_builder_init (&subkeys_builder, G_VARIANT_TYPE ("aa{sv}"));
|
||||
g_auto(GVariantBuilder) uids_builder = OT_VARIANT_BUILDER_INITIALIZER;
|
||||
g_variant_builder_init (&uids_builder, G_VARIANT_TYPE ("a(a{sv})"));
|
||||
g_variant_builder_init (&uids_builder, G_VARIANT_TYPE ("aa{sv}"));
|
||||
for (gpgme_subkey_t subkey = key->subkeys; subkey != NULL;
|
||||
subkey = subkey->next)
|
||||
{
|
||||
@ -2433,7 +2433,7 @@ ostree_repo_remote_get_gpg_keys (OstreeRepo *self,
|
||||
g_variant_new_boolean (subkey->expired));
|
||||
g_variant_dict_insert_value (&subkey_dict, "invalid",
|
||||
g_variant_new_boolean (subkey->invalid));
|
||||
g_variant_builder_add (&subkeys_builder, "(@a{sv})",
|
||||
g_variant_builder_add (&subkeys_builder, "@a{sv}",
|
||||
g_variant_dict_end (&subkey_dict));
|
||||
}
|
||||
|
||||
@ -2467,7 +2467,7 @@ ostree_repo_remote_get_gpg_keys (OstreeRepo *self,
|
||||
g_variant_new ("ms", advanced_url));
|
||||
g_variant_dict_insert_value (&uid_dict, "direct_url",
|
||||
g_variant_new ("ms", direct_url));
|
||||
g_variant_builder_add (&uids_builder, "(@a{sv})",
|
||||
g_variant_builder_add (&uids_builder, "@a{sv}",
|
||||
g_variant_dict_end (&uid_dict));
|
||||
}
|
||||
|
||||
@ -2475,7 +2475,7 @@ ostree_repo_remote_get_gpg_keys (OstreeRepo *self,
|
||||
g_auto(GVariantDict) metadata_dict = OT_VARIANT_BUILDER_INITIALIZER;
|
||||
g_variant_dict_init (&metadata_dict, NULL);
|
||||
|
||||
GVariant *key_variant = g_variant_new ("(@a(a{sv})@a(a{sv})@a{sv})",
|
||||
GVariant *key_variant = g_variant_new ("(@aa{sv}@aa{sv}@a{sv})",
|
||||
g_variant_builder_end (&subkeys_builder),
|
||||
g_variant_builder_end (&uids_builder),
|
||||
g_variant_dict_end (&metadata_dict));
|
||||
|
@ -1429,7 +1429,7 @@ gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
||||
/**
|
||||
* OSTREE_GPG_KEY_GVARIANT_FORMAT:
|
||||
*
|
||||
* - a(a{sv}) - Array of subkeys. Each a{sv} dictionary represents a
|
||||
* - aa{sv} - Array of subkeys. Each a{sv} dictionary represents a
|
||||
* subkey. The primary key is the first subkey. The following keys are
|
||||
* currently recognized:
|
||||
* - key: `fingerprint`, value: `s`, key fingerprint hexadecimal string
|
||||
@ -1441,7 +1441,7 @@ gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
||||
* - key: `revoked`, value: `b`, whether key is revoked
|
||||
* - key: `expired`, value: `b`, whether key is expired
|
||||
* - key: `invalid`, value: `b`, whether key is invalid
|
||||
* - a(a{sv}) - Array of user IDs. Each a{sv} dictionary represents a
|
||||
* - aa{sv} - Array of user IDs. Each a{sv} dictionary represents a
|
||||
* user ID. The following keys are currently recognized:
|
||||
* - key: `uid`, value: `s`, full user ID (name, email and comment)
|
||||
* - key: `name`, value: `s`, user ID name component
|
||||
@ -1456,7 +1456,7 @@ gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
||||
*
|
||||
* Since: 2021.4
|
||||
*/
|
||||
#define OSTREE_GPG_KEY_GVARIANT_STRING "(a(a{sv})a(a{sv})a{sv})"
|
||||
#define OSTREE_GPG_KEY_GVARIANT_STRING "(aa{sv}aa{sv}a{sv})"
|
||||
#define OSTREE_GPG_KEY_GVARIANT_FORMAT G_VARIANT_TYPE (OSTREE_GPG_KEY_GVARIANT_STRING)
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
|
Loading…
Reference in New Issue
Block a user