diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-18 13:37:38 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-18 13:37:38 +0200 |
commit | 9ef4abad615bea12d13be542b8ae5fbeb2dfee32 (patch) | |
tree | 8875a687e004d331c9ea6a1d511a328c72b88113 /src/revocation/gnunet-revocation-tvg.c | |
parent | e95236b3ed78cd597c15f34b89385295702b627f (diff) | |
download | gnunet-9ef4abad615bea12d13be542b8ae5fbeb2dfee32.tar.gz gnunet-9ef4abad615bea12d13be542b8ae5fbeb2dfee32.zip |
NEWS: Refactoring components under src/ into lib/, plugin/, cli/ and service/
This also includes a necessary API refactoring of crypto from IDENTITY
to UTIL.
Diffstat (limited to 'src/revocation/gnunet-revocation-tvg.c')
-rw-r--r-- | src/revocation/gnunet-revocation-tvg.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/revocation/gnunet-revocation-tvg.c b/src/revocation/gnunet-revocation-tvg.c index e8b0820bb..b59b7ba62 100644 --- a/src/revocation/gnunet-revocation-tvg.c +++ b/src/revocation/gnunet-revocation-tvg.c | |||
@@ -101,25 +101,25 @@ print_bytes (void *buf, | |||
101 | 101 | ||
102 | 102 | ||
103 | static void | 103 | static void |
104 | run_with_key (struct GNUNET_IDENTITY_PrivateKey *id_priv) | 104 | run_with_key (struct GNUNET_CRYPTO_PrivateKey *id_priv) |
105 | { | 105 | { |
106 | struct GNUNET_IDENTITY_PublicKey id_pub; | 106 | struct GNUNET_CRYPTO_PublicKey id_pub; |
107 | struct GNUNET_REVOCATION_PowP *pow; | 107 | struct GNUNET_REVOCATION_PowP *pow; |
108 | struct GNUNET_REVOCATION_PowCalculationHandle *ph; | 108 | struct GNUNET_REVOCATION_PowCalculationHandle *ph; |
109 | struct GNUNET_TIME_Relative exp; | 109 | struct GNUNET_TIME_Relative exp; |
110 | char ztld[128]; | 110 | char ztld[128]; |
111 | ssize_t key_len; | 111 | ssize_t key_len; |
112 | 112 | ||
113 | GNUNET_IDENTITY_key_get_public (id_priv, | 113 | GNUNET_CRYPTO_key_get_public (id_priv, |
114 | &id_pub); | 114 | &id_pub); |
115 | GNUNET_STRINGS_data_to_string (&id_pub, | 115 | GNUNET_STRINGS_data_to_string (&id_pub, |
116 | GNUNET_IDENTITY_public_key_get_length ( | 116 | GNUNET_CRYPTO_public_key_get_length ( |
117 | &id_pub), | 117 | &id_pub), |
118 | ztld, | 118 | ztld, |
119 | sizeof (ztld)); | 119 | sizeof (ztld)); |
120 | fprintf (stdout, "\n"); | 120 | fprintf (stdout, "\n"); |
121 | fprintf (stdout, "Zone identifier (ztype|zkey):\n"); | 121 | fprintf (stdout, "Zone identifier (ztype|zkey):\n"); |
122 | key_len = GNUNET_IDENTITY_public_key_get_length (&id_pub); | 122 | key_len = GNUNET_CRYPTO_public_key_get_length (&id_pub); |
123 | GNUNET_assert (0 < key_len); | 123 | GNUNET_assert (0 < key_len); |
124 | print_bytes (&id_pub, key_len, 8); | 124 | print_bytes (&id_pub, key_len, 8); |
125 | fprintf (stdout, "\n"); | 125 | fprintf (stdout, "\n"); |
@@ -178,16 +178,16 @@ run (void *cls, | |||
178 | const char *cfgfile, | 178 | const char *cfgfile, |
179 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 179 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
180 | { | 180 | { |
181 | struct GNUNET_IDENTITY_PrivateKey id_priv; | 181 | struct GNUNET_CRYPTO_PrivateKey id_priv; |
182 | 182 | ||
183 | id_priv.type = htonl (GNUNET_IDENTITY_TYPE_ECDSA); | 183 | id_priv.type = htonl (GNUNET_PUBLIC_KEY_TYPE_ECDSA); |
184 | parsehex (d_pkey,(char*) &id_priv.ecdsa_key, sizeof (id_priv.ecdsa_key), 1); | 184 | parsehex (d_pkey,(char*) &id_priv.ecdsa_key, sizeof (id_priv.ecdsa_key), 1); |
185 | 185 | ||
186 | fprintf (stdout, "Zone private key (d, big-endian):\n"); | 186 | fprintf (stdout, "Zone private key (d, big-endian):\n"); |
187 | print_bytes_ (&id_priv.ecdsa_key, sizeof(id_priv.ecdsa_key), 8, 1); | 187 | print_bytes_ (&id_priv.ecdsa_key, sizeof(id_priv.ecdsa_key), 8, 1); |
188 | run_with_key (&id_priv); | 188 | run_with_key (&id_priv); |
189 | printf ("\n"); | 189 | printf ("\n"); |
190 | id_priv.type = htonl (GNUNET_IDENTITY_TYPE_EDDSA); | 190 | id_priv.type = htonl (GNUNET_PUBLIC_KEY_TYPE_EDDSA); |
191 | parsehex (d_edkey,(char*) &id_priv.eddsa_key, sizeof (id_priv.eddsa_key), 0); | 191 | parsehex (d_edkey,(char*) &id_priv.eddsa_key, sizeof (id_priv.eddsa_key), 0); |
192 | 192 | ||
193 | fprintf (stdout, "Zone private key (d):\n"); | 193 | fprintf (stdout, "Zone private key (d):\n"); |