aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-service-revocation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 07:41:21 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 07:41:21 +0000
commitad989721684818bee9a0a1f81d5fb085241959ab (patch)
treed3761d4e3af72e1d9c67565b682271a4801436d6 /src/revocation/gnunet-service-revocation.c
parent2315ef124c25961fc88eadbf6b9d396de5d8f992 (diff)
downloadgnunet-ad989721684818bee9a0a1f81d5fb085241959ab.tar.gz
gnunet-ad989721684818bee9a0a1f81d5fb085241959ab.zip
-implementing revocation library
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
-rw-r--r--src/revocation/gnunet-service-revocation.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index f310429d3..168f8c6ef 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -125,7 +125,7 @@ static unsigned long long revocation_work_required;
125 * #GNUNET_NO if the key/signature don't verify 125 * #GNUNET_NO if the key/signature don't verify
126 */ 126 */
127static int 127static int
128verify_revoke_message (const struct GNUNET_REVOCATION_RevokeMessage *rm) 128verify_revoke_message (const struct RevokeMessage *rm)
129{ 129{
130 if (GNUNET_YES != 130 if (GNUNET_YES !=
131 GNUNET_REVOCATION_check_pow (&rm->public_key, 131 GNUNET_REVOCATION_check_pow (&rm->public_key,
@@ -183,11 +183,11 @@ handle_revoke_message (void *cls,
183 struct GNUNET_SERVER_Client *client, 183 struct GNUNET_SERVER_Client *client,
184 const struct GNUNET_MessageHeader *message) 184 const struct GNUNET_MessageHeader *message)
185{ 185{
186 const struct GNUNET_REVOCATION_RevokeMessage *rm; 186 const struct RevokeMessage *rm;
187 187
188 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 188 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
189 "Received REVOKE message from client\n"); 189 "Received REVOKE message from client\n");
190 rm = (const struct GNUNET_REVOCATION_RevokeMessage *) message; 190 rm = (const struct RevokeMessage *) message;
191 if (GNUNET_OK != 191 if (GNUNET_OK !=
192 verify_revoke_message (rm)) 192 verify_revoke_message (rm))
193 { 193 {
@@ -211,12 +211,12 @@ handle_p2p_revoke_message (void *cls,
211 const struct GNUNET_PeerIdentity *peer, 211 const struct GNUNET_PeerIdentity *peer,
212 const struct GNUNET_MessageHeader *message) 212 const struct GNUNET_MessageHeader *message)
213{ 213{
214 const struct GNUNET_REVOCATION_RevokeMessage *rm; 214 const struct RevokeMessage *rm;
215 215
216 216
217 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 217 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
218 "Received REVOKE message from peer\n"); 218 "Received REVOKE message from peer\n");
219 rm = (const struct GNUNET_REVOCATION_RevokeMessage *) message; 219 rm = (const struct RevokeMessage *) message;
220 if (GNUNET_OK != 220 if (GNUNET_OK !=
221 verify_revoke_message (rm)) 221 verify_revoke_message (rm))
222 { 222 {
@@ -375,14 +375,14 @@ run (void *cls,
375{ 375{
376 static const struct GNUNET_SERVER_MessageHandler handlers[] = { 376 static const struct GNUNET_SERVER_MessageHandler handlers[] = {
377 {&handle_query_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY, 377 {&handle_query_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY,
378 sizeof (struct GNUNET_REVOCATION_QueryMessage)}, 378 sizeof (struct QueryMessage)},
379 {&handle_revoke_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE, 379 {&handle_revoke_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE,
380 sizeof (struct GNUNET_REVOCATION_RevokeMessage)}, 380 sizeof (struct RevokeMessage)},
381 {NULL, NULL, 0, 0} 381 {NULL, NULL, 0, 0}
382 }; 382 };
383 static const struct GNUNET_CORE_MessageHandler core_handlers[] = { 383 static const struct GNUNET_CORE_MessageHandler core_handlers[] = {
384 {&handle_p2p_revoke_message, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE, 384 {&handle_p2p_revoke_message, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE,
385 sizeof (struct GNUNET_REVOCATION_RevokeMessage)}, 385 sizeof (struct RevokeMessage)},
386 {NULL, 0, 0} 386 {NULL, 0, 0}
387 }; 387 };
388 388