bin/remote: Include update URLs in list-gpg-keys

This commit is contained in:
Dan Nicholson 2019-08-26 11:27:54 -06:00 committed by Dan Nicholson
parent 27dc5d7d38
commit 90a3bda1f8
2 changed files with 15 additions and 0 deletions

View File

@ -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;

View File

@ -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
@ -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