aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2021-12-03 22:27:46 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2021-12-03 22:27:46 +0100
commitf236a1f38867f7b5530e64f52502df750630a1bb (patch)
treeff2c3ae208c9d1a198472e2ab80227194c10df28
parent0d7bbcd3ab20cf6c259bc6fd3eb5b2c05e7f71d4 (diff)
downloadgnunet-f236a1f38867f7b5530e64f52502df750630a1bb.tar.gz
gnunet-f236a1f38867f7b5530e64f52502df750630a1bb.zip
ABD: Fix build
-rw-r--r--configure.ac1
-rw-r--r--po/POTFILES.in3
-rw-r--r--src/Makefile.am4
-rw-r--r--src/abd/Makefile.am4
-rw-r--r--src/abd/abd.h33
-rw-r--r--src/abd/abd_api.c8
-rw-r--r--src/abd/abd_serialization.c12
-rw-r--r--src/abd/delegate_misc.c34
-rw-r--r--src/abd/gnunet-abd.c58
-rw-r--r--src/abd/gnunet-service-abd.c58
-rw-r--r--src/abd/plugin_gnsrecord_abd.c7
-rwxr-xr-xsrc/abd/test_abd_bi_and.sh8
-rw-r--r--src/include/gnunet_abd_service.h28
13 files changed, 119 insertions, 139 deletions
diff --git a/configure.ac b/configure.ac
index 3e8d85eed..1e5ba403f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1436,6 +1436,7 @@ src/vpn/vpn.conf
1436src/zonemaster/Makefile 1436src/zonemaster/Makefile
1437src/zonemaster/zonemaster.conf 1437src/zonemaster/zonemaster.conf
1438src/rest/Makefile 1438src/rest/Makefile
1439src/abd/Makefile
1439src/abe/Makefile 1440src/abe/Makefile
1440src/reclaim/Makefile 1441src/reclaim/Makefile
1441src/messenger/Makefile 1442src/messenger/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 469b19219..60f758590 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -437,8 +437,6 @@ src/testing/testing_api_cmd_send_peer_ready.c
437src/testing/testing_api_cmd_system_create.c 437src/testing/testing_api_cmd_system_create.c
438src/testing/testing_api_cmd_system_destroy.c 438src/testing/testing_api_cmd_system_destroy.c
439src/testing/testing_api_loop.c 439src/testing/testing_api_loop.c
440src/testing/testing_api_trait_cmd.c
441src/testing/testing_api_trait_process.c
442src/testing/testing_api_traits.c 440src/testing/testing_api_traits.c
443src/topology/friends.c 441src/topology/friends.c
444src/topology/gnunet-daemon-topology.c 442src/topology/gnunet-daemon-topology.c
@@ -502,6 +500,7 @@ src/transport/transport_api_manipulation.c
502src/transport/transport_api_monitor_peers.c 500src/transport/transport_api_monitor_peers.c
503src/transport/transport_api_monitor_plugins.c 501src/transport/transport_api_monitor_plugins.c
504src/transport/transport_api_offer_hello.c 502src/transport/transport_api_offer_hello.c
503src/transport/transport_api_traits.c
505src/util/bandwidth.c 504src/util/bandwidth.c
506src/util/benchmark.c 505src/util/benchmark.c
507src/util/bio.c 506src/util/bio.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 31215c6d0..4c665c3b3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,8 +5,8 @@ TESTBED = testbed-logger testbed
5 5
6if HAVE_EXPERIMENTAL 6if HAVE_EXPERIMENTAL
7 EXP_DIR = \ 7 EXP_DIR = \
8 rps 8 rps \
9 #abd FTBFS 9 abd
10if HAVE_ABE 10if HAVE_ABE
11 EXP_DIR += \ 11 EXP_DIR += \
12 abe 12 abe
diff --git a/src/abd/Makefile.am b/src/abd/Makefile.am
index 34a0438f5..304469e22 100644
--- a/src/abd/Makefile.am
+++ b/src/abd/Makefile.am
@@ -75,7 +75,9 @@ libgnunetabd_la_SOURCES = \
75 delegate_misc.c \ 75 delegate_misc.c \
76 delegate_misc.h 76 delegate_misc.h
77libgnunetabd_la_LIBADD = \ 77libgnunetabd_la_LIBADD = \
78 $(top_builddir)/src/util/libgnunetutil.la $(XLIB) 78 $(top_builddir)/src/util/libgnunetutil.la \
79 $(top_builddir)/src/identity/libgnunetidentity.la \
80 $(XLIB)
79libgnunetabd_la_LDFLAGS = \ 81libgnunetabd_la_LDFLAGS = \
80 $(GN_LIB_LDFLAGS) 82 $(GN_LIB_LDFLAGS)
81 83
diff --git a/src/abd/abd.h b/src/abd/abd.h
index 0af0d43ca..296af71fe 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_CRYPTO_EcdsaPrivateKey subject_key; 45 struct GNUNET_IDENTITY_PrivateKey subject_key;
46 46
47 /** 47 /**
48 * Trust anchor 48 * Trust anchor
49 */ 49 */
50 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 50 struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPublicKey subject_key; 84 struct GNUNET_IDENTITY_PublicKey subject_key;
85 85
86 /** 86 /**
87 * Trust anchor 87 * Trust anchor
88 */ 88 */
89 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 89 struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPublicKey subject_key; 173 struct GNUNET_IDENTITY_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_CRYPTO_EcdsaPublicKey issuer_key; 187 struct GNUNET_IDENTITY_PublicKey issuer_key;
188 188
189 /** 189 /**
190 * Subject key 190 * Subject key
191 */ 191 */
192 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 192 struct GNUNET_IDENTITY_PublicKey subject_key;
193 193
194 /** 194 /**
195 * Issuer attributes 195 * Issuer attributes
@@ -209,7 +209,7 @@ struct CredentialEntry
209 /** 209 /**
210 * The signature for this credential by the issuer 210 * The signature for this credential by the issuer
211 */ 211 */
212 struct GNUNET_CRYPTO_EcdsaSignature signature; 212 struct GNUNET_IDENTITY_Signature signature;
213 213
214 /** 214 /**
215 * Signature meta 215 * Signature meta
@@ -219,12 +219,12 @@ struct CredentialEntry
219 /** 219 /**
220 * Public key of the issuer 220 * Public key of the issuer
221 */ 221 */
222 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 222 struct GNUNET_IDENTITY_PublicKey issuer_key;
223 223
224 /** 224 /**
225 * Public key of the subject this credential was issued to 225 * Public key of the subject this credential was issued to
226 */ 226 */
227 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 227 struct GNUNET_IDENTITY_PublicKey subject_key;
228 228
229 /** 229 /**
230 * Expiration time of this credential 230 * Expiration time of this credential
@@ -243,26 +243,25 @@ struct CredentialEntry
243 243
244struct DelegateEntry 244struct DelegateEntry
245{ 245{
246
247 /** 246 /**
248 * Signature meta 247 * The signature for this credential by the issuer
249 */ 248 */
250 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 249 struct GNUNET_IDENTITY_Signature signature;
251 250
252 /** 251 /**
253 * The signature for this credential by the issuer 252 * Signature meta
254 */ 253 */
255 struct GNUNET_CRYPTO_EcdsaSignature signature; 254 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
256 255
257 /** 256 /**
258 * Public key of the issuer 257 * Public key of the issuer
259 */ 258 */
260 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 259 struct GNUNET_IDENTITY_PublicKey issuer_key;
261 260
262 /** 261 /**
263 * Public key of the subject this credential was issued to 262 * Public key of the subject this credential was issued to
264 */ 263 */
265 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 264 struct GNUNET_IDENTITY_PublicKey subject_key;
266 265
267 /** 266 /**
268 * Expiration time of this credential 267 * Expiration time of this credential
diff --git a/src/abd/abd_api.c b/src/abd/abd_api.c
index cc25d06da..57f831e85 100644
--- a/src/abd/abd_api.c
+++ b/src/abd/abd_api.c
@@ -423,9 +423,9 @@ GNUNET_ABD_request_cancel (struct GNUNET_ABD_Request *lr)
423struct GNUNET_ABD_Request * 423struct GNUNET_ABD_Request *
424GNUNET_ABD_collect ( 424GNUNET_ABD_collect (
425 struct GNUNET_ABD_Handle *handle, 425 struct GNUNET_ABD_Handle *handle,
426 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key, 426 const struct GNUNET_IDENTITY_PublicKey *issuer_key,
427 const char *issuer_attribute, 427 const char *issuer_attribute,
428 const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key, 428 const struct GNUNET_IDENTITY_PrivateKey *subject_key,
429 enum GNUNET_ABD_AlgoDirectionFlags direction, 429 enum GNUNET_ABD_AlgoDirectionFlags direction,
430 GNUNET_ABD_CredentialResultProcessor proc, 430 GNUNET_ABD_CredentialResultProcessor proc,
431 void *proc_cls, 431 void *proc_cls,
@@ -497,9 +497,9 @@ GNUNET_ABD_collect (
497struct GNUNET_ABD_Request * 497struct GNUNET_ABD_Request *
498GNUNET_ABD_verify ( 498GNUNET_ABD_verify (
499 struct GNUNET_ABD_Handle *handle, 499 struct GNUNET_ABD_Handle *handle,
500 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key, 500 const struct GNUNET_IDENTITY_PublicKey *issuer_key,
501 const char *issuer_attribute, 501 const char *issuer_attribute,
502 const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key, 502 const struct GNUNET_IDENTITY_PublicKey *subject_key,
503 uint32_t delegate_count, 503 uint32_t delegate_count,
504 const struct GNUNET_ABD_Delegate *delegates, 504 const struct GNUNET_ABD_Delegate *delegates,
505 enum GNUNET_ABD_AlgoDirectionFlags direction, 505 enum GNUNET_ABD_AlgoDirectionFlags direction,
diff --git a/src/abd/abd_serialization.c b/src/abd/abd_serialization.c
index c03fab7dc..4c219d791 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_CRYPTO_EcdsaSignature)); 202 - sizeof (struct GNUNET_IDENTITY_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,13 +445,13 @@ 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_CRYPTO_EcdsaSignature)); 448 htonl (size - sizeof (struct GNUNET_IDENTITY_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_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_DELEGATE, 453 GNUNET_IDENTITY_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_DELEGATE,
454 cdata, 454 &cdata->purpose,
455 &cdata->signature, 455 &cdata->signature,
456 &cdata->issuer_key)) 456 &cdata->issuer_key))
457 { 457 {
@@ -473,8 +473,8 @@ 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_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_DELEGATE, 476 GNUNET_IDENTITY_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_DELEGATE,
477 cdata, 477 &cdata->purpose,
478 &cdata->signature, 478 &cdata->signature,
479 &cdata->issuer_key)) 479 &cdata->issuer_key))
480 { 480 {
diff --git a/src/abd/delegate_misc.c b/src/abd/delegate_misc.c
index 4740a3e30..d67b40088 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_CRYPTO_ecdsa_public_key_to_string (&cred->subject_key); 45 subject_pkey = GNUNET_IDENTITY_public_key_to_string (&cred->subject_key);
46 issuer_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&cred->issuer_key); 46 issuer_pkey = GNUNET_IDENTITY_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_CRYPTO_EcdsaSignature), 48 sizeof (struct GNUNET_IDENTITY_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 *
80GNUNET_ABD_delegate_from_string (const char *s) 80GNUNET_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_CRYPTO_EcdsaPublicKey)) * 8; 83 size_t enclen = (sizeof (struct GNUNET_IDENTITY_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,12 +91,12 @@ 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_CRYPTO_EcdsaSignature *sig; 94 struct GNUNET_IDENTITY_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...
98 if (6 != sscanf (s, 98 if (6 != sscanf (s,
99 "%52s.%253s -> %52s.%253s | %s | %" SCNu64, 99 "%58s.%253s -> %58s.%253s | %s | %" SCNu64,
100 issuer_pkey, 100 issuer_pkey,
101 iss_attr, 101 iss_attr,
102 subject_pkey, 102 subject_pkey,
@@ -106,7 +106,7 @@ GNUNET_ABD_delegate_from_string (const char *s)
106 { 106 {
107 // Try if it's A.a <- B 107 // Try if it's A.a <- B
108 if (5 != sscanf (s, 108 if (5 != sscanf (s,
109 "%52s.%253s -> %52s | %s | %" SCNu64, 109 "%58s.%253s -> %58s | %s | %" SCNu64,
110 issuer_pkey, 110 issuer_pkey,
111 iss_attr, 111 iss_attr,
112 subject_pkey, 112 subject_pkey,
@@ -143,13 +143,11 @@ GNUNET_ABD_delegate_from_string (const char *s)
143 } 143 }
144 tmp_str[attr_len - 1] = '\0'; 144 tmp_str[attr_len - 1] = '\0';
145 145
146 GNUNET_CRYPTO_ecdsa_public_key_from_string (subject_pkey, 146 GNUNET_IDENTITY_public_key_from_string (subject_pkey,
147 strlen (subject_pkey),
148 &dele->subject_key); 147 &dele->subject_key);
149 GNUNET_CRYPTO_ecdsa_public_key_from_string (issuer_pkey, 148 GNUNET_IDENTITY_public_key_from_string (issuer_pkey,
150 strlen (issuer_pkey),
151 &dele->issuer_key); 149 &dele->issuer_key);
152 GNUNET_assert (sizeof (struct GNUNET_CRYPTO_EcdsaSignature) == 150 GNUNET_assert (sizeof (struct GNUNET_IDENTITY_Signature) ==
153 GNUNET_STRINGS_base64_decode (signature, 151 GNUNET_STRINGS_base64_decode (signature,
154 strlen (signature), 152 strlen (signature),
155 (void **) &sig)); 153 (void **) &sig));
@@ -187,8 +185,8 @@ GNUNET_ABD_delegate_from_string (const char *s)
187 185
188struct GNUNET_ABD_Delegate * 186struct GNUNET_ABD_Delegate *
189GNUNET_ABD_delegate_issue ( 187GNUNET_ABD_delegate_issue (
190 const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, 188 const struct GNUNET_IDENTITY_PrivateKey *issuer,
191 struct GNUNET_CRYPTO_EcdsaPublicKey *subject, 189 struct GNUNET_IDENTITY_PublicKey *subject,
192 const char *iss_attr, 190 const char *iss_attr,
193 const char *sub_attr, 191 const char *sub_attr,
194 struct GNUNET_TIME_Absolute *expiration) 192 struct GNUNET_TIME_Absolute *expiration)
@@ -223,9 +221,9 @@ GNUNET_ABD_delegate_issue (
223 221
224 del = GNUNET_malloc (size); 222 del = GNUNET_malloc (size);
225 del->purpose.size = 223 del->purpose.size =
226 htonl (size - sizeof (struct GNUNET_CRYPTO_EcdsaSignature)); 224 htonl (size - sizeof (struct GNUNET_IDENTITY_Signature));
227 del->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE); 225 del->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE);
228 GNUNET_CRYPTO_ecdsa_key_get_public (issuer, &del->issuer_key); 226 GNUNET_IDENTITY_key_get_public (issuer, &del->issuer_key);
229 del->subject_key = *subject; 227 del->subject_key = *subject;
230 del->expiration = GNUNET_htonll (expiration->abs_value_us); 228 del->expiration = GNUNET_htonll (expiration->abs_value_us);
231 del->issuer_attribute_len = htonl (strlen (iss_attr) + 1); 229 del->issuer_attribute_len = htonl (strlen (iss_attr) + 1);
@@ -240,12 +238,12 @@ GNUNET_ABD_delegate_issue (
240 238
241 GNUNET_memcpy (&del[1], tmp_str, attr_len); 239 GNUNET_memcpy (&del[1], tmp_str, attr_len);
242 240
243 GNUNET_CRYPTO_ecdsa_sign (issuer, del, &del->signature); 241 GNUNET_IDENTITY_sign_ (issuer, &del->purpose, &del->signature);
244 242
245 dele = GNUNET_malloc (sizeof (struct GNUNET_ABD_Delegate) + attr_len); 243 dele = GNUNET_malloc (sizeof (struct GNUNET_ABD_Delegate) + attr_len);
246 dele->signature = del->signature; 244 dele->signature = del->signature;
247 dele->expiration = *expiration; 245 dele->expiration = *expiration;
248 GNUNET_CRYPTO_ecdsa_key_get_public (issuer, &dele->issuer_key); 246 GNUNET_IDENTITY_key_get_public (issuer, &dele->issuer_key);
249 247
250 dele->subject_key = *subject; 248 dele->subject_key = *subject;
251 249
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c
index b1fb767e3..17671273c 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 */
46static struct GNUNET_CRYPTO_EcdsaPrivateKey zone_pkey; 46static struct GNUNET_IDENTITY_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 */
101struct GNUNET_CRYPTO_EcdsaPublicKey subject_pkey; 101struct GNUNET_IDENTITY_PublicKey subject_pkey;
102 102
103/** 103/**
104 * Issuer key 104 * Issuer key
105 */ 105 */
106struct GNUNET_CRYPTO_EcdsaPublicKey issuer_pkey; 106struct GNUNET_IDENTITY_PublicKey issuer_pkey;
107 107
108 108
109/** 109/**
@@ -206,11 +206,6 @@ static uint64_t etime;
206static int etime_is_rel = GNUNET_SYSERR; 206static int etime_is_rel = GNUNET_SYSERR;
207 207
208/** 208/**
209 * Fixed size of the public/private keys
210 */
211static const int key_length = 52;
212
213/**
214 * Record label for storing delegations 209 * Record label for storing delegations
215 */ 210 */
216static char *record_label; 211static char *record_label;
@@ -282,9 +277,9 @@ handle_intermediate_result (void *cls,
282 277
283 printf ("%s Intermediate result: %s.%s <- %s.%s\n", 278 printf ("%s Intermediate result: %s.%s <- %s.%s\n",
284 prefix, 279 prefix,
285 GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->issuer_key), 280 GNUNET_IDENTITY_public_key_to_string (&dd->issuer_key),
286 dd->issuer_attribute, 281 dd->issuer_attribute,
287 GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->subject_key), 282 GNUNET_IDENTITY_public_key_to_string (&dd->subject_key),
288 dd->subject_attribute); 283 dd->subject_attribute);
289} 284}
290 285
@@ -337,8 +332,8 @@ handle_verify_result (void *cls,
337 printf ("Delegation Chain:\n"); 332 printf ("Delegation Chain:\n");
338 for (i = 0; i < d_count; i++) 333 for (i = 0; i < d_count; i++)
339 { 334 {
340 iss_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dc[i].issuer_key); 335 iss_key = GNUNET_IDENTITY_public_key_to_string (&dc[i].issuer_key);
341 sub_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dc[i].subject_key); 336 sub_key = GNUNET_IDENTITY_public_key_to_string (&dc[i].subject_key);
342 337
343 if (0 != dc[i].subject_attribute_len) 338 if (0 != dc[i].subject_attribute_len)
344 { 339 {
@@ -363,8 +358,8 @@ handle_verify_result (void *cls,
363 printf ("\nDelegate(s):\n"); 358 printf ("\nDelegate(s):\n");
364 for (i = 0; i < c_count; i++) 359 for (i = 0; i < c_count; i++)
365 { 360 {
366 iss_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dele[i].issuer_key); 361 iss_key = GNUNET_IDENTITY_public_key_to_string (&dele[i].issuer_key);
367 sub_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dele[i].subject_key); 362 sub_key = GNUNET_IDENTITY_public_key_to_string (&dele[i].subject_key);
368 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);
369 GNUNET_free (iss_key); 364 GNUNET_free (iss_key);
370 GNUNET_free (sub_key); 365 GNUNET_free (sub_key);
@@ -386,7 +381,7 @@ handle_verify_result (void *cls,
386static void 381static void
387identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) 382identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
388{ 383{
389 const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; 384 const struct GNUNET_IDENTITY_PrivateKey *privkey;
390 385
391 el = NULL; 386 el = NULL;
392 if (NULL == ego) 387 if (NULL == ego)
@@ -405,8 +400,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
405 { 400 {
406 401
407 if (GNUNET_OK != 402 if (GNUNET_OK !=
408 GNUNET_CRYPTO_ecdsa_public_key_from_string (issuer_key, 403 GNUNET_IDENTITY_public_key_from_string (issuer_key,
409 strlen (issuer_key),
410 &issuer_pkey)) 404 &issuer_pkey))
411 { 405 {
412 fprintf (stderr, 406 fprintf (stderr,
@@ -507,7 +501,7 @@ add_continuation (void *cls, int32_t success, const char *emsg)
507 501
508static void 502static void
509get_existing_record (void *cls, 503get_existing_record (void *cls,
510 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, 504 const struct GNUNET_IDENTITY_PrivateKey *zone_key,
511 const char *rec_name, 505 const char *rec_name,
512 unsigned int rd_count, 506 unsigned int rd_count,
513 const struct GNUNET_GNSRECORD_Data *rd) 507 const struct GNUNET_GNSRECORD_Data *rd)
@@ -573,13 +567,13 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
573 567
574 // Get import subject public key string 568 // Get import subject public key string
575 char *subject_pubkey_str = 569 char *subject_pubkey_str =
576 GNUNET_CRYPTO_ecdsa_public_key_to_string (&cred->subject_key); 570 GNUNET_IDENTITY_public_key_to_string (&cred->subject_key);
577 571
578 // Get zone public key string 572 // Get zone public key string
579 struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey; 573 struct GNUNET_IDENTITY_PublicKey zone_pubkey;
580 GNUNET_IDENTITY_ego_get_public_key (ego, &zone_pubkey); 574 GNUNET_IDENTITY_ego_get_public_key (ego, &zone_pubkey);
581 char *zone_pubkey_str = 575 char *zone_pubkey_str =
582 GNUNET_CRYPTO_ecdsa_public_key_to_string (&zone_pubkey); 576 GNUNET_IDENTITY_public_key_to_string (&zone_pubkey);
583 577
584 // Check if the subject key in the signed import matches the zone's key it is issued to 578 // Check if the subject key in the signed import matches the zone's key it is issued to
585 if (strcmp (zone_pubkey_str, subject_pubkey_str) != 0) 579 if (strcmp (zone_pubkey_str, subject_pubkey_str) != 0)
@@ -655,7 +649,7 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
655static void 649static void
656sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) 650sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
657{ 651{
658 const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; 652 const struct GNUNET_IDENTITY_PrivateKey *privkey;
659 struct GNUNET_ABD_Delegate *dele; 653 struct GNUNET_ABD_Delegate *dele;
660 struct GNUNET_TIME_Absolute etime_abs; 654 struct GNUNET_TIME_Absolute etime_abs;
661 char *res; 655 char *res;
@@ -686,16 +680,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
686 680
687 // Subject Public Key 681 // Subject Public Key
688 token = strtok (subject, " "); 682 token = strtok (subject, " ");
689 if (key_length == strlen (token)) 683 subject_pubkey_str = token;
690 {
691 subject_pubkey_str = token;
692 }
693 else
694 {
695 fprintf (stderr, "Key error, wrong length: %ld!\n", strlen (token));
696 GNUNET_SCHEDULER_shutdown ();
697 return;
698 }
699 // Subject Attribute(s) 684 // Subject Attribute(s)
700 token = strtok (NULL, " "); 685 token = strtok (NULL, " ");
701 if (NULL != token) 686 if (NULL != token)
@@ -707,8 +692,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
707 privkey = GNUNET_IDENTITY_ego_get_private_key (ego); 692 privkey = GNUNET_IDENTITY_ego_get_private_key (ego);
708 693
709 if (GNUNET_OK != 694 if (GNUNET_OK !=
710 GNUNET_CRYPTO_ecdsa_public_key_from_string (subject_pubkey_str, 695 GNUNET_IDENTITY_public_key_from_string (subject_pubkey_str,
711 strlen (subject_pubkey_str),
712 &subject_pkey)) 696 &subject_pkey))
713 { 697 {
714 fprintf (stderr, 698 fprintf (stderr,
@@ -873,8 +857,7 @@ run (void *cls,
873 GNUNET_SCHEDULER_shutdown (); 857 GNUNET_SCHEDULER_shutdown ();
874 return; 858 return;
875 } 859 }
876 if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_public_key_from_string (subject, 860 if (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (subject,
877 strlen (subject),
878 &subject_pkey)) 861 &subject_pkey))
879 { 862 {
880 fprintf (stderr, 863 fprintf (stderr,
@@ -893,8 +876,7 @@ run (void *cls,
893 return; 876 return;
894 } 877 }
895 if (GNUNET_OK != 878 if (GNUNET_OK !=
896 GNUNET_CRYPTO_ecdsa_public_key_from_string (issuer_key, 879 GNUNET_IDENTITY_public_key_from_string (issuer_key,
897 strlen (issuer_key),
898 &issuer_pkey)) 880 &issuer_pkey))
899 { 881 {
900 fprintf (stderr, 882 fprintf (stderr,
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c
index 93368da45..3f9f2f924 100644
--- a/src/abd/gnunet-service-abd.c
+++ b/src/abd/gnunet-service-abd.c
@@ -61,12 +61,12 @@ struct DelegationChainEntry
61 /** 61 /**
62 * The issuer 62 * The issuer
63 */ 63 */
64 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 64 struct GNUNET_IDENTITY_PublicKey issuer_key;
65 65
66 /** 66 /**
67 * The subject 67 * The subject
68 */ 68 */
69 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 69 struct GNUNET_IDENTITY_PublicKey subject_key;
70 70
71 /** 71 /**
72 * The issued attribute 72 * The issued attribute
@@ -166,7 +166,7 @@ struct DelegationSetQueueEntry
166 /** 166 /**
167 * Issuer key 167 * Issuer key
168 */ 168 */
169 struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key; 169 struct GNUNET_IDENTITY_PublicKey *issuer_key;
170 170
171 /** 171 /**
172 * Queue entries of this set 172 * Queue entries of this set
@@ -267,7 +267,7 @@ struct VerifyRequestHandle
267 /** 267 /**
268 * Issuer public key 268 * Issuer public key
269 */ 269 */
270 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 270 struct GNUNET_IDENTITY_PublicKey issuer_key;
271 271
272 /** 272 /**
273 * Issuer attribute 273 * Issuer attribute
@@ -277,7 +277,7 @@ struct VerifyRequestHandle
277 /** 277 /**
278 * Subject public key 278 * Subject public key
279 */ 279 */
280 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 280 struct GNUNET_IDENTITY_PublicKey subject_key;
281 281
282 /** 282 /**
283 * Delegate DLL 283 * Delegate DLL
@@ -352,10 +352,10 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text)
352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
353 "%s %s.%s <- %s.%s\n", 353 "%s %s.%s <- %s.%s\n",
354 text, 354 text,
355 GNUNET_CRYPTO_ecdsa_public_key_to_string ( 355 GNUNET_IDENTITY_public_key_to_string (
356 &dsentry->delegation_chain_entry->issuer_key), 356 &dsentry->delegation_chain_entry->issuer_key),
357 dsentry->delegation_chain_entry->issuer_attribute, 357 dsentry->delegation_chain_entry->issuer_attribute,
358 GNUNET_CRYPTO_ecdsa_public_key_to_string ( 358 GNUNET_IDENTITY_public_key_to_string (
359 &dsentry->delegation_chain_entry->subject_key), 359 &dsentry->delegation_chain_entry->subject_key),
360 dsentry->delegation_chain_entry->subject_attribute); 360 dsentry->delegation_chain_entry->subject_attribute);
361} 361}
@@ -697,7 +697,7 @@ handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry,
697 { 697 {
698 if (0 != memcmp (&last_entry->delegation_chain_entry->subject_key, 698 if (0 != memcmp (&last_entry->delegation_chain_entry->subject_key,
699 &del_entry->delegate->issuer_key, 699 &del_entry->delegate->issuer_key,
700 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 700 sizeof (struct GNUNET_IDENTITY_PublicKey)))
701 continue; 701 continue;
702 if (0 != strcmp (last_entry->delegation_chain_entry->subject_attribute, 702 if (0 != strcmp (last_entry->delegation_chain_entry->subject_attribute,
703 del_entry->delegate->issuer_attribute)) 703 del_entry->delegate->issuer_attribute))
@@ -828,10 +828,10 @@ forward_resolution (void *cls,
828 { 828 {
829 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 829 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
830 "Entry not relevant, discarding: %s.%s <- %s.%s\n", 830 "Entry not relevant, discarding: %s.%s <- %s.%s\n",
831 GNUNET_CRYPTO_ecdsa_public_key_to_string ( 831 GNUNET_IDENTITY_public_key_to_string (
832 &del->issuer_key), 832 &del->issuer_key),
833 del->issuer_attribute, 833 del->issuer_attribute,
834 GNUNET_CRYPTO_ecdsa_public_key_to_string ( 834 GNUNET_IDENTITY_public_key_to_string (
835 &del->subject_key), 835 &del->subject_key),
836 del->subject_attribute); 836 del->subject_attribute);
837 continue; 837 continue;
@@ -844,10 +844,10 @@ forward_resolution (void *cls,
844 844
845 // Start: Credential Chain Entry 845 // Start: Credential Chain Entry
846 // issuer key is subject key, who needs to be contacted to resolve this (forward, therefore subject) 846 // issuer key is subject key, who needs to be contacted to resolve this (forward, therefore subject)
847 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); 847 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey);
848 GNUNET_memcpy (ds_entry->issuer_key, 848 GNUNET_memcpy (ds_entry->issuer_key,
849 &del->subject_key, 849 &del->subject_key,
850 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); 850 sizeof (struct GNUNET_IDENTITY_PublicKey));
851 851
852 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); 852 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
853 ds_entry->delegation_chain_entry->subject_key = del->subject_key; 853 ds_entry->delegation_chain_entry->subject_key = del->subject_key;
@@ -868,7 +868,7 @@ forward_resolution (void *cls,
868 // if: issuer key we looking for 868 // if: issuer key we looking for
869 if (0 == memcmp (&del->issuer_key, 869 if (0 == memcmp (&del->issuer_key,
870 &vrh->issuer_key, 870 &vrh->issuer_key,
871 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 871 sizeof (struct GNUNET_IDENTITY_PublicKey)))
872 { 872 {
873 // if: issuer attr we looking for 873 // if: issuer attr we looking for
874 if (0 == strcmp (del->issuer_attribute, vrh->issuer_attribute)) 874 if (0 == strcmp (del->issuer_attribute, vrh->issuer_attribute))
@@ -899,7 +899,7 @@ forward_resolution (void *cls,
899 { 899 {
900 if (0 == memcmp (&del_entry->delegate->issuer_key, 900 if (0 == memcmp (&del_entry->delegate->issuer_key,
901 &vrh->delegation_chain_head->subject_key, 901 &vrh->delegation_chain_head->subject_key,
902 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 902 sizeof (struct GNUNET_IDENTITY_PublicKey)))
903 { 903 {
904 if (0 == strcmp (del_entry->delegate->issuer_attribute, 904 if (0 == strcmp (del_entry->delegate->issuer_attribute,
905 vrh->delegation_chain_head->subject_attribute)) 905 vrh->delegation_chain_head->subject_attribute))
@@ -926,7 +926,7 @@ forward_resolution (void *cls,
926 // key of list entry matches actual key 926 // key of list entry matches actual key
927 if (0 == memcmp (&del_entry->delegation_chain_entry->subject_key, 927 if (0 == memcmp (&del_entry->delegation_chain_entry->subject_key,
928 &ds_entry->delegation_chain_entry->issuer_key, 928 &ds_entry->delegation_chain_entry->issuer_key,
929 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 929 sizeof (struct GNUNET_IDENTITY_PublicKey)))
930 { 930 {
931 // compare entry subject attributes to this trailer (iss attr + old trailer) 931 // compare entry subject attributes to this trailer (iss attr + old trailer)
932 if (0 == strcmp (del_entry->unresolved_attribute_delegation, 932 if (0 == strcmp (del_entry->unresolved_attribute_delegation,
@@ -955,7 +955,7 @@ forward_resolution (void *cls,
955 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 955 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
956 "Starting to look up trailer %s in zone %s\n", 956 "Starting to look up trailer %s in zone %s\n",
957 ds_entry->attr_trailer, 957 ds_entry->attr_trailer,
958 GNUNET_CRYPTO_ecdsa_public_key_to_string (&del->issuer_key)); 958 GNUNET_IDENTITY_public_key_to_string (&del->issuer_key));
959 959
960 ds_entry->lookup_request = 960 ds_entry->lookup_request =
961 GNUNET_GNS_lookup (gns, 961 GNUNET_GNS_lookup (gns,
@@ -1064,10 +1064,10 @@ backward_resolution (void *cls,
1064 ds_entry->delegation_chain_entry = 1064 ds_entry->delegation_chain_entry =
1065 GNUNET_new (struct DelegationChainEntry); 1065 GNUNET_new (struct DelegationChainEntry);
1066 ds_entry->delegation_chain_entry->subject_key = set[j].subject_key; 1066 ds_entry->delegation_chain_entry->subject_key = set[j].subject_key;
1067 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); 1067 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey);
1068 GNUNET_memcpy (ds_entry->issuer_key, 1068 GNUNET_memcpy (ds_entry->issuer_key,
1069 &set[j].subject_key, 1069 &set[j].subject_key,
1070 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); 1070 sizeof (struct GNUNET_IDENTITY_PublicKey));
1071 if (0 < set[j].subject_attribute_len) 1071 if (0 < set[j].subject_attribute_len)
1072 ds_entry->delegation_chain_entry->subject_attribute = 1072 ds_entry->delegation_chain_entry->subject_attribute =
1073 GNUNET_strdup (set[j].subject_attribute); 1073 GNUNET_strdup (set[j].subject_attribute);
@@ -1091,7 +1091,7 @@ backward_resolution (void *cls,
1091 // If key and attribute match credential: continue and backtrack 1091 // If key and attribute match credential: continue and backtrack
1092 if (0 != memcmp (&set[j].subject_key, 1092 if (0 != memcmp (&set[j].subject_key,
1093 &del_pointer->delegate->issuer_key, 1093 &del_pointer->delegate->issuer_key,
1094 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 1094 sizeof (struct GNUNET_IDENTITY_PublicKey)))
1095 continue; 1095 continue;
1096 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1096 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1097 "Checking if %s matches %s\n", 1097 "Checking if %s matches %s\n",
@@ -1173,7 +1173,7 @@ backward_resolution (void *cls,
1173 // key of list entry matches actual key 1173 // key of list entry matches actual key
1174 if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key, 1174 if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key,
1175 &ds_entry->delegation_chain_entry->subject_key, 1175 &ds_entry->delegation_chain_entry->subject_key,
1176 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 1176 sizeof (struct GNUNET_IDENTITY_PublicKey)))
1177 { 1177 {
1178 // compare entry subject attributes to this trailer (iss attr + old trailer) 1178 // compare entry subject attributes to this trailer (iss attr + old trailer)
1179 if (0 == strcmp (del_entry->attr_trailer, 1179 if (0 == strcmp (del_entry->attr_trailer,
@@ -1262,7 +1262,7 @@ delegation_chain_bw_resolution_start (void *cls)
1262 { 1262 {
1263 if (0 != memcmp (&del_entry->delegate->issuer_key, 1263 if (0 != memcmp (&del_entry->delegate->issuer_key,
1264 &vrh->issuer_key, 1264 &vrh->issuer_key,
1265 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 1265 sizeof (struct GNUNET_IDENTITY_PublicKey)))
1266 continue; 1266 continue;
1267 if (0 != 1267 if (0 !=
1268 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) 1268 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute))
@@ -1284,10 +1284,10 @@ delegation_chain_bw_resolution_start (void *cls)
1284 ds_entry = GNUNET_new (struct DelegationSetQueueEntry); 1284 ds_entry = GNUNET_new (struct DelegationSetQueueEntry);
1285 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); 1285 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry);
1286 ds_entry->from_bw = true; 1286 ds_entry->from_bw = true;
1287 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); 1287 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey);
1288 GNUNET_memcpy (ds_entry->issuer_key, 1288 GNUNET_memcpy (ds_entry->issuer_key,
1289 &vrh->issuer_key, 1289 &vrh->issuer_key,
1290 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); 1290 sizeof (struct GNUNET_IDENTITY_PublicKey));
1291 ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); 1291 ds_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute);
1292 1292
1293 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); 1293 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
@@ -1344,7 +1344,7 @@ delegation_chain_fw_resolution_start (void *cls)
1344 { 1344 {
1345 if (0 != memcmp (&del_entry->delegate->issuer_key, 1345 if (0 != memcmp (&del_entry->delegate->issuer_key,
1346 &vrh->issuer_key, 1346 &vrh->issuer_key,
1347 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) 1347 sizeof (struct GNUNET_IDENTITY_PublicKey)))
1348 continue; 1348 continue;
1349 if (0 != 1349 if (0 !=
1350 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute)) 1350 strcmp (del_entry->delegate->issuer_attribute, vrh->issuer_attribute))
@@ -1366,17 +1366,17 @@ delegation_chain_fw_resolution_start (void *cls)
1366 1366
1367 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1367 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1368 "Looking for %s.%s\n", 1368 "Looking for %s.%s\n",
1369 GNUNET_CRYPTO_ecdsa_public_key_to_string ( 1369 GNUNET_IDENTITY_public_key_to_string (
1370 &del_entry->delegate->issuer_key), 1370 &del_entry->delegate->issuer_key),
1371 del_entry->delegate->issuer_attribute); 1371 del_entry->delegate->issuer_attribute);
1372 1372
1373 ds_entry = GNUNET_new (struct DelegationSetQueueEntry); 1373 ds_entry = GNUNET_new (struct DelegationSetQueueEntry);
1374 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry); 1374 GNUNET_CONTAINER_DLL_insert (vrh->dsq_head, vrh->dsq_tail, ds_entry);
1375 ds_entry->from_bw = false; 1375 ds_entry->from_bw = false;
1376 ds_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); 1376 ds_entry->issuer_key = GNUNET_new (struct GNUNET_IDENTITY_PublicKey);
1377 GNUNET_memcpy (ds_entry->issuer_key, 1377 GNUNET_memcpy (ds_entry->issuer_key,
1378 &del_entry->delegate->subject_key, 1378 &del_entry->delegate->subject_key,
1379 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); 1379 sizeof (struct GNUNET_IDENTITY_PublicKey));
1380 1380
1381 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry); 1381 ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
1382 ds_entry->delegation_chain_entry->subject_key = 1382 ds_entry->delegation_chain_entry->subject_key =
@@ -1580,7 +1580,7 @@ delegate_collection_finished (void *cls)
1580 1580
1581static void 1581static void
1582handle_delegate_collection_cb (void *cls, 1582handle_delegate_collection_cb (void *cls,
1583 const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, 1583 const struct GNUNET_IDENTITY_PrivateKey *key,
1584 const char *label, 1584 const char *label,
1585 unsigned int rd_count, 1585 unsigned int rd_count,
1586 const struct GNUNET_GNSRECORD_Data *rd) 1586 const struct GNUNET_GNSRECORD_Data *rd)
@@ -1643,7 +1643,7 @@ handle_collect (void *cls, const struct CollectMessage *c_msg)
1643 vrh->client = client; 1643 vrh->client = client;
1644 vrh->request_id = c_msg->id; 1644 vrh->request_id = c_msg->id;
1645 vrh->issuer_key = c_msg->issuer_key; 1645 vrh->issuer_key = c_msg->issuer_key;
1646 GNUNET_CRYPTO_ecdsa_key_get_public (&c_msg->subject_key, &vrh->subject_key); 1646 GNUNET_IDENTITY_key_get_public (&c_msg->subject_key, &vrh->subject_key);
1647 vrh->issuer_attribute = GNUNET_strdup (issuer_attribute); 1647 vrh->issuer_attribute = GNUNET_strdup (issuer_attribute);
1648 vrh->resolution_algo = ntohs (c_msg->resolution_algo); 1648 vrh->resolution_algo = ntohs (c_msg->resolution_algo);
1649 1649
diff --git a/src/abd/plugin_gnsrecord_abd.c b/src/abd/plugin_gnsrecord_abd.c
index 25dc20152..24cf6a3aa 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_CRYPTO_ecdsa_public_key_to_string (&set[i].subject_key); 80 GNUNET_IDENTITY_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 {
@@ -158,7 +158,7 @@ abd_string_to_value (void *cls,
158 { 158 {
159 struct GNUNET_ABD_DelegationRecord *sets; 159 struct GNUNET_ABD_DelegationRecord *sets;
160 char attr_str[253 + 1]; 160 char attr_str[253 + 1];
161 char subject_pkey[52 + 1]; 161 char subject_pkey[58 + 1];
162 char *token; 162 char *token;
163 char *tmp_str; 163 char *tmp_str;
164 int matches = 0; 164 int matches = 0;
@@ -207,8 +207,7 @@ abd_string_to_value (void *cls,
207 matches = sscanf (token, "%s %s", subject_pkey, attr_str); 207 matches = sscanf (token, "%s %s", subject_pkey, attr_str);
208 208
209 // sets the public key for the set entry 209 // sets the public key for the set entry
210 GNUNET_CRYPTO_ecdsa_public_key_from_string (subject_pkey, 210 GNUNET_IDENTITY_public_key_from_string (subject_pkey,
211 strlen (subject_pkey),
212 &set[i].subject_key); 211 &set[i].subject_key);
213 212
214 // If not just key, also set subject attribute (Not A.a <- B but A.a <- B.b) 213 // If not just key, also set subject attribute (Not A.a <- B but A.a <- B.b)
diff --git a/src/abd/test_abd_bi_and.sh b/src/abd/test_abd_bi_and.sh
index b32313636..99c89a344 100755
--- a/src/abd/test_abd_bi_and.sh
+++ b/src/abd/test_abd_bi_and.sh
@@ -55,16 +55,16 @@ gnunet-namestore -D -z b
55gnunet-abd --createIssuerSide --ego=g --attribute="g" --subject="$HKEY h" --ttl=5m -c test_abd_lookup.conf 55gnunet-abd --createIssuerSide --ego=g --attribute="g" --subject="$HKEY h" --ttl=5m -c test_abd_lookup.conf
56gnunet-namestore -D -z b 56gnunet-namestore -D -z b
57 57
58SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2019-12-12 10:00:00"` 58SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=c --attribute="c" --subject="$DKEY d" --ttl="2049-12-12 10:00:00"`
59gnunet-abd --createSubjectSide --ego=d --import="$SIGNED" 59gnunet-abd --createSubjectSide --ego=d --import="$SIGNED"
60gnunet-namestore -D -z d 60gnunet-namestore -D -z d
61SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2019-12-12 10:00:00"` 61SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=d --attribute="d" --subject="$EKEY e" --ttl="2049-12-12 10:00:00"`
62gnunet-abd --createSubjectSide --ego=e --import="$SIGNED" 62gnunet-abd --createSubjectSide --ego=e --import="$SIGNED"
63gnunet-namestore -D -z e 63gnunet-namestore -D -z e
64SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` 64SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=e --attribute="e" --subject="$FKEY" --ttl="2049-12-12 10:00:00"`
65gnunet-abd --createSubjectSide --ego=f --import="$SIGNED" --private 65gnunet-abd --createSubjectSide --ego=f --import="$SIGNED" --private
66gnunet-namestore -D -z f 66gnunet-namestore -D -z f
67SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=h --attribute="h" --subject="$FKEY" --ttl="2019-12-12 10:00:00"` 67SIGNED=`$DO_TIMEOUT gnunet-abd --signSubjectSide --ego=h --attribute="h" --subject="$FKEY" --ttl="2049-12-12 10:00:00"`
68gnunet-abd --createSubjectSide --ego=f --import="$SIGNED" --private 68gnunet-abd --createSubjectSide --ego=f --import="$SIGNED" --private
69gnunet-namestore -D -z h 69gnunet-namestore -D -z h
70 70
diff --git a/src/include/gnunet_abd_service.h b/src/include/gnunet_abd_service.h
index afec880f1..21f668a8d 100644
--- a/src/include/gnunet_abd_service.h
+++ b/src/include/gnunet_abd_service.h
@@ -103,7 +103,7 @@ struct GNUNET_ABD_DelegationRecordSet
103 /** 103 /**
104 * Public key of the subject this attribute was delegated to 104 * Public key of the subject this attribute was delegated to
105 */ 105 */
106 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 106 struct GNUNET_IDENTITY_PublicKey subject_key;
107 107
108 /** 108 /**
109 * Length of attribute, may be 0 109 * Length of attribute, may be 0
@@ -123,7 +123,7 @@ struct GNUNET_ABD_DelegationSet
123 /** 123 /**
124 * Public key of the subject this attribute was delegated to 124 * Public key of the subject this attribute was delegated to
125 */ 125 */
126 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 126 struct GNUNET_IDENTITY_PublicKey subject_key;
127 127
128 uint32_t subject_attribute_len; 128 uint32_t subject_attribute_len;
129 129
@@ -143,12 +143,12 @@ struct GNUNET_ABD_Delegation
143 /** 143 /**
144 * The issuer of the delegation 144 * The issuer of the delegation
145 */ 145 */
146 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 146 struct GNUNET_IDENTITY_PublicKey issuer_key;
147 147
148 /** 148 /**
149 * Public key of the subject this attribute was delegated to 149 * Public key of the subject this attribute was delegated to
150 */ 150 */
151 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 151 struct GNUNET_IDENTITY_PublicKey subject_key;
152 152
153 /** 153 /**
154 * Length of the attribute 154 * Length of the attribute
@@ -181,17 +181,17 @@ struct GNUNET_ABD_Delegate
181 /** 181 /**
182 * The issuer of the credential 182 * The issuer of the credential
183 */ 183 */
184 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key; 184 struct GNUNET_IDENTITY_PublicKey issuer_key;
185 185
186 /** 186 /**
187 * Public key of the subject this credential was issued to 187 * Public key of the subject this credential was issued to
188 */ 188 */
189 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key; 189 struct GNUNET_IDENTITY_PublicKey subject_key;
190 190
191 /** 191 /**
192 * Signature of this credential 192 * Signature of this credential
193 */ 193 */
194 struct GNUNET_CRYPTO_EcdsaSignature signature; 194 struct GNUNET_IDENTITY_Signature signature;
195 195
196 /** 196 /**
197 * Expiration of this credential 197 * Expiration of this credential
@@ -318,9 +318,9 @@ typedef void (*GNUNET_ABD_RemoveDelegateResultProcessor) (void *cls,
318 */ 318 */
319struct GNUNET_ABD_Request* 319struct GNUNET_ABD_Request*
320 GNUNET_ABD_verify (struct GNUNET_ABD_Handle *handle, 320 GNUNET_ABD_verify (struct GNUNET_ABD_Handle *handle,
321 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key, 321 const struct GNUNET_IDENTITY_PublicKey *issuer_key,
322 const char *issuer_attribute, 322 const char *issuer_attribute,
323 const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key, 323 const struct GNUNET_IDENTITY_PublicKey *subject_key,
324 uint32_t delegate_count, 324 uint32_t delegate_count,
325 const struct GNUNET_ABD_Delegate *delegates, 325 const struct GNUNET_ABD_Delegate *delegates,
326 enum GNUNET_ABD_AlgoDirectionFlags direction, 326 enum GNUNET_ABD_AlgoDirectionFlags direction,
@@ -331,9 +331,9 @@ struct GNUNET_ABD_Request*
331 331
332struct GNUNET_ABD_Request* 332struct GNUNET_ABD_Request*
333 GNUNET_ABD_collect (struct GNUNET_ABD_Handle *handle, 333 GNUNET_ABD_collect (struct GNUNET_ABD_Handle *handle,
334 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key, 334 const struct GNUNET_IDENTITY_PublicKey *issuer_key,
335 const char *issuer_attribute, 335 const char *issuer_attribute,
336 const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key, 336 const struct GNUNET_IDENTITY_PrivateKey *subject_key,
337 enum GNUNET_ABD_AlgoDirectionFlags direction, 337 enum GNUNET_ABD_AlgoDirectionFlags direction,
338 GNUNET_ABD_CredentialResultProcessor proc, 338 GNUNET_ABD_CredentialResultProcessor proc,
339 void *proc_cls, 339 void *proc_cls,
@@ -356,7 +356,7 @@ struct GNUNET_ABD_Request *
356GNUNET_ABD_add_delegation (struct GNUNET_ABD_Handle *handle, 356GNUNET_ABD_add_delegation (struct GNUNET_ABD_Handle *handle,
357 struct GNUNET_IDENTITY_Ego *issuer, 357 struct GNUNET_IDENTITY_Ego *issuer,
358 const char *attribute, 358 const char *attribute,
359 struct GNUNET_CRYPTO_EcdsaPublicKey *subject, 359 struct GNUNET_IDENTITY_PublicKey *subject,
360 const char *delegated_attribute, 360 const char *delegated_attribute,
361 GNUNET_ABD_DelegateResultProcessor proc, 361 GNUNET_ABD_DelegateResultProcessor proc,
362 void *proc_cls); 362 void *proc_cls);
@@ -389,8 +389,8 @@ GNUNET_ABD_remove_delegation (struct GNUNET_ABD_Handle *handle,
389 * @return handle to the queued request 389 * @return handle to the queued request
390 */ 390 */
391struct GNUNET_ABD_Delegate* 391struct GNUNET_ABD_Delegate*
392GNUNET_ABD_delegate_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, 392GNUNET_ABD_delegate_issue (const struct GNUNET_IDENTITY_PrivateKey *issuer,
393 struct GNUNET_CRYPTO_EcdsaPublicKey *subject, 393 struct GNUNET_IDENTITY_PublicKey *subject,
394 const char *iss_attr, 394 const char *iss_attr,
395 const char *sub_attr, 395 const char *sub_attr,
396 struct GNUNET_TIME_Absolute *expiration); 396 struct GNUNET_TIME_Absolute *expiration);