aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/de.po2
-rw-r--r--po/es.po2
-rw-r--r--po/fr.po2
-rw-r--r--po/it.po2
-rw-r--r--po/sv.po2
-rw-r--r--po/vi.po2
-rw-r--r--po/zh_CN.po2
-rw-r--r--src/include/gnunet_identity_service.h82
-rw-r--r--src/revocation/test_revocation.c179
-rw-r--r--src/transport/Makefile.am3
10 files changed, 127 insertions, 151 deletions
diff --git a/po/de.po b/po/de.po
index 3d3e22638..9b32c7668 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
10msgstr "" 10msgstr ""
11"Project-Id-Version: gnunet 0.10.1\n" 11"Project-Id-Version: gnunet 0.10.1\n"
12"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 12"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
13"POT-Creation-Date: 2019-05-12 08:29+0000\n" 13"POT-Creation-Date: 2019-05-12 13:20+0200\n"
14"PO-Revision-Date: 2015-03-08 16:16+0100\n" 14"PO-Revision-Date: 2015-03-08 16:16+0100\n"
15"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n" 15"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
16"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" 16"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
diff --git a/po/es.po b/po/es.po
index 5d7665695..7a9c16f76 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: gnunet 0.9.5a\n" 9"Project-Id-Version: gnunet 0.9.5a\n"
10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
11"POT-Creation-Date: 2019-05-12 08:29+0000\n" 11"POT-Creation-Date: 2019-05-12 13:20+0200\n"
12"PO-Revision-Date: 2013-02-23 17:50+0100\n" 12"PO-Revision-Date: 2013-02-23 17:50+0100\n"
13"Last-Translator: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>\n" 13"Last-Translator: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>\n"
14"Language-Team: Spanish <es@li.org>\n" 14"Language-Team: Spanish <es@li.org>\n"
diff --git a/po/fr.po b/po/fr.po
index cb917741c..dd1f82cb4 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: gnunet 0.10.1\n" 8"Project-Id-Version: gnunet 0.10.1\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2019-05-12 08:29+0000\n" 10"POT-Creation-Date: 2019-05-12 13:20+0200\n"
11"PO-Revision-Date: 2015-12-24 01:20+0100\n" 11"PO-Revision-Date: 2015-12-24 01:20+0100\n"
12"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" 12"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
13"Language-Team: French <traduc@traduc.org>\n" 13"Language-Team: French <traduc@traduc.org>\n"
diff --git a/po/it.po b/po/it.po
index a24bdc66b..fcbc90f0b 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: gnunet 0.10.1\n" 9"Project-Id-Version: gnunet 0.10.1\n"
10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
11"POT-Creation-Date: 2019-05-12 08:29+0000\n" 11"POT-Creation-Date: 2019-05-12 13:20+0200\n"
12"PO-Revision-Date: 2019-04-23 20:58+0200\n" 12"PO-Revision-Date: 2019-04-23 20:58+0200\n"
13"Last-Translator: Sebastiano Pistore <SebastianoPistore.info@protonmail.ch>\n" 13"Last-Translator: Sebastiano Pistore <SebastianoPistore.info@protonmail.ch>\n"
14"Language-Team: Italian <tp@lists.linux.it>\n" 14"Language-Team: Italian <tp@lists.linux.it>\n"
diff --git a/po/sv.po b/po/sv.po
index ba1e9df85..139a64fc3 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: GNUnet 0.7.0b\n" 8"Project-Id-Version: GNUnet 0.7.0b\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2019-05-12 08:29+0000\n" 10"POT-Creation-Date: 2019-05-12 13:20+0200\n"
11"PO-Revision-Date: 2006-01-21 17:16+0100\n" 11"PO-Revision-Date: 2006-01-21 17:16+0100\n"
12"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" 12"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" 13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
diff --git a/po/vi.po b/po/vi.po
index 4914ded1a..c3a8294bb 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: gnunet 0.8.0a\n" 9"Project-Id-Version: gnunet 0.8.0a\n"
10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
11"POT-Creation-Date: 2019-05-12 08:29+0000\n" 11"POT-Creation-Date: 2019-05-12 13:20+0200\n"
12"PO-Revision-Date: 2008-09-10 22:05+0930\n" 12"PO-Revision-Date: 2008-09-10 22:05+0930\n"
13"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" 13"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
14"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" 14"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 6676a50f2..0a4189667 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: gnunet-0.8.1\n" 8"Project-Id-Version: gnunet-0.8.1\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2019-05-12 08:29+0000\n" 10"POT-Creation-Date: 2019-05-12 13:20+0200\n"
11"PO-Revision-Date: 2011-07-09 12:12+0800\n" 11"PO-Revision-Date: 2011-07-09 12:12+0800\n"
12"Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n" 12"Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n"
13"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" 13"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h
index 043a71770..035b9e227 100644
--- a/src/include/gnunet_identity_service.h
+++ b/src/include/gnunet_identity_service.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -43,9 +43,8 @@
43#define GNUNET_IDENTITY_SERVICE_H 43#define GNUNET_IDENTITY_SERVICE_H
44 44
45#ifdef __cplusplus 45#ifdef __cplusplus
46extern "C" 46extern "C" {
47{ 47#if 0 /* keep Emacsens' auto-indent happy */
48#if 0 /* keep Emacsens' auto-indent happy */
49} 48}
50#endif 49#endif
51#endif 50#endif
@@ -101,7 +100,7 @@ GNUNET_IDENTITY_ego_get_anonymous (void);
101 */ 100 */
102void 101void
103GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, 102GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego,
104 struct GNUNET_CRYPTO_EcdsaPublicKey *pk); 103 struct GNUNET_CRYPTO_EcdsaPublicKey *pk);
105 104
106 105
107/** 106/**
@@ -138,11 +137,10 @@ GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego,
138 * NULL if the user just deleted the ego and it 137 * NULL if the user just deleted the ego and it
139 * must thus no longer be used 138 * must thus no longer be used
140 */ 139 */
141typedef void 140typedef void (*GNUNET_IDENTITY_Callback) (void *cls,
142(*GNUNET_IDENTITY_Callback)(void *cls, 141 struct GNUNET_IDENTITY_Ego *ego,
143 struct GNUNET_IDENTITY_Ego *ego, 142 void **ctx,
144 void **ctx, 143 const char *name);
145 const char *name);
146 144
147 145
148/** 146/**
@@ -155,8 +153,8 @@ typedef void
155 */ 153 */
156struct GNUNET_IDENTITY_Handle * 154struct GNUNET_IDENTITY_Handle *
157GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 155GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
158 GNUNET_IDENTITY_Callback cb, 156 GNUNET_IDENTITY_Callback cb,
159 void *cb_cls); 157 void *cb_cls);
160 158
161 159
162/** 160/**
@@ -170,9 +168,9 @@ GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
170 */ 168 */
171struct GNUNET_IDENTITY_Operation * 169struct GNUNET_IDENTITY_Operation *
172GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id, 170GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id,
173 const char *service_name, 171 const char *service_name,
174 GNUNET_IDENTITY_Callback cb, 172 GNUNET_IDENTITY_Callback cb,
175 void *cb_cls); 173 void *cb_cls);
176 174
177 175
178/** 176/**
@@ -182,9 +180,7 @@ GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id,
182 * @param cls closure 180 * @param cls closure
183 * @param emsg NULL on success, otherwise an error message 181 * @param emsg NULL on success, otherwise an error message
184 */ 182 */
185typedef void 183typedef void (*GNUNET_IDENTITY_Continuation) (void *cls, const char *emsg);
186(*GNUNET_IDENTITY_Continuation)(void *cls,
187 const char *emsg);
188 184
189 185
190/** 186/**
@@ -199,10 +195,10 @@ typedef void
199 */ 195 */
200struct GNUNET_IDENTITY_Operation * 196struct GNUNET_IDENTITY_Operation *
201GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *id, 197GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *id,
202 const char *service_name, 198 const char *service_name,
203 struct GNUNET_IDENTITY_Ego *ego, 199 struct GNUNET_IDENTITY_Ego *ego,
204 GNUNET_IDENTITY_Continuation cont, 200 GNUNET_IDENTITY_Continuation cont,
205 void *cont_cls); 201 void *cont_cls);
206 202
207 203
208/** 204/**
@@ -222,10 +218,10 @@ GNUNET_IDENTITY_disconnect (struct GNUNET_IDENTITY_Handle *h);
222 * @param pk private key, NULL on error 218 * @param pk private key, NULL on error
223 * @param emsg error message, NULL on success 219 * @param emsg error message, NULL on success
224 */ 220 */
225typedef void 221typedef void (*GNUNET_IDENTITY_CreateContinuation) (
226(*GNUNET_IDENTITY_CreateContinuation)(void *cls, 222 void *cls,
227 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk, 223 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk,
228 const char *emsg); 224 const char *emsg);
229 225
230 226
231/** 227/**
@@ -239,9 +235,9 @@ typedef void
239 */ 235 */
240struct GNUNET_IDENTITY_Operation * 236struct GNUNET_IDENTITY_Operation *
241GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id, 237GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
242 const char *name, 238 const char *name,
243 GNUNET_IDENTITY_CreateContinuation cont, 239 GNUNET_IDENTITY_CreateContinuation cont,
244 void *cont_cls); 240 void *cont_cls);
245 241
246 242
247/** 243/**
@@ -256,10 +252,10 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
256 */ 252 */
257struct GNUNET_IDENTITY_Operation * 253struct GNUNET_IDENTITY_Operation *
258GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id, 254GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id,
259 const char *old_name, 255 const char *old_name,
260 const char *new_name, 256 const char *new_name,
261 GNUNET_IDENTITY_Continuation cb, 257 GNUNET_IDENTITY_Continuation cb,
262 void *cb_cls); 258 void *cb_cls);
263 259
264 260
265/** 261/**
@@ -273,9 +269,9 @@ GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id,
273 */ 269 */
274struct GNUNET_IDENTITY_Operation * 270struct GNUNET_IDENTITY_Operation *
275GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id, 271GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id,
276 const char *name, 272 const char *name,
277 GNUNET_IDENTITY_Continuation cb, 273 GNUNET_IDENTITY_Continuation cb,
278 void *cb_cls); 274 void *cb_cls);
279 275
280 276
281/** 277/**
@@ -298,9 +294,9 @@ GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op);
298 * @param cls closure 294 * @param cls closure
299 * @param ego NULL on error / ego not found 295 * @param ego NULL on error / ego not found
300 */ 296 */
301typedef void 297typedef void (*GNUNET_IDENTITY_EgoCallback) (
302(*GNUNET_IDENTITY_EgoCallback)(void *cls, 298 void *cls,
303 const struct GNUNET_IDENTITY_Ego *ego); 299 const struct GNUNET_IDENTITY_Ego *ego);
304 300
305/** 301/**
306 * Handle for ego lookup. 302 * Handle for ego lookup.
@@ -319,9 +315,9 @@ struct GNUNET_IDENTITY_EgoLookup;
319 */ 315 */
320struct GNUNET_IDENTITY_EgoLookup * 316struct GNUNET_IDENTITY_EgoLookup *
321GNUNET_IDENTITY_ego_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, 317GNUNET_IDENTITY_ego_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
322 const char *name, 318 const char *name,
323 GNUNET_IDENTITY_EgoCallback cb, 319 GNUNET_IDENTITY_EgoCallback cb,
324 void *cb_cls); 320 void *cb_cls);
325 321
326 322
327/** 323/**
@@ -333,7 +329,7 @@ void
333GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el); 329GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el);
334 330
335 331
336#if 0 /* keep Emacsens' auto-indent happy */ 332#if 0 /* keep Emacsens' auto-indent happy */
337{ 333{
338#endif 334#endif
339#ifdef __cplusplus 335#ifdef __cplusplus
diff --git a/src/revocation/test_revocation.c b/src/revocation/test_revocation.c
index e384d309a..22df26165 100644
--- a/src/revocation/test_revocation.c
+++ b/src/revocation/test_revocation.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -95,15 +95,13 @@ check_revocation (void *cls);
95 95
96 96
97static void 97static void
98revocation_remote_cb (void *cls, 98revocation_remote_cb (void *cls, int is_valid)
99 int is_valid)
100{ 99{
101 static int repeat = 0; 100 static int repeat = 0;
102 101
103 if (GNUNET_NO == is_valid) 102 if (GNUNET_NO == is_valid)
104 { 103 {
105 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 104 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Local revocation successful\n");
106 "Local revocation successful\n");
107 ok = 0; 105 ok = 0;
108 GNUNET_SCHEDULER_shutdown (); 106 GNUNET_SCHEDULER_shutdown ();
109 return; 107 return;
@@ -116,8 +114,7 @@ revocation_remote_cb (void *cls,
116 NULL); 114 NULL);
117 return; 115 return;
118 } 116 }
119 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 117 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Flooding of revocation failed\n");
120 "Flooding of revocation failed\n");
121 ok = 2; 118 ok = 2;
122 GNUNET_SCHEDULER_shutdown (); 119 GNUNET_SCHEDULER_shutdown ();
123} 120}
@@ -128,27 +125,25 @@ check_revocation (void *cls)
128{ 125{
129 GNUNET_REVOCATION_query (testpeers[0].cfg, 126 GNUNET_REVOCATION_query (testpeers[0].cfg,
130 &testpeers[1].pubkey, 127 &testpeers[1].pubkey,
131 &revocation_remote_cb, NULL); 128 &revocation_remote_cb,
129 NULL);
132} 130}
133 131
134 132
135static void 133static void
136revocation_cb (void *cls, 134revocation_cb (void *cls, int is_valid)
137 int is_valid)
138{ 135{
139 testpeers[1].revok_handle = NULL; 136 testpeers[1].revok_handle = NULL;
140 if (GNUNET_NO == is_valid) 137 if (GNUNET_NO == is_valid)
141 { 138 {
142 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 139 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Revocation successful\n");
143 "Revocation successful\n");
144 check_revocation (NULL); 140 check_revocation (NULL);
145 } 141 }
146} 142}
147 143
148 144
149static void 145static void
150ego_cb (void *cls, 146ego_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
151 const struct GNUNET_IDENTITY_Ego *ego)
152{ 147{
153 static int completed = 0; 148 static int completed = 0;
154 149
@@ -166,38 +161,35 @@ ego_cb (void *cls,
166 GNUNET_IDENTITY_ego_get_public_key (ego, &testpeers[1].pubkey); 161 GNUNET_IDENTITY_ego_get_public_key (ego, &testpeers[1].pubkey);
167 GNUNET_REVOCATION_sign_revocation (testpeers[1].privkey, &testpeers[1].sig); 162 GNUNET_REVOCATION_sign_revocation (testpeers[1].privkey, &testpeers[1].sig);
168 163
169 GNUNET_log(GNUNET_ERROR_TYPE_INFO, 164 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Calculating proof of work...\n");
170 "Calculating proof of work...\n");
171 testpeers[1].pow = 0; 165 testpeers[1].pow = 0;
172 int res = GNUNET_REVOCATION_check_pow (&testpeers[1].pubkey, 166 int res =
173 testpeers[1].pow, 5); 167 GNUNET_REVOCATION_check_pow (&testpeers[1].pubkey, testpeers[1].pow, 5);
174 while (GNUNET_OK != res) 168 while (GNUNET_OK != res)
175 { 169 {
176 testpeers[1].pow++; 170 testpeers[1].pow++;
177 res = GNUNET_REVOCATION_check_pow (&testpeers[1].pubkey, 171 res =
178 testpeers[1].pow, 172 GNUNET_REVOCATION_check_pow (&testpeers[1].pubkey, testpeers[1].pow, 5);
179 5);
180 } 173 }
181 fprintf (stderr, 174 fprintf (stderr, "Done calculating proof of work\n");
182 "Done calculating proof of work\n");
183 completed++; 175 completed++;
184 } 176 }
185 if (2 == completed) 177 if (2 == completed)
186 { 178 {
187 GNUNET_log(GNUNET_ERROR_TYPE_INFO, 179 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Egos retrieved\n");
188 "Egos retrieved\n"); 180 testpeers[1].revok_handle = GNUNET_REVOCATION_revoke (testpeers[1].cfg,
189 testpeers[1].revok_handle 181 &testpeers[1].pubkey,
190 = GNUNET_REVOCATION_revoke (testpeers[1].cfg, 182 &testpeers[1].sig,
191 &testpeers[1].pubkey, 183 testpeers[1].pow,
192 &testpeers[1].sig, 184 &revocation_cb,
193 testpeers[1].pow, 185 NULL);
194 &revocation_cb, NULL);
195 } 186 }
196} 187}
197 188
198 189
199static void 190static void
200identity_create_cb (void *cls, 191identity_create_cb (void *cls,
192 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk,
201 const char *emsg) 193 const char *emsg)
202{ 194{
203 static int completed = 0; 195 static int completed = 0;
@@ -214,8 +206,7 @@ identity_create_cb (void *cls,
214 } 206 }
215 if (2 != completed) 207 if (2 != completed)
216 return; 208 return;
217 fprintf (stderr, 209 fprintf (stderr, "Identities created\n");
218 "Identities created\n");
219 testpeers[0].ego_lookup = GNUNET_IDENTITY_ego_lookup (testpeers[0].cfg, 210 testpeers[0].ego_lookup = GNUNET_IDENTITY_ego_lookup (testpeers[0].cfg,
220 "client", 211 "client",
221 &ego_cb, 212 &ego_cb,
@@ -238,18 +229,15 @@ identity_completion_cb (void *cls,
238 completed++; 229 completed++;
239 if (NUM_TEST_PEERS != completed) 230 if (NUM_TEST_PEERS != completed)
240 return; 231 return;
241 fprintf (stderr, 232 fprintf (stderr, "All peers connected @ IDENTITY ...\n");
242 "All peers connected @ IDENTITY ...\n"); 233 testpeers[0].create_id_op = GNUNET_IDENTITY_create (testpeers[0].idh,
243 testpeers[0].create_id_op 234 "client",
244 = GNUNET_IDENTITY_create (testpeers[0].idh, 235 &identity_create_cb,
245 "client", 236 &testpeers[0]);
246 &identity_create_cb, 237 testpeers[1].create_id_op = GNUNET_IDENTITY_create (testpeers[1].idh,
247 &testpeers[0]); 238 "toberevoked",
248 testpeers[1].create_id_op 239 &identity_create_cb,
249 = GNUNET_IDENTITY_create (testpeers[1].idh, 240 &testpeers[1]);
250 "toberevoked",
251 &identity_create_cb,
252 &testpeers[1]);
253} 241}
254 242
255 243
@@ -262,15 +250,13 @@ identity_connect_adapter (void *cls,
262 me->cfg = cfg; 250 me->cfg = cfg;
263 me->idh = GNUNET_IDENTITY_connect (cfg, NULL, NULL); 251 me->idh = GNUNET_IDENTITY_connect (cfg, NULL, NULL);
264 if (NULL == me->idh) 252 if (NULL == me->idh)
265 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 253 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to create IDENTITY handle \n");
266 "Failed to create IDENTITY handle \n");
267 return me->idh; 254 return me->idh;
268} 255}
269 256
270 257
271static void 258static void
272identity_disconnect_adapter (void *cls, 259identity_disconnect_adapter (void *cls, void *op_result)
273 void *op_result)
274{ 260{
275 struct TestPeer *me = cls; 261 struct TestPeer *me = cls;
276 GNUNET_IDENTITY_disconnect (me->idh); 262 GNUNET_IDENTITY_disconnect (me->idh);
@@ -281,31 +267,34 @@ identity_disconnect_adapter (void *cls,
281static void * 267static void *
282connect_cb (void *cls, 268connect_cb (void *cls,
283 const struct GNUNET_PeerIdentity *peer, 269 const struct GNUNET_PeerIdentity *peer,
284 struct GNUNET_MQ_Handle *mq) 270 struct GNUNET_MQ_Handle *mq)
285{ 271{
286 static int connects = 0; 272 static int connects = 0;
287 273
288 connects++; 274 connects++;
289 if (NUM_TEST_PEERS * NUM_TEST_PEERS == connects) 275 if (NUM_TEST_PEERS * NUM_TEST_PEERS == connects)
290 { 276 {
291 fprintf (stderr, 277 fprintf (stderr, "All peers connected @ CORE ...\n");
292 "All peers connected @ CORE ...\n");
293 278
294 /* Connect to identity service */ 279 /* Connect to identity service */
295 testpeers[0].identity_op 280 testpeers[0].identity_op =
296 = GNUNET_TESTBED_service_connect (NULL, 281 GNUNET_TESTBED_service_connect (NULL,
297 testpeers[0].p, "identity", 282 testpeers[0].p,
298 &identity_completion_cb, NULL, 283 "identity",
299 &identity_connect_adapter, 284 &identity_completion_cb,
300 &identity_disconnect_adapter, 285 NULL,
301 &testpeers[0]); 286 &identity_connect_adapter,
302 testpeers[1].identity_op 287 &identity_disconnect_adapter,
303 = GNUNET_TESTBED_service_connect (NULL, 288 &testpeers[0]);
304 testpeers[1].p, "identity", 289 testpeers[1].identity_op =
305 *identity_completion_cb, NULL, 290 GNUNET_TESTBED_service_connect (NULL,
306 &identity_connect_adapter, 291 testpeers[1].p,
307 &identity_disconnect_adapter, 292 "identity",
308 &testpeers[1]); 293 *identity_completion_cb,
294 NULL,
295 &identity_connect_adapter,
296 &identity_disconnect_adapter,
297 &testpeers[1]);
309 } 298 }
310 return NULL; 299 return NULL;
311} 300}
@@ -322,35 +311,26 @@ core_completion_cb (void *cls,
322 completed++; 311 completed++;
323 if (NUM_TEST_PEERS == completed) 312 if (NUM_TEST_PEERS == completed)
324 { 313 {
325 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 314 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connected to CORE\n");
326 "Connected to CORE\n");
327 } 315 }
328} 316}
329 317
330 318
331static void * 319static void *
332core_connect_adapter (void *cls, 320core_connect_adapter (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
333 const struct GNUNET_CONFIGURATION_Handle *cfg)
334{ 321{
335 struct TestPeer *me = cls; 322 struct TestPeer *me = cls;
336 323
337 me->cfg = cfg; 324 me->cfg = cfg;
338 me->ch = GNUNET_CORE_connect (cfg, 325 me->ch = GNUNET_CORE_connect (cfg, me, NULL, &connect_cb, NULL, NULL);
339 me,
340 NULL,
341 &connect_cb,
342 NULL,
343 NULL);
344 if (NULL == me->ch) 326 if (NULL == me->ch)
345 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 327 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to create CORE handle \n");
346 "Failed to create CORE handle \n");
347 return me->ch; 328 return me->ch;
348} 329}
349 330
350 331
351static void 332static void
352core_disconnect_adapter (void *cls, 333core_disconnect_adapter (void *cls, void *op_result)
353 void *op_result)
354{ 334{
355 struct TestPeer *me = cls; 335 struct TestPeer *me = cls;
356 336
@@ -369,8 +349,7 @@ test_connection (void *cls,
369{ 349{
370 unsigned int c; 350 unsigned int c;
371 351
372 GNUNET_SCHEDULER_add_shutdown (&do_shutdown, 352 GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
373 NULL);
374 if (NUM_TEST_PEERS != num_peers) 353 if (NUM_TEST_PEERS != num_peers)
375 { 354 {
376 ok = 4; 355 ok = 4;
@@ -381,28 +360,28 @@ test_connection (void *cls,
381 GNUNET_SCHEDULER_shutdown (); 360 GNUNET_SCHEDULER_shutdown ();
382 return; 361 return;
383 } 362 }
384 /* We are generating a CLIQUE */ 363 /* We are generating a CLIQUE */
385 if (NUM_TEST_PEERS * (NUM_TEST_PEERS -1) == links_succeeded) 364 if (NUM_TEST_PEERS * (NUM_TEST_PEERS - 1) == links_succeeded)
386 { 365 {
387 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 366 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
388 "Testbed connected peers, initializing test\n"); 367 "Testbed connected peers, initializing test\n");
389 for (c = 0; c < num_peers; c++) 368 for (c = 0; c < num_peers; c++)
390 { 369 {
391 testpeers[c].p = peers[c]; 370 testpeers[c].p = peers[c];
392 testpeers[c].core_op 371 testpeers[c].core_op =
393 = GNUNET_TESTBED_service_connect (NULL, 372 GNUNET_TESTBED_service_connect (NULL,
394 testpeers[c].p, 373 testpeers[c].p,
395 "core", 374 "core",
396 &core_completion_cb, NULL, 375 &core_completion_cb,
397 &core_connect_adapter, 376 NULL,
398 &core_disconnect_adapter, 377 &core_connect_adapter,
399 &testpeers[c]); 378 &core_disconnect_adapter,
379 &testpeers[c]);
400 } 380 }
401 } 381 }
402 else 382 else
403 { 383 {
404 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 384 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Testbed failed to connect peers\n");
405 "Testbed failed to connect peers\n");
406 ok = 5; 385 ok = 5;
407 GNUNET_SCHEDULER_shutdown (); 386 GNUNET_SCHEDULER_shutdown ();
408 return; 387 return;
@@ -411,16 +390,18 @@ test_connection (void *cls,
411 390
412 391
413int 392int
414main (int argc, 393main (int argc, char *argv[])
415 char *argv[])
416{ 394{
417 ok = 1; 395 ok = 1;
418 /* Connecting initial topology */ 396 /* Connecting initial topology */
419 (void) GNUNET_TESTBED_test_run ("test-revocation", 397 (void) GNUNET_TESTBED_test_run ("test-revocation",
420 "test_revocation.conf", 398 "test_revocation.conf",
421 NUM_TEST_PEERS, 0, 399 NUM_TEST_PEERS,
422 NULL, NULL, 400 0,
423 &test_connection, NULL); 401 NULL,
402 NULL,
403 &test_connection,
404 NULL);
424 return ok; 405 return ok;
425} 406}
426 407
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index fa85e775c..c076028fe 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -595,8 +595,7 @@ check_PROGRAMS = \
595 $(HTTP_QUOTA_TEST) \ 595 $(HTTP_QUOTA_TEST) \
596 $(HTTPS_QUOTA_TEST) \ 596 $(HTTPS_QUOTA_TEST) \
597 $(WLAN_QUOTA_TEST) \ 597 $(WLAN_QUOTA_TEST) \
598 $(BT_QUOTA_TEST) \ 598 $(BT_QUOTA_TEST)
599 test_communicator_unix
600if HAVE_GETOPT_BINARY 599if HAVE_GETOPT_BINARY
601check_PROGRAMS += \ 600check_PROGRAMS += \
602test_transport_api_slow_ats 601test_transport_api_slow_ats