mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
Look for $remotename.trustedkeys.gpg in remotes.d dir
This is a nice way to add gpg keys for system configured remotes without making them globally trusted. Closes: #247 Approved by: cgwalters
This commit is contained in:
parent
c86e4f0c90
commit
7ac8b0442c
@ -4575,6 +4575,7 @@ find_keyring (OstreeRepo *self,
|
||||
OstreeRemote *remote,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
g_autoptr(GFile) remotes_d = NULL;
|
||||
g_autoptr(GFile) file = NULL;
|
||||
file = g_file_get_child (self->repodir, remote->keyring);
|
||||
|
||||
@ -4583,6 +4584,15 @@ find_keyring (OstreeRepo *self,
|
||||
return g_steal_pointer (&file);
|
||||
}
|
||||
|
||||
remotes_d = get_remotes_d_dir (self);
|
||||
if (remotes_d)
|
||||
{
|
||||
g_autoptr(GFile) file2 = g_file_get_child (remotes_d, remote->keyring);
|
||||
|
||||
if (g_file_query_exists (file2, cancellable))
|
||||
return g_steal_pointer (&file2);
|
||||
}
|
||||
|
||||
if (self->parent_repo)
|
||||
return find_keyring (self->parent_repo, remote, cancellable);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user