aboutsummaryrefslogtreecommitdiff
path: root/src/conversation
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-10-29 18:06:26 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-10-29 18:06:26 +0900
commit0f2da4636e108c70697c589d9e38781f2bafefba (patch)
tree0e831befd71d4323596cdae55e8431df7720c531 /src/conversation
parent4e2259f14be320c8e2fe2a672a473e09677269c4 (diff)
downloadgnunet-0f2da4636e108c70697c589d9e38781f2bafefba.tar.gz
gnunet-0f2da4636e108c70697c589d9e38781f2bafefba.zip
IDENTITY
This commit is a major rework of the unclean GNUNET_IDENTITY_*Key structures and its use in serialized objects (e.g. RPC messages). The structures are now no longer to be used directly but instead through their serialization helper functions whenever needed.
Diffstat (limited to 'src/conversation')
-rw-r--r--src/conversation/conversation.h33
-rw-r--r--src/conversation/conversation_api.c38
-rw-r--r--src/conversation/conversation_api_call.c12
-rw-r--r--src/conversation/gnunet-service-conversation.c105
-rw-r--r--src/conversation/test_conversation_api.c13
-rw-r--r--src/conversation/test_conversation_api_reject.c13
-rw-r--r--src/conversation/test_conversation_api_twocalls.c13
7 files changed, 171 insertions, 56 deletions
diff --git a/src/conversation/conversation.h b/src/conversation/conversation.h
index d244f5163..ee4ca372c 100644
--- a/src/conversation/conversation.h
+++ b/src/conversation/conversation.h
@@ -105,9 +105,13 @@ struct ClientPhoneRingMessage
105 uint32_t cid GNUNET_PACKED; 105 uint32_t cid GNUNET_PACKED;
106 106
107 /** 107 /**
108 * Who is calling us? 108 * The identity key length
109 */
110 uint32_t key_len;
111
112 /**
113 * followed by who is calling us?, a public key
109 */ 114 */
110 struct GNUNET_IDENTITY_PublicKey caller_id;
111}; 115};
112 116
113 117
@@ -230,9 +234,13 @@ struct ClientCallMessage
230 struct GNUNET_HashCode line_port; 234 struct GNUNET_HashCode line_port;
231 235
232 /** 236 /**
233 * Identity of the caller. 237 * The identity key length
238 */
239 uint32_t key_len;
240
241 /**
242 * followed by the identity of the caller.
234 */ 243 */
235 struct GNUNET_IDENTITY_PrivateKey caller_id;
236}; 244};
237 245
238 246
@@ -301,19 +309,24 @@ struct CadetPhoneRingMessage
301 uint32_t reserved GNUNET_PACKED; 309 uint32_t reserved GNUNET_PACKED;
302 310
303 /** 311 /**
304 * Who is calling us? (also who is signing). 312 * When does the signature expire?
305 */ 313 */
306 struct GNUNET_IDENTITY_PublicKey caller_id; 314 struct GNUNET_TIME_AbsoluteNBO expiration_time;
307 315
308 /** 316 /**
309 * When does the signature expire? 317 * The length of the key
310 */ 318 */
311 struct GNUNET_TIME_AbsoluteNBO expiration_time; 319 uint32_t key_len;
320
321 /**
322 * The length of the signature
323 */
324 uint32_t sig_len;
312 325
313 /** 326 /**
314 * Signature over a `struct CadetPhoneRingInfoPS` 327 * Followed by the public key of who is calling us? (also who is signing).
328 * followed by the signature over a `struct CadetPhoneRingInfoPS`
315 */ 329 */
316 struct GNUNET_IDENTITY_Signature signature;
317}; 330};
318 331
319 332
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c
index 2ede33586..9c4c520be 100644
--- a/src/conversation/conversation_api.c
+++ b/src/conversation/conversation_api.c
@@ -238,7 +238,19 @@ transmit_phone_audio (void *cls,
238 e); 238 e);
239} 239}
240 240
241 241/**
242 * We received a `struct ClientPhoneRingMessage`
243 *
244 * @param cls the `struct GNUNET_CONVERSATION_Phone`
245 * @param ring the message
246 */
247static enum GNUNET_GenericReturnValue
248check_phone_ring (void *cls,
249 const struct ClientPhoneRingMessage *ring)
250{
251 //FIXME
252 return GNUNET_OK;
253}
242/** 254/**
243 * We received a `struct ClientPhoneRingMessage` 255 * We received a `struct ClientPhoneRingMessage`
244 * 256 *
@@ -251,7 +263,11 @@ handle_phone_ring (void *cls,
251{ 263{
252 struct GNUNET_CONVERSATION_Phone *phone = cls; 264 struct GNUNET_CONVERSATION_Phone *phone = cls;
253 struct GNUNET_CONVERSATION_Caller *caller; 265 struct GNUNET_CONVERSATION_Caller *caller;
266 struct GNUNET_IDENTITY_PublicKey caller_id;
267 size_t key_len;
268 size_t read;
254 269
270 key_len = ntohl (ring->key_len);
255 switch (phone->state) 271 switch (phone->state)
256 { 272 {
257 case PS_REGISTER: 273 case PS_REGISTER:
@@ -259,12 +275,22 @@ handle_phone_ring (void *cls,
259 break; 275 break;
260 276
261 case PS_READY: 277 case PS_READY:
278 if ((GNUNET_SYSERR ==
279 GNUNET_IDENTITY_read_public_key_from_buffer (&ring[1],
280 key_len,
281 &caller_id,
282 &read)) ||
283 (read != key_len))
284 {
285 GNUNET_break (0);
286 break;
287 }
262 caller = GNUNET_new (struct GNUNET_CONVERSATION_Caller); 288 caller = GNUNET_new (struct GNUNET_CONVERSATION_Caller);
263 caller->phone = phone; 289 caller->phone = phone;
264 GNUNET_CONTAINER_DLL_insert (phone->caller_head, 290 GNUNET_CONTAINER_DLL_insert (phone->caller_head,
265 phone->caller_tail, 291 phone->caller_tail,
266 caller); 292 caller);
267 caller->caller_id = ring->caller_id; 293 caller->caller_id = caller_id;
268 caller->cid = ring->cid; 294 caller->cid = ring->cid;
269 caller->state = CS_RINGING; 295 caller->state = CS_RINGING;
270 phone->event_handler (phone->event_handler_cls, 296 phone->event_handler (phone->event_handler_cls,
@@ -562,10 +588,10 @@ static void
562reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone) 588reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone)
563{ 589{
564 struct GNUNET_MQ_MessageHandler handlers[] = { 590 struct GNUNET_MQ_MessageHandler handlers[] = {
565 GNUNET_MQ_hd_fixed_size (phone_ring, 591 GNUNET_MQ_hd_var_size (phone_ring,
566 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING, 592 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
567 struct ClientPhoneRingMessage, 593 struct ClientPhoneRingMessage,
568 phone), 594 phone),
569 GNUNET_MQ_hd_fixed_size (phone_hangup, 595 GNUNET_MQ_hd_fixed_size (phone_hangup,
570 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP, 596 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
571 struct ClientPhoneHangupMessage, 597 struct ClientPhoneHangupMessage,
diff --git a/src/conversation/conversation_api_call.c b/src/conversation/conversation_api_call.c
index 909b603ac..129192bf0 100644
--- a/src/conversation/conversation_api_call.c
+++ b/src/conversation/conversation_api_call.c
@@ -455,6 +455,8 @@ handle_gns_response (void *cls,
455 struct GNUNET_CONVERSATION_Call *call = cls; 455 struct GNUNET_CONVERSATION_Call *call = cls;
456 struct GNUNET_MQ_Envelope *e; 456 struct GNUNET_MQ_Envelope *e;
457 struct ClientCallMessage *ccm; 457 struct ClientCallMessage *ccm;
458 const struct GNUNET_IDENTITY_PrivateKey *caller_id;
459 size_t key_len;
458 460
459 (void) was_gns; 461 (void) was_gns;
460 GNUNET_break (NULL != call->gns_lookup); 462 GNUNET_break (NULL != call->gns_lookup);
@@ -472,11 +474,15 @@ handle_gns_response (void *cls,
472 GNUNET_memcpy (&call->phone_record, 474 GNUNET_memcpy (&call->phone_record,
473 rd[i].data, 475 rd[i].data,
474 rd[i].data_size); 476 rd[i].data_size);
475 e = GNUNET_MQ_msg (ccm, 477 caller_id = GNUNET_IDENTITY_ego_get_private_key (call->caller_id);
476 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL); 478 key_len = GNUNET_IDENTITY_private_key_get_length (caller_id);
479 e = GNUNET_MQ_msg_extra (ccm, key_len,
480 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL);
477 ccm->line_port = call->phone_record.line_port; 481 ccm->line_port = call->phone_record.line_port;
478 ccm->target = call->phone_record.peer; 482 ccm->target = call->phone_record.peer;
479 ccm->caller_id = *GNUNET_IDENTITY_ego_get_private_key (call->caller_id); 483 GNUNET_IDENTITY_write_private_key_to_buffer (caller_id,
484 &ccm[1], key_len);
485 ccm->key_len = htonl (key_len);
480 GNUNET_MQ_send (call->mq, 486 GNUNET_MQ_send (call->mq,
481 e); 487 e);
482 call->state = CS_RINGING; 488 call->state = CS_RINGING;
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index a69c95a80..a551bed1a 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -729,6 +729,18 @@ handle_client_audio_message (void *cls, const struct ClientAudioMessage *msg)
729 GNUNET_SERVICE_client_continue (line->client); 729 GNUNET_SERVICE_client_continue (line->client);
730} 730}
731 731
732/**
733 * Function to handle a ring message incoming over cadet
734 *
735 * @param cls closure, NULL
736 * @param msg the incoming message
737 */
738static enum GNUNET_GenericReturnValue
739check_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg)
740{
741 //FIXME
742 return GNUNET_OK;
743}
732 744
733/** 745/**
734 * Function to handle a ring message incoming over cadet 746 * Function to handle a ring message incoming over cadet
@@ -744,19 +756,40 @@ handle_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg)
744 struct GNUNET_MQ_Envelope *env; 756 struct GNUNET_MQ_Envelope *env;
745 struct ClientPhoneRingMessage *cring; 757 struct ClientPhoneRingMessage *cring;
746 struct CadetPhoneRingInfoPS rs; 758 struct CadetPhoneRingInfoPS rs;
759 struct GNUNET_IDENTITY_PublicKey identity;
760 struct GNUNET_IDENTITY_Signature sig;
761 size_t key_len;
762 size_t sig_len;
763 size_t read;
747 764
748 rs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING); 765 rs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING);
749 rs.purpose.size = htonl (sizeof(struct CadetPhoneRingInfoPS)); 766 rs.purpose.size = htonl (sizeof(struct CadetPhoneRingInfoPS));
750 rs.line_port = line->line_port; 767 rs.line_port = line->line_port;
751 rs.target_peer = my_identity; 768 rs.target_peer = my_identity;
752 rs.expiration_time = msg->expiration_time; 769 rs.expiration_time = msg->expiration_time;
753 770 key_len = ntohl (msg->key_len);
771 sig_len = ntohl (msg->sig_len);
772
773 if ((GNUNET_SYSERR ==
774 GNUNET_IDENTITY_read_public_key_from_buffer (&msg[1],
775 key_len,
776 &identity,
777 &read)) ||
778 (read != key_len))
779 {
780 GNUNET_break_op (0);
781 destroy_line_cadet_channels (ch);
782 return;
783 }
784 GNUNET_IDENTITY_read_signature_from_buffer (&sig,
785 (char*) &msg[1] + read,
786 sig_len);
754 if (GNUNET_OK != 787 if (GNUNET_OK !=
755 GNUNET_IDENTITY_signature_verify ( 788 GNUNET_IDENTITY_signature_verify (
756 GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING, 789 GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING,
757 &rs, 790 &rs,
758 &msg->signature, 791 &sig,
759 &msg->caller_id)) 792 &identity))
760 { 793 {
761 GNUNET_break_op (0); 794 GNUNET_break_op (0);
762 destroy_line_cadet_channels (ch); 795 destroy_line_cadet_channels (ch);
@@ -782,9 +815,12 @@ handle_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg)
782 } 815 }
783 GNUNET_CADET_receive_done (ch->channel); 816 GNUNET_CADET_receive_done (ch->channel);
784 ch->status = CS_CALLEE_RINGING; 817 ch->status = CS_CALLEE_RINGING;
785 env = GNUNET_MQ_msg (cring, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING); 818 env = GNUNET_MQ_msg_extra (cring,
819 key_len,
820 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING);
786 cring->cid = ch->cid; 821 cring->cid = ch->cid;
787 cring->caller_id = msg->caller_id; 822 memcpy (&cring[1], &msg[1], key_len);
823 cring->key_len = msg->key_len;
788 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 824 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
789 "Sending RING message to client. CID is %u\n", 825 "Sending RING message to client. CID is %u\n",
790 (unsigned int) ch->cid); 826 (unsigned int) ch->cid);
@@ -1080,6 +1116,18 @@ inbound_end (void *cls, const struct GNUNET_CADET_Channel *channel)
1080 clean_up_channel (ch); 1116 clean_up_channel (ch);
1081} 1117}
1082 1118
1119/**
1120 * Function to handle call request from the client
1121 *
1122 * @param cls the `struct Line` the message is about
1123 * @param msg the message from the client
1124 */
1125static enum GNUNET_GenericReturnValue
1126check_client_call_message (void *cls, const struct ClientCallMessage *msg)
1127{
1128 // FIXME
1129 return GNUNET_OK;
1130}
1083 1131
1084/** 1132/**
1085 * Function to handle call request from the client 1133 * Function to handle call request from the client
@@ -1117,6 +1165,14 @@ handle_client_call_message (void *cls, const struct ClientCallMessage *msg)
1117 struct GNUNET_MQ_Envelope *e; 1165 struct GNUNET_MQ_Envelope *e;
1118 struct CadetPhoneRingMessage *ring; 1166 struct CadetPhoneRingMessage *ring;
1119 struct CadetPhoneRingInfoPS rs; 1167 struct CadetPhoneRingInfoPS rs;
1168 struct GNUNET_IDENTITY_PrivateKey caller_id;
1169 struct GNUNET_IDENTITY_PublicKey caller_id_pub;
1170 struct GNUNET_IDENTITY_Signature sig;
1171 ssize_t written;
1172 size_t key_len;
1173 size_t pkey_len;
1174 size_t sig_len;
1175 size_t read;
1120 1176
1121 line->line_port = msg->line_port; 1177 line->line_port = msg->line_port;
1122 rs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING); 1178 rs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING);
@@ -1136,10 +1192,27 @@ handle_client_call_message (void *cls, const struct ClientCallMessage *msg)
1136 &inbound_end, 1192 &inbound_end,
1137 cadet_handlers); 1193 cadet_handlers);
1138 ch->mq = GNUNET_CADET_get_mq (ch->channel); 1194 ch->mq = GNUNET_CADET_get_mq (ch->channel);
1139 e = GNUNET_MQ_msg (ring, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING); 1195 key_len = ntohl (msg->key_len);
1140 GNUNET_IDENTITY_key_get_public (&msg->caller_id, &ring->caller_id); 1196 GNUNET_IDENTITY_read_private_key_from_buffer (&msg[1],
1197 key_len,
1198 &caller_id,
1199 &read);
1200 GNUNET_assert (read == key_len);
1201 GNUNET_IDENTITY_sign (&caller_id, &rs, &sig);
1202 sig_len = GNUNET_IDENTITY_signature_get_length (&sig);
1203 GNUNET_IDENTITY_key_get_public (&caller_id, &caller_id_pub);
1204 pkey_len = GNUNET_IDENTITY_public_key_get_length (&caller_id_pub);
1205 e = GNUNET_MQ_msg_extra (ring, pkey_len + sig_len,
1206 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING);
1207 written = GNUNET_IDENTITY_write_public_key_to_buffer (&caller_id_pub,
1208 &ring[1],
1209 pkey_len);
1141 ring->expiration_time = rs.expiration_time; 1210 ring->expiration_time = rs.expiration_time;
1142 GNUNET_IDENTITY_sign (&msg->caller_id, &rs, &ring->signature); 1211 ring->key_len = htonl (pkey_len);
1212 ring->sig_len = htonl (sig_len);
1213 GNUNET_IDENTITY_write_signature_to_buffer (&sig,
1214 (char *) &ring[1] + written,
1215 sig_len);
1143 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending RING message via CADET\n"); 1216 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending RING message via CADET\n");
1144 GNUNET_MQ_send (ch->mq, e); 1217 GNUNET_MQ_send (ch->mq, e);
1145 GNUNET_SERVICE_client_continue (line->client); 1218 GNUNET_SERVICE_client_continue (line->client);
@@ -1246,10 +1319,10 @@ handle_client_register_message (void *cls,
1246{ 1319{
1247 struct Line *line = cls; 1320 struct Line *line = cls;
1248 struct GNUNET_MQ_MessageHandler cadet_handlers[] = 1321 struct GNUNET_MQ_MessageHandler cadet_handlers[] =
1249 { GNUNET_MQ_hd_fixed_size (cadet_ring_message, 1322 { GNUNET_MQ_hd_var_size (cadet_ring_message,
1250 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING, 1323 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING,
1251 struct CadetPhoneRingMessage, 1324 struct CadetPhoneRingMessage,
1252 NULL), 1325 NULL),
1253 GNUNET_MQ_hd_fixed_size (cadet_hangup_message, 1326 GNUNET_MQ_hd_fixed_size (cadet_hangup_message,
1254 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP, 1327 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP,
1255 struct CadetPhoneHangupMessage, 1328 struct CadetPhoneHangupMessage,
@@ -1367,10 +1440,10 @@ GNUNET_SERVICE_MAIN (
1367 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP, 1440 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
1368 struct ClientPhoneHangupMessage, 1441 struct ClientPhoneHangupMessage,
1369 NULL), 1442 NULL),
1370 GNUNET_MQ_hd_fixed_size (client_call_message, 1443 GNUNET_MQ_hd_var_size (client_call_message,
1371 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL, 1444 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL,
1372 struct ClientCallMessage, 1445 struct ClientCallMessage,
1373 NULL), 1446 NULL),
1374 GNUNET_MQ_hd_var_size (client_audio_message, 1447 GNUNET_MQ_hd_var_size (client_audio_message,
1375 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO, 1448 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
1376 struct ClientAudioMessage, 1449 struct ClientAudioMessage,
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c
index 41ef75821..22e9b1dd9 100644
--- a/src/conversation/test_conversation_api.c
+++ b/src/conversation/test_conversation_api.c
@@ -386,21 +386,20 @@ call_event_handler (void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
386static void 386static void
387caller_ego_create_cont (void *cls, 387caller_ego_create_cont (void *cls,
388 const struct GNUNET_IDENTITY_PrivateKey *pk, 388 const struct GNUNET_IDENTITY_PrivateKey *pk,
389 const char *emsg) 389 enum GNUNET_ErrorCode ec)
390{ 390{
391 (void) cls; 391 (void) cls;
392 op = NULL; 392 op = NULL;
393 GNUNET_assert (NULL == emsg); 393 GNUNET_assert (GNUNET_EC_NONE == ec);
394} 394}
395 395
396 396
397static void 397static void
398namestore_put_cont (void *cls, int32_t success, const char *emsg) 398namestore_put_cont (void *cls, enum GNUNET_ErrorCode ec)
399{ 399{
400 (void) cls; 400 (void) cls;
401 qe = NULL; 401 qe = NULL;
402 GNUNET_assert (GNUNET_YES == success); 402 GNUNET_assert (GNUNET_EC_NONE == ec);
403 GNUNET_assert (NULL == emsg);
404 GNUNET_assert (NULL == op); 403 GNUNET_assert (NULL == op);
405 op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, 404 op = GNUNET_IDENTITY_create (id, "caller-ego", NULL,
406 GNUNET_IDENTITY_TYPE_ECDSA, 405 GNUNET_IDENTITY_TYPE_ECDSA,
@@ -468,11 +467,11 @@ identity_cb (void *cls,
468static void 467static void
469phone_ego_create_cont (void *cls, 468phone_ego_create_cont (void *cls,
470 const struct GNUNET_IDENTITY_PrivateKey *pk, 469 const struct GNUNET_IDENTITY_PrivateKey *pk,
471 const char *emsg) 470 enum GNUNET_ErrorCode ec)
472{ 471{
473 (void) cls; 472 (void) cls;
474 op = NULL; 473 op = NULL;
475 GNUNET_assert (NULL == emsg); 474 GNUNET_assert (GNUNET_EC_NONE == ec);
476} 475}
477 476
478 477
diff --git a/src/conversation/test_conversation_api_reject.c b/src/conversation/test_conversation_api_reject.c
index 15728123b..a7aab069f 100644
--- a/src/conversation/test_conversation_api_reject.c
+++ b/src/conversation/test_conversation_api_reject.c
@@ -239,21 +239,20 @@ call_event_handler (void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
239static void 239static void
240caller_ego_create_cont (void *cls, 240caller_ego_create_cont (void *cls,
241 const struct GNUNET_IDENTITY_PrivateKey *pk, 241 const struct GNUNET_IDENTITY_PrivateKey *pk,
242 const char *emsg) 242 enum GNUNET_ErrorCode ec)
243{ 243{
244 (void) cls; 244 (void) cls;
245 op = NULL; 245 op = NULL;
246 GNUNET_assert (NULL == emsg); 246 GNUNET_assert (GNUNET_EC_NONE == ec);
247} 247}
248 248
249 249
250static void 250static void
251namestore_put_cont (void *cls, int32_t success, const char *emsg) 251namestore_put_cont (void *cls, enum GNUNET_ErrorCode ec)
252{ 252{
253 (void) cls; 253 (void) cls;
254 qe = NULL; 254 qe = NULL;
255 GNUNET_assert (GNUNET_YES == success); 255 GNUNET_assert (GNUNET_EC_NONE == ec);
256 GNUNET_assert (NULL == emsg);
257 GNUNET_assert (NULL == op); 256 GNUNET_assert (NULL == op);
258 op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, 257 op = GNUNET_IDENTITY_create (id, "caller-ego", NULL,
259 GNUNET_IDENTITY_TYPE_ECDSA, 258 GNUNET_IDENTITY_TYPE_ECDSA,
@@ -321,11 +320,11 @@ identity_cb (void *cls,
321static void 320static void
322phone_ego_create_cont (void *cls, 321phone_ego_create_cont (void *cls,
323 const struct GNUNET_IDENTITY_PrivateKey *pk, 322 const struct GNUNET_IDENTITY_PrivateKey *pk,
324 const char *emsg) 323 enum GNUNET_ErrorCode ec)
325{ 324{
326 (void) cls; 325 (void) cls;
327 op = NULL; 326 op = NULL;
328 GNUNET_assert (NULL == emsg); 327 GNUNET_assert (GNUNET_EC_NONE == ec);
329} 328}
330 329
331 330
diff --git a/src/conversation/test_conversation_api_twocalls.c b/src/conversation/test_conversation_api_twocalls.c
index 9abf91d0b..1bd2b4e22 100644
--- a/src/conversation/test_conversation_api_twocalls.c
+++ b/src/conversation/test_conversation_api_twocalls.c
@@ -508,21 +508,20 @@ call_event_handler (void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
508static void 508static void
509caller_ego_create_cont (void *cls, 509caller_ego_create_cont (void *cls,
510 const struct GNUNET_IDENTITY_PrivateKey *pk, 510 const struct GNUNET_IDENTITY_PrivateKey *pk,
511 const char *emsg) 511 enum GNUNET_ErrorCode ec)
512{ 512{
513 (void) cls; 513 (void) cls;
514 op = NULL; 514 op = NULL;
515 GNUNET_assert (NULL == emsg); 515 GNUNET_assert (GNUNET_EC_NONE == ec);
516} 516}
517 517
518 518
519static void 519static void
520namestore_put_cont (void *cls, int32_t success, const char *emsg) 520namestore_put_cont (void *cls, enum GNUNET_ErrorCode ec)
521{ 521{
522 (void) cls; 522 (void) cls;
523 qe = NULL; 523 qe = NULL;
524 GNUNET_assert (GNUNET_YES == success); 524 GNUNET_assert (GNUNET_EC_NONE == ec);
525 GNUNET_assert (NULL == emsg);
526 GNUNET_assert (NULL == op); 525 GNUNET_assert (NULL == op);
527 op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, 526 op = GNUNET_IDENTITY_create (id, "caller-ego", NULL,
528 GNUNET_IDENTITY_TYPE_ECDSA, 527 GNUNET_IDENTITY_TYPE_ECDSA,
@@ -597,11 +596,11 @@ identity_cb (void *cls,
597static void 596static void
598phone_ego_create_cont (void *cls, 597phone_ego_create_cont (void *cls,
599 const struct GNUNET_IDENTITY_PrivateKey *pk, 598 const struct GNUNET_IDENTITY_PrivateKey *pk,
600 const char *emsg) 599 enum GNUNET_ErrorCode ec)
601{ 600{
602 (void) cls; 601 (void) cls;
603 op = NULL; 602 op = NULL;
604 GNUNET_assert (NULL == emsg); 603 GNUNET_assert (GNUNET_EC_NONE == ec);
605} 604}
606 605
607 606