diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-24 21:29:07 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-24 21:29:07 +0900 |
commit | 7a1793b347a72ec0b3437effe6faeb4170f1c445 (patch) | |
tree | ab3f8ca1d7a3f15dc14d4e558dd2ee537ea13516 /src/namestore | |
parent | 8de99f209e9cc3cd5b212c8e5d7da86e90bf64e6 (diff) | |
download | gnunet-7a1793b347a72ec0b3437effe6faeb4170f1c445.tar.gz gnunet-7a1793b347a72ec0b3437effe6faeb4170f1c445.zip |
-output public key not private
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index c97ada671..f6e53a340 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -614,6 +614,7 @@ display_record (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | |||
614 | const char *typestr; | 614 | const char *typestr; |
615 | char *s; | 615 | char *s; |
616 | const char *ets; | 616 | const char *ets; |
617 | struct GNUNET_IDENTITY_PublicKey pk; | ||
617 | struct GNUNET_TIME_Absolute at; | 618 | struct GNUNET_TIME_Absolute at; |
618 | struct GNUNET_TIME_Relative rt; | 619 | struct GNUNET_TIME_Relative rt; |
619 | struct EgoEntry *ego; | 620 | struct EgoEntry *ego; |
@@ -646,11 +647,12 @@ display_record (const struct GNUNET_IDENTITY_PrivateKey *zone_key, | |||
646 | break; | 647 | break; |
647 | } | 648 | } |
648 | } | 649 | } |
649 | if (list_orphaned && !is_orphaned) | 650 | if (list_orphaned && ! is_orphaned) |
650 | return; | 651 | return; |
651 | if (!list_orphaned && is_orphaned) | 652 | if (! list_orphaned && is_orphaned) |
652 | return; | 653 | return; |
653 | orphaned_str = GNUNET_IDENTITY_private_key_to_string (zone_key); | 654 | GNUNET_IDENTITY_key_get_public (zone_key, &pk); |
655 | orphaned_str = GNUNET_IDENTITY_public_key_to_string (&pk); | ||
654 | fprintf (stdout, "%s.%s:\n", rname, is_orphaned ? orphaned_str : | 656 | fprintf (stdout, "%s.%s:\n", rname, is_orphaned ? orphaned_str : |
655 | ego->identifier); | 657 | ego->identifier); |
656 | GNUNET_free (orphaned_str); | 658 | GNUNET_free (orphaned_str); |
@@ -1914,7 +1916,7 @@ main (int argc, char *const *argv) | |||
1914 | GNUNET_GETOPT_option_flag ('X', | 1916 | GNUNET_GETOPT_option_flag ('X', |
1915 | "purge-zone-records", | 1917 | "purge-zone-records", |
1916 | gettext_noop ( | 1918 | gettext_noop ( |
1917 | "delete all records in specified zone"), | 1919 | "delete all records in specified zone"), |
1918 | &purge_zone), | 1920 | &purge_zone), |
1919 | GNUNET_GETOPT_option_flag ( | 1921 | GNUNET_GETOPT_option_flag ( |
1920 | 's', | 1922 | 's', |