aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-service-conversation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-service-conversation.c')
-rw-r--r--src/conversation/gnunet-service-conversation.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index 1fff8bd26..06721e535 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -756,8 +756,8 @@ handle_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg)
756 struct GNUNET_MQ_Envelope *env; 756 struct GNUNET_MQ_Envelope *env;
757 struct ClientPhoneRingMessage *cring; 757 struct ClientPhoneRingMessage *cring;
758 struct CadetPhoneRingInfoPS rs; 758 struct CadetPhoneRingInfoPS rs;
759 struct GNUNET_IDENTITY_PublicKey identity; 759 struct GNUNET_CRYPTO_PublicKey identity;
760 struct GNUNET_IDENTITY_Signature sig; 760 struct GNUNET_CRYPTO_Signature sig;
761 size_t key_len; 761 size_t key_len;
762 size_t sig_len; 762 size_t sig_len;
763 size_t read; 763 size_t read;
@@ -771,7 +771,7 @@ handle_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg)
771 sig_len = ntohl (msg->sig_len); 771 sig_len = ntohl (msg->sig_len);
772 772
773 if ((GNUNET_SYSERR == 773 if ((GNUNET_SYSERR ==
774 GNUNET_IDENTITY_read_public_key_from_buffer (&msg[1], 774 GNUNET_CRYPTO_read_public_key_from_buffer (&msg[1],
775 key_len, 775 key_len,
776 &identity, 776 &identity,
777 &read)) || 777 &read)) ||
@@ -781,11 +781,11 @@ handle_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg)
781 destroy_line_cadet_channels (ch); 781 destroy_line_cadet_channels (ch);
782 return; 782 return;
783 } 783 }
784 GNUNET_IDENTITY_read_signature_from_buffer (&sig, 784 GNUNET_CRYPTO_read_signature_from_buffer (&sig,
785 (char*) &msg[1] + read, 785 (char*) &msg[1] + read,
786 sig_len); 786 sig_len);
787 if (GNUNET_OK != 787 if (GNUNET_OK !=
788 GNUNET_IDENTITY_signature_verify ( 788 GNUNET_CRYPTO_signature_verify (
789 GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING, 789 GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING,
790 &rs, 790 &rs,
791 &sig, 791 &sig,
@@ -1165,9 +1165,9 @@ handle_client_call_message (void *cls, const struct ClientCallMessage *msg)
1165 struct GNUNET_MQ_Envelope *e; 1165 struct GNUNET_MQ_Envelope *e;
1166 struct CadetPhoneRingMessage *ring; 1166 struct CadetPhoneRingMessage *ring;
1167 struct CadetPhoneRingInfoPS rs; 1167 struct CadetPhoneRingInfoPS rs;
1168 struct GNUNET_IDENTITY_PrivateKey caller_id; 1168 struct GNUNET_CRYPTO_PrivateKey caller_id;
1169 struct GNUNET_IDENTITY_PublicKey caller_id_pub; 1169 struct GNUNET_CRYPTO_PublicKey caller_id_pub;
1170 struct GNUNET_IDENTITY_Signature sig; 1170 struct GNUNET_CRYPTO_Signature sig;
1171 ssize_t written; 1171 ssize_t written;
1172 size_t key_len; 1172 size_t key_len;
1173 size_t pkey_len; 1173 size_t pkey_len;
@@ -1183,7 +1183,7 @@ handle_client_call_message (void *cls, const struct ClientCallMessage *msg)
1183 GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (RING_TIMEOUT)); 1183 GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (RING_TIMEOUT));
1184 key_len = ntohl (msg->key_len); 1184 key_len = ntohl (msg->key_len);
1185 if (GNUNET_SYSERR == 1185 if (GNUNET_SYSERR ==
1186 GNUNET_IDENTITY_read_private_key_from_buffer (&msg[1], 1186 GNUNET_CRYPTO_read_private_key_from_buffer (&msg[1],
1187 key_len, 1187 key_len,
1188 &caller_id, 1188 &caller_id,
1189 &read)) 1189 &read))
@@ -1205,19 +1205,19 @@ handle_client_call_message (void *cls, const struct ClientCallMessage *msg)
1205 cadet_handlers); 1205 cadet_handlers);
1206 ch->mq = GNUNET_CADET_get_mq (ch->channel); 1206 ch->mq = GNUNET_CADET_get_mq (ch->channel);
1207 GNUNET_assert (read == key_len); 1207 GNUNET_assert (read == key_len);
1208 GNUNET_IDENTITY_sign (&caller_id, &rs, &sig); 1208 GNUNET_CRYPTO_sign (&caller_id, &rs, &sig);
1209 sig_len = GNUNET_IDENTITY_signature_get_length (&sig); 1209 sig_len = GNUNET_CRYPTO_signature_get_length (&sig);
1210 GNUNET_IDENTITY_key_get_public (&caller_id, &caller_id_pub); 1210 GNUNET_CRYPTO_key_get_public (&caller_id, &caller_id_pub);
1211 pkey_len = GNUNET_IDENTITY_public_key_get_length (&caller_id_pub); 1211 pkey_len = GNUNET_CRYPTO_public_key_get_length (&caller_id_pub);
1212 e = GNUNET_MQ_msg_extra (ring, pkey_len + sig_len, 1212 e = GNUNET_MQ_msg_extra (ring, pkey_len + sig_len,
1213 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING); 1213 GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING);
1214 written = GNUNET_IDENTITY_write_public_key_to_buffer (&caller_id_pub, 1214 written = GNUNET_CRYPTO_write_public_key_to_buffer (&caller_id_pub,
1215 &ring[1], 1215 &ring[1],
1216 pkey_len); 1216 pkey_len);
1217 ring->expiration_time = rs.expiration_time; 1217 ring->expiration_time = rs.expiration_time;
1218 ring->key_len = htonl (pkey_len); 1218 ring->key_len = htonl (pkey_len);
1219 ring->sig_len = htonl (sig_len); 1219 ring->sig_len = htonl (sig_len);
1220 GNUNET_IDENTITY_write_signature_to_buffer (&sig, 1220 GNUNET_CRYPTO_write_signature_to_buffer (&sig,
1221 (char *) &ring[1] + written, 1221 (char *) &ring[1] + written,
1222 sig_len); 1222 sig_len);
1223 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending RING message via CADET\n"); 1223 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending RING message via CADET\n");