Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote GPG key info #2401

Merged
merged 12 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bin/remote: Include update URLs in list-gpg-keys
  • Loading branch information
dbnicholson committed Jul 15, 2021
commit 90a3bda1f8298e149cb4940369cec4bdc4e53972
7 changes: 7 additions & 0 deletions src/ostree/ot-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,13 @@ ot_dump_gpg_key (GVariant *key,
uid,
revoked ? " (revoked)" : "",
invalid ? " (invalid)" : "");

const char *advanced_url = NULL;
const char *direct_url = NULL;
(void) g_variant_lookup (uid_v, "advanced_url", "m&s", &advanced_url);
(void) g_variant_lookup (uid_v, "direct_url", "m&s", &direct_url);
g_print (" Advanced update URL: %s\n", advanced_url ?: "");
g_print (" Direct update URL: %s\n", direct_url ?: "");
}

GVariant *subkey = NULL;
Expand Down
8 changes: 8 additions & 0 deletions tests/test-remote-list-gpg-keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ cat > expected <<"EOF"
Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA
Created: Tue Sep 10 02:29:42 2013
UID: Ostree Tester <test@test.com>
Advanced update URL: https://openpgpkey.test.com/.well-known/openpgpkey/test.com/hu/iffe93qcsgp4c8ncbb378rxjo6cn9q6u?l=test
Direct update URL: https://test.com/.well-known/openpgpkey/hu/iffe93qcsgp4c8ncbb378rxjo6cn9q6u?l=test
Subkey: CC47B2DFB520AEF231180725DF20F58B408DEA49
Created: Tue Sep 10 02:29:42 2013
EOF
Expand All @@ -89,16 +91,22 @@ cat > expected <<"EOF"
Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA
Created: Tue Sep 10 02:29:42 2013
UID: Ostree Tester <test@test.com>
Advanced update URL: https://openpgpkey.test.com/.well-known/openpgpkey/test.com/hu/iffe93qcsgp4c8ncbb378rxjo6cn9q6u?l=test
Direct update URL: https://test.com/.well-known/openpgpkey/hu/iffe93qcsgp4c8ncbb378rxjo6cn9q6u?l=test
Subkey: CC47B2DFB520AEF231180725DF20F58B408DEA49
Created: Tue Sep 10 02:29:42 2013
Key: 7B3B1020D74479687FDB2273D8228CFECA950D41
Created: Tue Mar 17 14:00:32 2015
UID: Ostree Tester II <test2@test.com>
Advanced update URL: https://openpgpkey.test.com/.well-known/openpgpkey/test.com/hu/nnxwsxno46ap6hw7fgphp68j76egpfa9?l=test2
Direct update URL: https://test.com/.well-known/openpgpkey/hu/nnxwsxno46ap6hw7fgphp68j76egpfa9?l=test2
Subkey: 1EFA95C06EB1EB91754575E004B69C2560D53993
Created: Tue Mar 17 14:00:32 2015
Key: 7D29CF060B8269CDF63BFBDD0D15FAE7DF444D67
Created: Tue Mar 17 14:01:05 2015
UID: Ostree Tester III <test3@test.com>
Advanced update URL: https://openpgpkey.test.com/.well-known/openpgpkey/test.com/hu/8494gyqhmrcs6gn38tn6kgjexet117cj?l=test3
Direct update URL: https://test.com/.well-known/openpgpkey/hu/8494gyqhmrcs6gn38tn6kgjexet117cj?l=test3
Subkey: 0E45E48CBF7B360C0E04443E0C601A7402416340
Created: Tue Mar 17 14:01:05 2015
EOF
Expand Down