diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-22 19:09:12 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-22 19:09:12 +0200 |
commit | ea1d3fd9f54879992fb997a1e94cfd6830085c4b (patch) | |
tree | 7a3fb2ad932a6ab0df3ae6bc5d5fea30575f5171 /src/revocation | |
parent | acc69a8e5c921e5bbb03260383936487ec9ce0ca (diff) | |
download | gnunet-ea1d3fd9f54879992fb997a1e94cfd6830085c4b.tar.gz gnunet-ea1d3fd9f54879992fb997a1e94cfd6830085c4b.zip |
-more gnsrecord API
Diffstat (limited to 'src/revocation')
-rw-r--r-- | src/revocation/gnunet-revocation-tvg.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/revocation/gnunet-revocation-tvg.c b/src/revocation/gnunet-revocation-tvg.c index 88117dd3f..cb5e31fcd 100644 --- a/src/revocation/gnunet-revocation-tvg.c +++ b/src/revocation/gnunet-revocation-tvg.c | |||
@@ -70,16 +70,24 @@ run (void *cls, | |||
70 | struct GNUNET_REVOCATION_PowP *pow; | 70 | struct GNUNET_REVOCATION_PowP *pow; |
71 | struct GNUNET_REVOCATION_PowCalculationHandle *ph; | 71 | struct GNUNET_REVOCATION_PowCalculationHandle *ph; |
72 | struct GNUNET_TIME_Relative exp; | 72 | struct GNUNET_TIME_Relative exp; |
73 | char ztld[128]; | ||
73 | 74 | ||
74 | id_priv.type = htonl (GNUNET_IDENTITY_TYPE_ECDSA); | 75 | id_priv.type = htonl (GNUNET_IDENTITY_TYPE_ECDSA); |
75 | GNUNET_CRYPTO_ecdsa_key_create (&id_priv.ecdsa_key); | 76 | GNUNET_CRYPTO_ecdsa_key_create (&id_priv.ecdsa_key); |
76 | GNUNET_IDENTITY_key_get_public (&id_priv, | 77 | GNUNET_IDENTITY_key_get_public (&id_priv, |
77 | &id_pub); | 78 | &id_pub); |
78 | fprintf (stdout, "Zone private key (d, little-endian scalar):\n"); | 79 | GNUNET_STRINGS_data_to_string (&id_pub, |
80 | GNUNET_IDENTITY_key_get_length (&id_pub), | ||
81 | ztld, | ||
82 | sizeof (ztld)); | ||
83 | fprintf (stdout, "Zone private key (d, little-endian scalar, with ztype prepended):\n"); | ||
79 | print_bytes (&id_priv, sizeof(id_priv), 8); | 84 | print_bytes (&id_priv, sizeof(id_priv), 8); |
80 | fprintf (stdout, "\n"); | 85 | fprintf (stdout, "\n"); |
81 | fprintf (stdout, "Zone public key (zk):\n"); | 86 | fprintf (stdout, "Zone identifier (zid):\n"); |
82 | print_bytes (&id_pub, sizeof(id_pub), 8); | 87 | print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8); |
88 | fprintf (stdout, "\n"); | ||
89 | fprintf (stdout, "Encoded zone identifier (zkl = zTLD):\n"); | ||
90 | fprintf (stdout, "%s\n", ztld); | ||
83 | fprintf (stdout, "\n"); | 91 | fprintf (stdout, "\n"); |
84 | pow = GNUNET_malloc (GNUNET_REVOCATION_MAX_PROOF_SIZE); | 92 | pow = GNUNET_malloc (GNUNET_REVOCATION_MAX_PROOF_SIZE); |
85 | GNUNET_REVOCATION_pow_init (&id_priv, | 93 | GNUNET_REVOCATION_pow_init (&id_priv, |