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/abd | |
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/abd')
-rw-r--r-- | src/abd/Makefile.am | 10 | ||||
-rw-r--r-- | src/abd/abd.h | 20 | ||||
-rw-r--r-- | src/abd/abd_api.c | 8 | ||||
-rw-r--r-- | src/abd/abd_serialization.c | 8 | ||||
-rw-r--r-- | src/abd/delegate_misc.c | 28 | ||||
-rw-r--r-- | src/abd/gnunet-abd.c | 38 | ||||
-rw-r--r-- | src/abd/gnunet-service-abd.c | 58 | ||||
-rw-r--r-- | src/abd/plugin_gnsrecord_abd.c | 4 |
8 files changed, 87 insertions, 87 deletions
diff --git a/src/abd/Makefile.am b/src/abd/Makefile.am index 69809291a..6fa2dc848 100644 --- a/src/abd/Makefile.am +++ b/src/abd/Makefile.am | |||
@@ -41,8 +41,8 @@ gnunet_abd_SOURCES = \ | |||
41 | gnunet-abd.c | 41 | gnunet-abd.c |
42 | gnunet_abd_LDADD = \ | 42 | gnunet_abd_LDADD = \ |
43 | libgnunetabd.la \ | 43 | libgnunetabd.la \ |
44 | $(top_builddir)/src/util/libgnunetutil.la \ | 44 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
45 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 45 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ |
46 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 46 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
47 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 47 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
48 | $(GN_LIBINTL) | 48 | $(GN_LIBINTL) |
@@ -52,7 +52,7 @@ libgnunet_plugin_gnsrecord_abd_la_SOURCES = \ | |||
52 | plugin_gnsrecord_abd.c | 52 | plugin_gnsrecord_abd.c |
53 | libgnunet_plugin_gnsrecord_abd_la_LIBADD = \ | 53 | libgnunet_plugin_gnsrecord_abd_la_LIBADD = \ |
54 | libgnunetabd.la \ | 54 | libgnunetabd.la \ |
55 | $(top_builddir)/src/util/libgnunetutil.la \ | 55 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
56 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 56 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
57 | $(LTLIBINTL) | 57 | $(LTLIBINTL) |
58 | libgnunet_plugin_gnsrecord_abd_la_LDFLAGS = \ | 58 | libgnunet_plugin_gnsrecord_abd_la_LDFLAGS = \ |
@@ -64,7 +64,7 @@ gnunet_service_abd_SOURCES = \ | |||
64 | gnunet-service-abd.c | 64 | gnunet-service-abd.c |
65 | gnunet_service_abd_LDADD = \ | 65 | gnunet_service_abd_LDADD = \ |
66 | libgnunetabd.la \ | 66 | libgnunetabd.la \ |
67 | $(top_builddir)/src/util/libgnunetutil.la \ | 67 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
68 | $(top_builddir)/src/gns/libgnunetgns.la \ | 68 | $(top_builddir)/src/gns/libgnunetgns.la \ |
69 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 69 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
70 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 70 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
@@ -79,7 +79,7 @@ libgnunetabd_la_SOURCES = \ | |||
79 | delegate_misc.c \ | 79 | delegate_misc.c \ |
80 | delegate_misc.h | 80 | delegate_misc.h |
81 | libgnunetabd_la_LIBADD = \ | 81 | libgnunetabd_la_LIBADD = \ |
82 | $(top_builddir)/src/util/libgnunetutil.la \ | 82 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
83 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 83 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
84 | $(XLIB) | 84 | $(XLIB) |
85 | libgnunetabd_la_LDFLAGS = \ | 85 | libgnunetabd_la_LDFLAGS = \ |
diff --git a/src/abd/abd.h b/src/abd/abd.h index 61210b3f7..26b8e222e 100644 --- a/src/abd/abd.h +++ b/src/abd/abd.h | |||
@@ -42,12 +42,12 @@ struct CollectMessage | |||
42 | /** | 42 | /** |
43 | * Subject public key | 43 | * Subject public key |
44 | */ | 44 | */ |
45 | struct GNUNET_IDENTITY_PrivateKey subject_key; | 45 | struct GNUNET_CRYPTO_PrivateKey subject_key; |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Trust anchor | 48 | * Trust anchor |
49 | */ | 49 | */ |
50 | struct GNUNET_IDENTITY_PublicKey issuer_key; | 50 | struct GNUNET_CRYPTO_PublicKey issuer_key; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Length of the issuer attribute | 53 | * Length of the issuer attribute |
@@ -81,12 +81,12 @@ struct VerifyMessage | |||
81 | /** | 81 | /** |
82 | * Subject public key | 82 | * Subject public key |
83 | */ | 83 | */ |
84 | struct GNUNET_IDENTITY_PublicKey subject_key; | 84 | struct GNUNET_CRYPTO_PublicKey subject_key; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Trust anchor | 87 | * Trust anchor |
88 | */ | 88 | */ |
89 | struct GNUNET_IDENTITY_PublicKey issuer_key; | 89 | struct GNUNET_CRYPTO_PublicKey issuer_key; |
90 | 90 | ||
91 | /** | 91 | /** |
92 | * Number of delegates | 92 | * Number of delegates |
@@ -170,7 +170,7 @@ struct DelegationRecordData | |||
170 | /** | 170 | /** |
171 | * Subject key | 171 | * Subject key |
172 | */ | 172 | */ |
173 | struct GNUNET_IDENTITY_PublicKey subject_key; | 173 | struct GNUNET_CRYPTO_PublicKey subject_key; |
174 | 174 | ||
175 | /** | 175 | /** |
176 | * Subject attributes | 176 | * Subject attributes |
@@ -184,12 +184,12 @@ struct ChainEntry | |||
184 | /** | 184 | /** |
185 | * Issuer key | 185 | * Issuer key |
186 | */ | 186 | */ |
187 | struct GNUNET_IDENTITY_PublicKey issuer_key; | 187 | struct GNUNET_CRYPTO_PublicKey issuer_key; |
188 | 188 | ||
189 | /** | 189 | /** |
190 | * Subject key | 190 | * Subject key |
191 | */ | 191 | */ |
192 | struct GNUNET_IDENTITY_PublicKey subject_key; | 192 | struct GNUNET_CRYPTO_PublicKey subject_key; |
193 | 193 | ||
194 | /** | 194 | /** |
195 | * Issuer attributes | 195 | * Issuer attributes |
@@ -208,7 +208,7 @@ struct DelegateEntry | |||
208 | /** | 208 | /** |
209 | * The signature for this credential by the issuer | 209 | * The signature for this credential by the issuer |
210 | */ | 210 | */ |
211 | struct GNUNET_IDENTITY_Signature signature; | 211 | struct GNUNET_CRYPTO_Signature signature; |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * Signature meta | 214 | * Signature meta |
@@ -218,12 +218,12 @@ struct DelegateEntry | |||
218 | /** | 218 | /** |
219 | * Public key of the issuer | 219 | * Public key of the issuer |
220 | */ | 220 | */ |
221 | struct GNUNET_IDENTITY_PublicKey issuer_key; | 221 | struct GNUNET_CRYPTO_PublicKey issuer_key; |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * Public key of the subject this credential was issued to | 224 | * Public key of the subject this credential was issued to |
225 | */ | 225 | */ |
226 | struct GNUNET_IDENTITY_PublicKey subject_key; | 226 | struct GNUNET_CRYPTO_PublicKey subject_key; |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * Expiration time of this credential | 229 | * Expiration time of this credential |
diff --git a/src/abd/abd_api.c b/src/abd/abd_api.c index 0b3b4f61f..3682f41ba 100644 --- a/src/abd/abd_api.c +++ b/src/abd/abd_api.c | |||
@@ -422,9 +422,9 @@ GNUNET_ABD_request_cancel (struct GNUNET_ABD_Request *lr) | |||
422 | struct GNUNET_ABD_Request * | 422 | struct GNUNET_ABD_Request * |
423 | GNUNET_ABD_collect ( | 423 | GNUNET_ABD_collect ( |
424 | struct GNUNET_ABD_Handle *handle, | 424 | struct GNUNET_ABD_Handle *handle, |
425 | const struct GNUNET_IDENTITY_PublicKey *issuer_key, | 425 | const struct GNUNET_CRYPTO_PublicKey *issuer_key, |
426 | const char *issuer_attribute, | 426 | const char *issuer_attribute, |
427 | const struct GNUNET_IDENTITY_PrivateKey *subject_key, | 427 | const struct GNUNET_CRYPTO_PrivateKey *subject_key, |
428 | enum GNUNET_ABD_AlgoDirectionFlags direction, | 428 | enum GNUNET_ABD_AlgoDirectionFlags direction, |
429 | GNUNET_ABD_CredentialResultProcessor proc, | 429 | GNUNET_ABD_CredentialResultProcessor proc, |
430 | void *proc_cls, | 430 | void *proc_cls, |
@@ -496,9 +496,9 @@ GNUNET_ABD_collect ( | |||
496 | struct GNUNET_ABD_Request * | 496 | struct GNUNET_ABD_Request * |
497 | GNUNET_ABD_verify ( | 497 | GNUNET_ABD_verify ( |
498 | struct GNUNET_ABD_Handle *handle, | 498 | struct GNUNET_ABD_Handle *handle, |
499 | const struct GNUNET_IDENTITY_PublicKey *issuer_key, | 499 | const struct GNUNET_CRYPTO_PublicKey *issuer_key, |
500 | const char *issuer_attribute, | 500 | const char *issuer_attribute, |
501 | const struct GNUNET_IDENTITY_PublicKey *subject_key, | 501 | const struct GNUNET_CRYPTO_PublicKey *subject_key, |
502 | uint32_t delegate_count, | 502 | uint32_t delegate_count, |
503 | const struct GNUNET_ABD_Delegate *delegates, | 503 | const struct GNUNET_ABD_Delegate *delegates, |
504 | enum GNUNET_ABD_AlgoDirectionFlags direction, | 504 | enum GNUNET_ABD_AlgoDirectionFlags direction, |
diff --git a/src/abd/abd_serialization.c b/src/abd/abd_serialization.c index 2ed24ff2f..14960e804 100644 --- a/src/abd/abd_serialization.c +++ b/src/abd/abd_serialization.c | |||
@@ -199,7 +199,7 @@ GNUNET_ABD_delegates_serialize ( | |||
199 | c_rec.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); | 199 | c_rec.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); |
200 | c_rec.purpose.size = | 200 | c_rec.purpose.size = |
201 | htonl ((sizeof (struct DelegateEntry) + cd[i].issuer_attribute_len) | 201 | htonl ((sizeof (struct DelegateEntry) + cd[i].issuer_attribute_len) |
202 | - sizeof (struct GNUNET_IDENTITY_Signature)); | 202 | - sizeof (struct GNUNET_CRYPTO_Signature)); |
203 | c_rec.expiration = GNUNET_htonll (cd[i].expiration.abs_value_us); | 203 | c_rec.expiration = GNUNET_htonll (cd[i].expiration.abs_value_us); |
204 | if (off + sizeof (c_rec) > dest_size) | 204 | if (off + sizeof (c_rec) > dest_size) |
205 | return -1; | 205 | return -1; |
@@ -445,12 +445,12 @@ GNUNET_ABD_delegate_serialize (struct GNUNET_ABD_Delegate *dele, | |||
445 | } | 445 | } |
446 | cdata->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); | 446 | cdata->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); |
447 | cdata->purpose.size = | 447 | cdata->purpose.size = |
448 | htonl (size - sizeof (struct GNUNET_IDENTITY_Signature)); | 448 | htonl (size - sizeof (struct GNUNET_CRYPTO_Signature)); |
449 | 449 | ||
450 | GNUNET_memcpy (&cdata[1], tmp_str, attr_len); | 450 | GNUNET_memcpy (&cdata[1], tmp_str, attr_len); |
451 | 451 | ||
452 | if (GNUNET_OK != | 452 | if (GNUNET_OK != |
453 | GNUNET_IDENTITY_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_DELEGATE, | 453 | GNUNET_CRYPTO_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_DELEGATE, |
454 | &cdata->purpose, | 454 | &cdata->purpose, |
455 | &cdata->signature, | 455 | &cdata->signature, |
456 | &cdata->issuer_key)) | 456 | &cdata->issuer_key)) |
@@ -473,7 +473,7 @@ GNUNET_ABD_delegate_deserialize (const char *data, size_t data_size) | |||
473 | return NULL; | 473 | return NULL; |
474 | cdata = (struct DelegateEntry *) data; | 474 | cdata = (struct DelegateEntry *) data; |
475 | if (GNUNET_OK != | 475 | if (GNUNET_OK != |
476 | GNUNET_IDENTITY_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_DELEGATE, | 476 | GNUNET_CRYPTO_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_DELEGATE, |
477 | &cdata->purpose, | 477 | &cdata->purpose, |
478 | &cdata->signature, | 478 | &cdata->signature, |
479 | &cdata->issuer_key)) | 479 | &cdata->issuer_key)) |
diff --git a/src/abd/delegate_misc.c b/src/abd/delegate_misc.c index cc45cde04..446c0b8d2 100644 --- a/src/abd/delegate_misc.c +++ b/src/abd/delegate_misc.c | |||
@@ -42,10 +42,10 @@ GNUNET_ABD_delegate_to_string ( | |||
42 | char *issuer_pkey; | 42 | char *issuer_pkey; |
43 | char *signature; | 43 | char *signature; |
44 | 44 | ||
45 | subject_pkey = GNUNET_IDENTITY_public_key_to_string (&cred->subject_key); | 45 | subject_pkey = GNUNET_CRYPTO_public_key_to_string (&cred->subject_key); |
46 | issuer_pkey = GNUNET_IDENTITY_public_key_to_string (&cred->issuer_key); | 46 | issuer_pkey = GNUNET_CRYPTO_public_key_to_string (&cred->issuer_key); |
47 | GNUNET_STRINGS_base64_encode ((char *) &cred->signature, | 47 | GNUNET_STRINGS_base64_encode ((char *) &cred->signature, |
48 | sizeof (struct GNUNET_IDENTITY_Signature), | 48 | sizeof (struct GNUNET_CRYPTO_Signature), |
49 | &signature); | 49 | &signature); |
50 | if (0 == cred->subject_attribute_len) | 50 | if (0 == cred->subject_attribute_len) |
51 | { | 51 | { |
@@ -80,7 +80,7 @@ struct GNUNET_ABD_Delegate * | |||
80 | GNUNET_ABD_delegate_from_string (const char *s) | 80 | GNUNET_ABD_delegate_from_string (const char *s) |
81 | { | 81 | { |
82 | struct GNUNET_ABD_Delegate *dele; | 82 | struct GNUNET_ABD_Delegate *dele; |
83 | size_t enclen = (sizeof (struct GNUNET_IDENTITY_PublicKey)) * 8; | 83 | size_t enclen = (sizeof (struct GNUNET_CRYPTO_PublicKey)) * 8; |
84 | if (enclen % 5 > 0) | 84 | if (enclen % 5 > 0) |
85 | enclen += 5 - enclen % 5; | 85 | enclen += 5 - enclen % 5; |
86 | enclen /= 5; /* 260/5 = 52 */ | 86 | enclen /= 5; /* 260/5 = 52 */ |
@@ -91,7 +91,7 @@ GNUNET_ABD_delegate_from_string (const char *s) | |||
91 | char sub_attr[253 + 1] = ""; | 91 | char sub_attr[253 + 1] = ""; |
92 | char signature[256]; // TODO max payload size | 92 | char signature[256]; // TODO max payload size |
93 | 93 | ||
94 | struct GNUNET_IDENTITY_Signature *sig; | 94 | struct GNUNET_CRYPTO_Signature *sig; |
95 | struct GNUNET_TIME_Absolute etime_abs; | 95 | struct GNUNET_TIME_Absolute etime_abs; |
96 | 96 | ||
97 | // If it's A.a <- B.b... | 97 | // If it's A.a <- B.b... |
@@ -144,20 +144,20 @@ GNUNET_ABD_delegate_from_string (const char *s) | |||
144 | tmp_str[attr_len - 1] = '\0'; | 144 | tmp_str[attr_len - 1] = '\0'; |
145 | 145 | ||
146 | if (GNUNET_SYSERR == | 146 | if (GNUNET_SYSERR == |
147 | GNUNET_IDENTITY_public_key_from_string (subject_pkey, | 147 | GNUNET_CRYPTO_public_key_from_string (subject_pkey, |
148 | &dele->subject_key)) | 148 | &dele->subject_key)) |
149 | { | 149 | { |
150 | GNUNET_free (dele); | 150 | GNUNET_free (dele); |
151 | return NULL; | 151 | return NULL; |
152 | } | 152 | } |
153 | if (GNUNET_SYSERR == | 153 | if (GNUNET_SYSERR == |
154 | GNUNET_IDENTITY_public_key_from_string (issuer_pkey, | 154 | GNUNET_CRYPTO_public_key_from_string (issuer_pkey, |
155 | &dele->issuer_key)) | 155 | &dele->issuer_key)) |
156 | { | 156 | { |
157 | GNUNET_free (dele); | 157 | GNUNET_free (dele); |
158 | return NULL; | 158 | return NULL; |
159 | } | 159 | } |
160 | GNUNET_assert (sizeof (struct GNUNET_IDENTITY_Signature) == | 160 | GNUNET_assert (sizeof (struct GNUNET_CRYPTO_Signature) == |
161 | GNUNET_STRINGS_base64_decode (signature, | 161 | GNUNET_STRINGS_base64_decode (signature, |
162 | strlen (signature), | 162 | strlen (signature), |
163 | (void **) &sig)); | 163 | (void **) &sig)); |
@@ -196,8 +196,8 @@ GNUNET_ABD_delegate_from_string (const char *s) | |||
196 | 196 | ||
197 | struct GNUNET_ABD_Delegate * | 197 | struct GNUNET_ABD_Delegate * |
198 | GNUNET_ABD_delegate_issue ( | 198 | GNUNET_ABD_delegate_issue ( |
199 | const struct GNUNET_IDENTITY_PrivateKey *issuer, | 199 | const struct GNUNET_CRYPTO_PrivateKey *issuer, |
200 | struct GNUNET_IDENTITY_PublicKey *subject, | 200 | struct GNUNET_CRYPTO_PublicKey *subject, |
201 | const char *iss_attr, | 201 | const char *iss_attr, |
202 | const char *sub_attr, | 202 | const char *sub_attr, |
203 | struct GNUNET_TIME_Absolute *expiration) | 203 | struct GNUNET_TIME_Absolute *expiration) |
@@ -232,9 +232,9 @@ GNUNET_ABD_delegate_issue ( | |||
232 | 232 | ||
233 | del = GNUNET_malloc (size); | 233 | del = GNUNET_malloc (size); |
234 | del->purpose.size = | 234 | del->purpose.size = |
235 | htonl (size - sizeof (struct GNUNET_IDENTITY_Signature)); | 235 | htonl (size - sizeof (struct GNUNET_CRYPTO_Signature)); |
236 | del->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); | 236 | del->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); |
237 | GNUNET_IDENTITY_key_get_public (issuer, &del->issuer_key); | 237 | GNUNET_CRYPTO_key_get_public (issuer, &del->issuer_key); |
238 | del->subject_key = *subject; | 238 | del->subject_key = *subject; |
239 | del->expiration = GNUNET_htonll (expiration->abs_value_us); | 239 | del->expiration = GNUNET_htonll (expiration->abs_value_us); |
240 | del->issuer_attribute_len = htonl (strlen (iss_attr) + 1); | 240 | del->issuer_attribute_len = htonl (strlen (iss_attr) + 1); |
@@ -249,12 +249,12 @@ GNUNET_ABD_delegate_issue ( | |||
249 | 249 | ||
250 | GNUNET_memcpy (&del[1], tmp_str, attr_len); | 250 | GNUNET_memcpy (&del[1], tmp_str, attr_len); |
251 | 251 | ||
252 | GNUNET_IDENTITY_sign_ (issuer, &del->purpose, &del->signature); | 252 | GNUNET_CRYPTO_sign_ (issuer, &del->purpose, &del->signature); |
253 | 253 | ||
254 | dele = GNUNET_malloc (sizeof (struct GNUNET_ABD_Delegate) + attr_len); | 254 | dele = GNUNET_malloc (sizeof (struct GNUNET_ABD_Delegate) + attr_len); |
255 | dele->signature = del->signature; | 255 | dele->signature = del->signature; |
256 | dele->expiration = *expiration; | 256 | dele->expiration = *expiration; |
257 | GNUNET_IDENTITY_key_get_public (issuer, &dele->issuer_key); | 257 | GNUNET_CRYPTO_key_get_public (issuer, &dele->issuer_key); |
258 | 258 | ||
259 | dele->subject_key = *subject; | 259 | dele->subject_key = *subject; |
260 | 260 | ||
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c index 6f6521d98..1ed1adbe7 100644 --- a/src/abd/gnunet-abd.c +++ b/src/abd/gnunet-abd.c | |||
@@ -43,7 +43,7 @@ static struct GNUNET_NAMESTORE_Handle *ns; | |||
43 | /** | 43 | /** |
44 | * Private key for the our zone. | 44 | * Private key for the our zone. |
45 | */ | 45 | */ |
46 | static struct GNUNET_IDENTITY_PrivateKey zone_pkey; | 46 | static struct GNUNET_CRYPTO_PrivateKey zone_pkey; |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * EgoLookup | 49 | * EgoLookup |
@@ -98,12 +98,12 @@ static char *expiration; | |||
98 | /** | 98 | /** |
99 | * Subject key | 99 | * Subject key |
100 | */ | 100 | */ |
101 | struct GNUNET_IDENTITY_PublicKey subject_pkey; | 101 | struct GNUNET_CRYPTO_PublicKey subject_pkey; |
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Issuer key | 104 | * Issuer key |
105 | */ | 105 | */ |
106 | struct GNUNET_IDENTITY_PublicKey issuer_pkey; | 106 | struct GNUNET_CRYPTO_PublicKey issuer_pkey; |
107 | 107 | ||
108 | 108 | ||
109 | /** | 109 | /** |
@@ -277,9 +277,9 @@ handle_intermediate_result (void *cls, | |||
277 | 277 | ||
278 | printf ("%s Intermediate result: %s.%s <- %s.%s\n", | 278 | printf ("%s Intermediate result: %s.%s <- %s.%s\n", |
279 | prefix, | 279 | prefix, |
280 | GNUNET_IDENTITY_public_key_to_string (&dd->issuer_key), | 280 | GNUNET_CRYPTO_public_key_to_string (&dd->issuer_key), |
281 | dd->issuer_attribute, | 281 | dd->issuer_attribute, |
282 | GNUNET_IDENTITY_public_key_to_string (&dd->subject_key), | 282 | GNUNET_CRYPTO_public_key_to_string (&dd->subject_key), |
283 | dd->subject_attribute); | 283 | dd->subject_attribute); |
284 | } | 284 | } |
285 | 285 | ||
@@ -332,8 +332,8 @@ handle_verify_result (void *cls, | |||
332 | printf ("Delegation Chain:\n"); | 332 | printf ("Delegation Chain:\n"); |
333 | for (i = 0; i < d_count; i++) | 333 | for (i = 0; i < d_count; i++) |
334 | { | 334 | { |
335 | iss_key = GNUNET_IDENTITY_public_key_to_string (&dc[i].issuer_key); | 335 | iss_key = GNUNET_CRYPTO_public_key_to_string (&dc[i].issuer_key); |
336 | sub_key = GNUNET_IDENTITY_public_key_to_string (&dc[i].subject_key); | 336 | sub_key = GNUNET_CRYPTO_public_key_to_string (&dc[i].subject_key); |
337 | 337 | ||
338 | if (0 != dc[i].subject_attribute_len) | 338 | if (0 != dc[i].subject_attribute_len) |
339 | { | 339 | { |
@@ -358,8 +358,8 @@ handle_verify_result (void *cls, | |||
358 | printf ("\nDelegate(s):\n"); | 358 | printf ("\nDelegate(s):\n"); |
359 | for (i = 0; i < c_count; i++) | 359 | for (i = 0; i < c_count; i++) |
360 | { | 360 | { |
361 | iss_key = GNUNET_IDENTITY_public_key_to_string (&dele[i].issuer_key); | 361 | iss_key = GNUNET_CRYPTO_public_key_to_string (&dele[i].issuer_key); |
362 | sub_key = GNUNET_IDENTITY_public_key_to_string (&dele[i].subject_key); | 362 | sub_key = GNUNET_CRYPTO_public_key_to_string (&dele[i].subject_key); |
363 | printf ("%s.%s <- %s\n", iss_key, dele[i].issuer_attribute, sub_key); | 363 | printf ("%s.%s <- %s\n", iss_key, dele[i].issuer_attribute, sub_key); |
364 | GNUNET_free (iss_key); | 364 | GNUNET_free (iss_key); |
365 | GNUNET_free (sub_key); | 365 | GNUNET_free (sub_key); |
@@ -381,7 +381,7 @@ handle_verify_result (void *cls, | |||
381 | static void | 381 | static void |
382 | identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | 382 | identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) |
383 | { | 383 | { |
384 | const struct GNUNET_IDENTITY_PrivateKey *privkey; | 384 | const struct GNUNET_CRYPTO_PrivateKey *privkey; |
385 | 385 | ||
386 | el = NULL; | 386 | el = NULL; |
387 | if (NULL == ego) | 387 | if (NULL == ego) |
@@ -400,7 +400,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
400 | { | 400 | { |
401 | 401 | ||
402 | if (GNUNET_OK != | 402 | if (GNUNET_OK != |
403 | GNUNET_IDENTITY_public_key_from_string (issuer_key, | 403 | GNUNET_CRYPTO_public_key_from_string (issuer_key, |
404 | &issuer_pkey)) | 404 | &issuer_pkey)) |
405 | { | 405 | { |
406 | fprintf (stderr, | 406 | fprintf (stderr, |
@@ -501,7 +501,7 @@ add_continuation (void *cls, int32_t success, const char *emsg) | |||
501 | 501 | ||
502 | static void | 502 | static void |
503 | get_existing_record (void *cls, | 503 | get_existing_record (void *cls, |
504 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, | 504 | const struct GNUNET_CRYPTO_PrivateKey *zone_key, |
505 | const char *rec_name, | 505 | const char *rec_name, |
506 | unsigned int rd_count, | 506 | unsigned int rd_count, |
507 | const struct GNUNET_GNSRECORD_Data *rd) | 507 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -545,7 +545,7 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
545 | { | 545 | { |
546 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 546 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
547 | struct GNUNET_ABD_Delegate *cred; | 547 | struct GNUNET_ABD_Delegate *cred; |
548 | struct GNUNET_IDENTITY_PublicKey zone_pubkey; | 548 | struct GNUNET_CRYPTO_PublicKey zone_pubkey; |
549 | char *subject_pubkey_str; | 549 | char *subject_pubkey_str; |
550 | char *zone_pubkey_str; | 550 | char *zone_pubkey_str; |
551 | 551 | ||
@@ -586,12 +586,12 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
586 | 586 | ||
587 | // Get import subject public key string | 587 | // Get import subject public key string |
588 | subject_pubkey_str = | 588 | subject_pubkey_str = |
589 | GNUNET_IDENTITY_public_key_to_string (&cred->subject_key); | 589 | GNUNET_CRYPTO_public_key_to_string (&cred->subject_key); |
590 | 590 | ||
591 | // Get zone public key string | 591 | // Get zone public key string |
592 | GNUNET_IDENTITY_ego_get_public_key (ego, &zone_pubkey); | 592 | GNUNET_IDENTITY_ego_get_public_key (ego, &zone_pubkey); |
593 | zone_pubkey_str = | 593 | zone_pubkey_str = |
594 | GNUNET_IDENTITY_public_key_to_string (&zone_pubkey); | 594 | GNUNET_CRYPTO_public_key_to_string (&zone_pubkey); |
595 | 595 | ||
596 | // Check if the subject key in the signed import matches the zone's key it is issued to | 596 | // Check if the subject key in the signed import matches the zone's key it is issued to |
597 | if (strcmp (zone_pubkey_str, subject_pubkey_str) != 0) | 597 | if (strcmp (zone_pubkey_str, subject_pubkey_str) != 0) |
@@ -668,7 +668,7 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
668 | static void | 668 | static void |
669 | sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | 669 | sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) |
670 | { | 670 | { |
671 | const struct GNUNET_IDENTITY_PrivateKey *privkey; | 671 | const struct GNUNET_CRYPTO_PrivateKey *privkey; |
672 | struct GNUNET_ABD_Delegate *dele; | 672 | struct GNUNET_ABD_Delegate *dele; |
673 | struct GNUNET_TIME_Absolute etime_abs; | 673 | struct GNUNET_TIME_Absolute etime_abs; |
674 | char *res; | 674 | char *res; |
@@ -718,7 +718,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
718 | return; | 718 | return; |
719 | } | 719 | } |
720 | if (GNUNET_OK != | 720 | if (GNUNET_OK != |
721 | GNUNET_IDENTITY_public_key_from_string (subject_pubkey_str, | 721 | GNUNET_CRYPTO_public_key_from_string (subject_pubkey_str, |
722 | &subject_pkey)) | 722 | &subject_pkey)) |
723 | { | 723 | { |
724 | fprintf (stderr, | 724 | fprintf (stderr, |
@@ -883,7 +883,7 @@ run (void *cls, | |||
883 | GNUNET_SCHEDULER_shutdown (); | 883 | GNUNET_SCHEDULER_shutdown (); |
884 | return; | 884 | return; |
885 | } | 885 | } |
886 | if (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (subject, | 886 | if (GNUNET_OK != GNUNET_CRYPTO_public_key_from_string (subject, |
887 | &subject_pkey)) | 887 | &subject_pkey)) |
888 | { | 888 | { |
889 | fprintf (stderr, | 889 | fprintf (stderr, |
@@ -902,7 +902,7 @@ run (void *cls, | |||
902 | return; | 902 | return; |
903 | } | 903 | } |
904 | if (GNUNET_OK != | 904 | if (GNUNET_OK != |
905 | GNUNET_IDENTITY_public_key_from_string (issuer_key, | 905 | GNUNET_CRYPTO_public_key_from_string (issuer_key, |
906 | &issuer_pkey)) | 906 | &issuer_pkey)) |
907 | { | 907 | { |
908 | fprintf (stderr, | 908 | fprintf (stderr, |
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c index 42b26eb9b..5cbc105f6 100644 --- a/src/abd/gnunet-service-abd.c +++ b/src/abd/gnunet-service-abd.c | |||
@@ -60,12 +60,12 @@ struct DelegationChainEntry | |||
60 | /** | 60 | /** |
61 | * The issuer | 61 | * The issuer |
62 | */ | 62 | */ |
63 | struct GNUNET_IDENTITY_PublicKey issuer_key; | 63 | struct GNUNET_CRYPTO_PublicKey issuer_key; |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * The subject | 66 | * The subject |
67 | */ | 67 | */ |
68 | struct GNUNET_IDENTITY_PublicKey subject_key; | 68 | struct GNUNET_CRYPTO_PublicKey subject_key; |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * The issued attribute | 71 | * The issued attribute |
@@ -165,7 +165,7 @@ struct DelegationSetQueueEntry | |||
165 | /** | 165 | /** |
166 | * Issuer key | 166 | * Issuer key |
167 | */ | 167 | */ |
168 | struct GNUNET_IDENTITY_PublicKey *issuer_key; | 168 | struct GNUNET_CRYPTO_PublicKey *issuer_key; |
169 | 169 | ||
170 | /** | 170 | /** |
171 | * Queue entries of this set | 171 | * Queue entries of this set |
@@ -266,7 +266,7 @@ struct VerifyRequestHandle | |||
266 | /** | 266 | /** |
267 | * Issuer public key | 267 | * Issuer public key |
268 | */ | 268 | */ |
269 | struct GNUNET_IDENTITY_PublicKey issuer_key; | 269 | struct GNUNET_CRYPTO_PublicKey issuer_key; |
270 | 270 | ||
271 | /** | 271 | /** |
272 | * Issuer attribute | 272 | * Issuer attribute |
@@ -276,7 +276,7 @@ struct VerifyRequestHandle | |||
276 | /** | 276 | /** |
277 | * Subject public key | 277 | * Subject public key |
278 | */ | 278 | */ |
279 | struct GNUNET_IDENTITY_PublicKey subject_key; | 279 | struct GNUNET_CRYPTO_PublicKey subject_key; |
280 | 280 | ||
281 | /** | 281 | /** |
282 | * Delegate DLL | 282 | * Delegate DLL |
@@ -351,10 +351,10 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text) | |||
351 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 351 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
352 | "%s %s.%s <- %s.%s\n", | 352 | "%s %s.%s <- %s.%s\n", |
353 | text, | 353 | text, |
354 | GNUNET_IDENTITY_public_key_to_string ( | 354 | GNUNET_CRYPTO_public_key_to_string ( |
355 | &dsentry->delegation_chain_entry->issuer_key), | 355 | &dsentry->delegation_chain_entry->issuer_key), |
356 | dsentry->delegation_chain_entry->issuer_attribute, | 356 | dsentry->delegation_chain_entry->issuer_attribute, |
357 | GNUNET_IDENTITY_public_key_to_string ( | 357 | GNUNET_CRYPTO_public_key_to_string ( |
358 | &dsentry->delegation_chain_entry->subject_key), | 358 | &dsentry->delegation_chain_entry->subject_key), |
359 | dsentry->delegation_chain_entry->subject_attribute); | 359 | dsentry->delegation_chain_entry->subject_attribute); |
360 | } | 360 | } |
@@ -698,7 +698,7 @@ handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry, | |||
698 | { | 698 | { |
699 | if (0 != memcmp (&last_entry->delegation_chain_entry->subject_key, | 699 | if (0 != memcmp (&last_entry->delegation_chain_entry->subject_key, |
700 | &del_entry->delegate->issuer_key, | 700 | &del_entry->delegate->issuer_key, |
701 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 701 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
702 | continue; | 702 | continue; |
703 | if (0 != strcmp (last_entry->delegation_chain_entry->subject_attribute, | 703 | if (0 != strcmp (last_entry->delegation_chain_entry->subject_attribute, |
704 | del_entry->delegate->issuer_attribute)) | 704 | del_entry->delegate->issuer_attribute)) |
@@ -832,10 +832,10 @@ forward_resolution (void *cls, | |||
832 | { | 832 | { |
833 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 833 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
834 | "Entry not relevant, discarding: %s.%s <- %s.%s\n", | 834 | "Entry not relevant, discarding: %s.%s <- %s.%s\n", |
835 | GNUNET_IDENTITY_public_key_to_string ( | 835 | GNUNET_CRYPTO_public_key_to_string ( |
836 | &del->issuer_key), | 836 | &del->issuer_key), |
837 | del->issuer_attribute, | 837 | del->issuer_attribute, |
838 | GNUNET_IDENTITY_public_key_to_string ( | 838 | GNUNET_CRYPTO_public_key_to_string ( |
839 | &del->subject_key), | 839 | &del->subject_key), |
840 | del->subject_attribute); | 840 | del->subject_attribute); |
841 | GNUNET_free (del); | 841 | GNUNET_free (del); |
@@ -849,10 +849,10 @@ forward_resolution (void *cls, | |||
849 | 849 | ||
850 | // Start: Credential Chain Entry | 850 | // Start: Credential Chain Entry |
851 | // issuer key is subject key, who needs to be contacted to resolve this (forward, therefore subject) | 851 | // issuer key is subject key, who needs to be contacted to resolve this (forward, therefore subject) |
852 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); | 852 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey); |
853 | GNUNET_memcpy (ds_entry->issuer_key, | 853 | GNUNET_memcpy (ds_entry->issuer_key, |
854 | &del->subject_key, | 854 | &del->subject_key, |
855 | sizeof (struct GNUNET_IDENTITY_PublicKey)); | 855 | sizeof (struct GNUNET_CRYPTO_PublicKey)); |
856 | 856 | ||
857 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); | 857 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); |
858 | ds_entry->delegation_chain_entry->subject_key = del->subject_key; | 858 | ds_entry->delegation_chain_entry->subject_key = del->subject_key; |
@@ -873,7 +873,7 @@ forward_resolution (void *cls, | |||
873 | // if: issuer key we looking for | 873 | // if: issuer key we looking for |
874 | if (0 == memcmp (&del->issuer_key, | 874 | if (0 == memcmp (&del->issuer_key, |
875 | &vrh->issuer_key, | 875 | &vrh->issuer_key, |
876 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 876 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
877 | { | 877 | { |
878 | // if: issuer attr we looking for | 878 | // if: issuer attr we looking for |
879 | if (0 == strcmp (del->issuer_attribute, vrh->issuer_attribute)) | 879 | if (0 == strcmp (del->issuer_attribute, vrh->issuer_attribute)) |
@@ -904,7 +904,7 @@ forward_resolution (void *cls, | |||
904 | { | 904 | { |
905 | if (0 == memcmp (&del_entry->delegate->issuer_key, | 905 | if (0 == memcmp (&del_entry->delegate->issuer_key, |
906 | &vrh->delegation_chain_head->subject_key, | 906 | &vrh->delegation_chain_head->subject_key, |
907 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 907 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
908 | { | 908 | { |
909 | if (0 == strcmp (del_entry->delegate->issuer_attribute, | 909 | if (0 == strcmp (del_entry->delegate->issuer_attribute, |
910 | vrh->delegation_chain_head->subject_attribute)) | 910 | vrh->delegation_chain_head->subject_attribute)) |
@@ -932,7 +932,7 @@ forward_resolution (void *cls, | |||
932 | // key of list entry matches actual key | 932 | // key of list entry matches actual key |
933 | if (0 == memcmp (&del_entry->delegation_chain_entry->subject_key, | 933 | if (0 == memcmp (&del_entry->delegation_chain_entry->subject_key, |
934 | &ds_entry->delegation_chain_entry->issuer_key, | 934 | &ds_entry->delegation_chain_entry->issuer_key, |
935 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 935 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
936 | { | 936 | { |
937 | // compare entry subject attributes to this trailer (iss attr + old trailer) | 937 | // compare entry subject attributes to this trailer (iss attr + old trailer) |
938 | if (0 == strcmp (del_entry->unresolved_attribute_delegation, | 938 | if (0 == strcmp (del_entry->unresolved_attribute_delegation, |
@@ -962,7 +962,7 @@ forward_resolution (void *cls, | |||
962 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 962 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
963 | "Starting to look up trailer %s in zone %s\n", | 963 | "Starting to look up trailer %s in zone %s\n", |
964 | ds_entry->attr_trailer, | 964 | ds_entry->attr_trailer, |
965 | GNUNET_IDENTITY_public_key_to_string (&del->issuer_key)); | 965 | GNUNET_CRYPTO_public_key_to_string (&del->issuer_key)); |
966 | 966 | ||
967 | ds_entry->lookup_request = | 967 | ds_entry->lookup_request = |
968 | GNUNET_GNS_lookup (gns, | 968 | GNUNET_GNS_lookup (gns, |
@@ -1072,10 +1072,10 @@ backward_resolution (void *cls, | |||
1072 | ds_entry->delegation_chain_entry = | 1072 | ds_entry->delegation_chain_entry = |
1073 | GNUNET_new (struct DelegationChainEntry); | 1073 | GNUNET_new (struct DelegationChainEntry); |
1074 | ds_entry->delegation_chain_entry->subject_key = set[j].subject_key; | 1074 | ds_entry->delegation_chain_entry->subject_key = set[j].subject_key; |
1075 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); | 1075 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey); |
1076 | GNUNET_memcpy (ds_entry->issuer_key, | 1076 | GNUNET_memcpy (ds_entry->issuer_key, |
1077 | &set[j].subject_key, | 1077 | &set[j].subject_key, |
1078 | sizeof (struct GNUNET_IDENTITY_PublicKey)); | 1078 | sizeof (struct GNUNET_CRYPTO_PublicKey)); |
1079 | if (0 < set[j].subject_attribute_len) | 1079 | if (0 < set[j].subject_attribute_len) |
1080 | ds_entry->delegation_chain_entry->subject_attribute = | 1080 | ds_entry->delegation_chain_entry->subject_attribute = |
1081 | GNUNET_strdup (set[j].subject_attribute); | 1081 | GNUNET_strdup (set[j].subject_attribute); |
@@ -1099,7 +1099,7 @@ backward_resolution (void *cls, | |||
1099 | // If key and attribute match credential: continue and backtrack | 1099 | // If key and attribute match credential: continue and backtrack |
1100 | if (0 != memcmp (&set[j].subject_key, | 1100 | if (0 != memcmp (&set[j].subject_key, |
1101 | &del_pointer->delegate->issuer_key, | 1101 | &del_pointer->delegate->issuer_key, |
1102 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 1102 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
1103 | continue; | 1103 | continue; |
1104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1105 | "Checking if %s matches %s\n", | 1105 | "Checking if %s matches %s\n", |
@@ -1181,7 +1181,7 @@ backward_resolution (void *cls, | |||
1181 | // key of list entry matches actual key | 1181 | // key of list entry matches actual key |
1182 | if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key, | 1182 | if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key, |
1183 | &ds_entry->delegation_chain_entry->subject_key, | 1183 | &ds_entry->delegation_chain_entry->subject_key, |
1184 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 1184 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
1185 | { | 1185 | { |
1186 | // compare entry subject attributes to this trailer (iss attr + old trailer) | 1186 | // compare entry subject attributes to this trailer (iss attr + old trailer) |
1187 | if (0 == strcmp (del_entry->attr_trailer, | 1187 | if (0 == strcmp (del_entry->attr_trailer, |
@@ -1270,7 +1270,7 @@ delegation_chain_bw_resolution_start (void *cls) | |||
1270 | { | 1270 | { |
1271 | if (0 != memcmp (&del_entry->delegate->issuer_key, | 1271 | if (0 != memcmp (&del_entry->delegate->issuer_key, |
1272 | &vrh->issuer_key, | 1272 | &vrh->issuer_key, |
1273 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 1273 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
1274 | continue; | 1274 | continue; |
1275 | if (0 != | 1275 | if (0 != |
1276 | strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) | 1276 | strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) |
@@ -1292,10 +1292,10 @@ delegation_chain_bw_resolution_start (void *cls) | |||
1292 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); | 1292 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); |
1293 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | 1293 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); |
1294 | ds_entry->from_bw = true; | 1294 | ds_entry->from_bw = true; |
1295 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); | 1295 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey); |
1296 | GNUNET_memcpy (ds_entry->issuer_key, | 1296 | GNUNET_memcpy (ds_entry->issuer_key, |
1297 | &vrh->issuer_key, | 1297 | &vrh->issuer_key, |
1298 | sizeof (struct GNUNET_IDENTITY_PublicKey)); | 1298 | sizeof (struct GNUNET_CRYPTO_PublicKey)); |
1299 | ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); | 1299 | ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); |
1300 | 1300 | ||
1301 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); | 1301 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); |
@@ -1352,7 +1352,7 @@ delegation_chain_fw_resolution_start (void *cls) | |||
1352 | { | 1352 | { |
1353 | if (0 != memcmp (&del_entry->delegate->issuer_key, | 1353 | if (0 != memcmp (&del_entry->delegate->issuer_key, |
1354 | &vrh->issuer_key, | 1354 | &vrh->issuer_key, |
1355 | sizeof (struct GNUNET_IDENTITY_PublicKey))) | 1355 | sizeof (struct GNUNET_CRYPTO_PublicKey))) |
1356 | continue; | 1356 | continue; |
1357 | if (0 != | 1357 | if (0 != |
1358 | strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) | 1358 | strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) |
@@ -1374,17 +1374,17 @@ delegation_chain_fw_resolution_start (void *cls) | |||
1374 | 1374 | ||
1375 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1375 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1376 | "Looking for %s.%s\n", | 1376 | "Looking for %s.%s\n", |
1377 | GNUNET_IDENTITY_public_key_to_string ( | 1377 | GNUNET_CRYPTO_public_key_to_string ( |
1378 | &del_entry->delegate->issuer_key), | 1378 | &del_entry->delegate->issuer_key), |
1379 | del_entry->delegate->issuer_attribute); | 1379 | del_entry->delegate->issuer_attribute); |
1380 | 1380 | ||
1381 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); | 1381 | ds_entry = GNUNET_new (struct DelegationSetQueueEntry); |
1382 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); | 1382 | GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); |
1383 | ds_entry->from_bw = false; | 1383 | ds_entry->from_bw = false; |
1384 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey); | 1384 | ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_PublicKey); |
1385 | GNUNET_memcpy (ds_entry->issuer_key, | 1385 | GNUNET_memcpy (ds_entry->issuer_key, |
1386 | &del_entry->delegate->subject_key, | 1386 | &del_entry->delegate->subject_key, |
1387 | sizeof (struct GNUNET_IDENTITY_PublicKey)); | 1387 | sizeof (struct GNUNET_CRYPTO_PublicKey)); |
1388 | 1388 | ||
1389 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); | 1389 | ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); |
1390 | ds_entry->delegation_chain_entry->subject_key = | 1390 | ds_entry->delegation_chain_entry->subject_key = |
@@ -1588,7 +1588,7 @@ delegate_collection_finished (void *cls) | |||
1588 | 1588 | ||
1589 | static void | 1589 | static void |
1590 | handle_delegate_collection_cb (void *cls, | 1590 | handle_delegate_collection_cb (void *cls, |
1591 | const struct GNUNET_IDENTITY_PrivateKey *key, | 1591 | const struct GNUNET_CRYPTO_PrivateKey *key, |
1592 | const char *label, | 1592 | const char *label, |
1593 | unsigned int rd_count, | 1593 | unsigned int rd_count, |
1594 | const struct GNUNET_GNSRECORD_Data *rd) | 1594 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -1646,7 +1646,7 @@ handle_collect (void *cls, const struct CollectMessage *c_msg) | |||
1646 | vrh->client = client; | 1646 | vrh->client = client; |
1647 | vrh->request_id = c_msg->id; | 1647 | vrh->request_id = c_msg->id; |
1648 | vrh->issuer_key = c_msg->issuer_key; | 1648 | vrh->issuer_key = c_msg->issuer_key; |
1649 | GNUNET_IDENTITY_key_get_public (&c_msg->subject_key, &vrh->subject_key); | 1649 | GNUNET_CRYPTO_key_get_public (&c_msg->subject_key, &vrh->subject_key); |
1650 | vrh->issuer_attribute = GNUNET_strdup (issuer_attribute); | 1650 | vrh->issuer_attribute = GNUNET_strdup (issuer_attribute); |
1651 | vrh->resolution_algo = ntohs (c_msg->resolution_algo); | 1651 | vrh->resolution_algo = ntohs (c_msg->resolution_algo); |
1652 | 1652 | ||
diff --git a/src/abd/plugin_gnsrecord_abd.c b/src/abd/plugin_gnsrecord_abd.c index 7b2f4af5b..43abe578f 100644 --- a/src/abd/plugin_gnsrecord_abd.c +++ b/src/abd/plugin_gnsrecord_abd.c | |||
@@ -77,7 +77,7 @@ abd_value_to_string (void *cls, | |||
77 | for (i = 0; i < ntohl (sets.set_count); i++) | 77 | for (i = 0; i < ntohl (sets.set_count); i++) |
78 | { | 78 | { |
79 | subject_pkey = | 79 | subject_pkey = |
80 | GNUNET_IDENTITY_public_key_to_string (&set[i].subject_key); | 80 | GNUNET_CRYPTO_public_key_to_string (&set[i].subject_key); |
81 | 81 | ||
82 | if (0 == set[i].subject_attribute_len) | 82 | if (0 == set[i].subject_attribute_len) |
83 | { | 83 | { |
@@ -208,7 +208,7 @@ abd_string_to_value (void *cls, | |||
208 | 208 | ||
209 | // sets the public key for the set entry | 209 | // sets the public key for the set entry |
210 | if (GNUNET_SYSERR == | 210 | if (GNUNET_SYSERR == |
211 | GNUNET_IDENTITY_public_key_from_string (subject_pkey, | 211 | GNUNET_CRYPTO_public_key_from_string (subject_pkey, |
212 | &set[i].subject_key)) | 212 | &set[i].subject_key)) |
213 | { | 213 | { |
214 | GNUNET_free (tmp_str); | 214 | GNUNET_free (tmp_str); |