aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2017-10-06 16:55:48 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2017-10-06 16:55:48 +0200
commit371458b9ed084c6d510a03c9ea27cb8162f0e87a (patch)
tree67b782f2969f6c20389ec8083dd92c78d536e48d /src
parentcc838240da0d28fa1fc6d7a97da2808a7a622365 (diff)
downloadgnunet-371458b9ed084c6d510a03c9ea27cb8162f0e87a.tar.gz
gnunet-371458b9ed084c6d510a03c9ea27cb8162f0e87a.zip
-revise API naming; cleanups
Diffstat (limited to 'src')
-rw-r--r--src/identity-provider/gnunet-idp.c22
-rw-r--r--src/identity-provider/identity_provider_api.c32
-rw-r--r--src/include/gnunet_identity_provider_service.h50
-rw-r--r--src/include/gnunet_protocols.h34
4 files changed, 65 insertions, 73 deletions
diff --git a/src/identity-provider/gnunet-idp.c b/src/identity-provider/gnunet-idp.c
index bc30a1148..d6544eb3b 100644
--- a/src/identity-provider/gnunet-idp.c
+++ b/src/identity-provider/gnunet-idp.c
@@ -193,20 +193,20 @@ iter_finished (void *cls)
193 } 193 }
194 194
195 if (issue_attrs) { 195 if (issue_attrs) {
196 idp_op = GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (idp_handle, 196 idp_op = GNUNET_IDENTITY_PROVIDER_ticket_issue (idp_handle,
197 pkey, 197 pkey,
198 &rp_key, 198 &rp_key,
199 attr_list, 199 attr_list,
200 &ticket_issue_cb, 200 &ticket_issue_cb,
201 NULL); 201 NULL);
202 return; 202 return;
203 } 203 }
204 if (consume_ticket) { 204 if (consume_ticket) {
205 idp_op = GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (idp_handle, 205 idp_op = GNUNET_IDENTITY_PROVIDER_ticket_consume (idp_handle,
206 pkey, 206 pkey,
207 &ticket, 207 &ticket,
208 &process_attrs, 208 &process_attrs,
209 NULL); 209 NULL);
210 return; 210 return;
211 } 211 }
212 attr = GNUNET_IDENTITY_PROVIDER_attribute_new (attr_name, 212 attr = GNUNET_IDENTITY_PROVIDER_attribute_new (attr_name,
diff --git a/src/identity-provider/identity_provider_api.c b/src/identity-provider/identity_provider_api.c
index d623eaf3b..33468cc13 100644
--- a/src/identity-provider/identity_provider_api.c
+++ b/src/identity-provider/identity_provider_api.c
@@ -1027,12 +1027,12 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At
1027 * @return handle to abort the operation 1027 * @return handle to abort the operation
1028 */ 1028 */
1029struct GNUNET_IDENTITY_PROVIDER_Operation * 1029struct GNUNET_IDENTITY_PROVIDER_Operation *
1030GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h, 1030GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
1031 const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, 1031 const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
1032 const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, 1032 const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
1033 const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs, 1033 const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs,
1034 GNUNET_IDENTITY_PROVIDER_TicketCallback cb, 1034 GNUNET_IDENTITY_PROVIDER_TicketCallback cb,
1035 void *cb_cls) 1035 void *cb_cls)
1036{ 1036{
1037 struct GNUNET_IDENTITY_PROVIDER_Operation *op; 1037 struct GNUNET_IDENTITY_PROVIDER_Operation *op;
1038 struct TicketIssueMessage *tim; 1038 struct TicketIssueMessage *tim;
@@ -1076,8 +1076,8 @@ GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handl
1076 * @return handle to abort the operation 1076 * @return handle to abort the operation
1077 */ 1077 */
1078struct GNUNET_IDENTITY_PROVIDER_Operation * 1078struct GNUNET_IDENTITY_PROVIDER_Operation *
1079GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h, 1079GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
1080 const struct GNUNET_CRYPTO_EcdsaPrivateKey * identity, 1080 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
1081 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, 1081 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
1082 GNUNET_IDENTITY_PROVIDER_AttributeResult cb, 1082 GNUNET_IDENTITY_PROVIDER_AttributeResult cb,
1083 void *cb_cls) 1083 void *cb_cls)
@@ -1129,14 +1129,14 @@ GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Hand
1129 * @return an iterator handle to use for iteration 1129 * @return an iterator handle to use for iteration
1130 */ 1130 */
1131struct GNUNET_IDENTITY_PROVIDER_TicketIterator * 1131struct GNUNET_IDENTITY_PROVIDER_TicketIterator *
1132GNUNET_IDENTITY_PROVIDER_idp_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, 1132GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
1133 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 1133 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
1134 GNUNET_SCHEDULER_TaskCallback error_cb, 1134 GNUNET_SCHEDULER_TaskCallback error_cb,
1135 void *error_cb_cls, 1135 void *error_cb_cls,
1136 GNUNET_IDENTITY_PROVIDER_TicketCallback proc, 1136 GNUNET_IDENTITY_PROVIDER_TicketCallback proc,
1137 void *proc_cls, 1137 void *proc_cls,
1138 GNUNET_SCHEDULER_TaskCallback finish_cb, 1138 GNUNET_SCHEDULER_TaskCallback finish_cb,
1139 void *finish_cb_cls) 1139 void *finish_cb_cls)
1140{ 1140{
1141 struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it; 1141 struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it;
1142 struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub; 1142 struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub;
diff --git a/src/include/gnunet_identity_provider_service.h b/src/include/gnunet_identity_provider_service.h
index fb5131567..d1b437128 100644
--- a/src/include/gnunet_identity_provider_service.h
+++ b/src/include/gnunet_identity_provider_service.h
@@ -319,12 +319,12 @@ typedef void
319 * @return handle to abort the operation 319 * @return handle to abort the operation
320 */ 320 */
321struct GNUNET_IDENTITY_PROVIDER_Operation * 321struct GNUNET_IDENTITY_PROVIDER_Operation *
322GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *id, 322GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
323 const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, 323 const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
324 const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, 324 const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
325 const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs, 325 const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs,
326 GNUNET_IDENTITY_PROVIDER_TicketCallback cb, 326 GNUNET_IDENTITY_PROVIDER_TicketCallback cb,
327 void *cb_cls); 327 void *cb_cls);
328 328
329/** TODO 329/** TODO
330 * Revoked an issued ticket. The relying party will be unable to retrieve 330 * Revoked an issued ticket. The relying party will be unable to retrieve
@@ -338,11 +338,11 @@ GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handl
338 * @return handle to abort the operation 338 * @return handle to abort the operation
339 */ 339 */
340struct GNUNET_IDENTITY_PROVIDER_Operation * 340struct GNUNET_IDENTITY_PROVIDER_Operation *
341GNUNET_IDENTITY_PROVIDER_idp_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *id, 341GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
342 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 342 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
343 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, 343 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
344 GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb, 344 GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb,
345 void *cb_cls); 345 void *cb_cls);
346 346
347 347
348 348
@@ -351,18 +351,18 @@ GNUNET_IDENTITY_PROVIDER_idp_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Hand
351 * and used to retrieve identity information from the issuer 351 * and used to retrieve identity information from the issuer
352 * 352 *
353 * @param id the identity provider to use 353 * @param id the identity provider to use
354 * @param identity the identity that is the subject of the issued ticket (the relying party) 354 * @param identity the identity that is the subject of the issued ticket (the audience)
355 * @param ticket the issued ticket to consume 355 * @param ticket the issued ticket to consume
356 * @param cb the callback to call 356 * @param cb the callback to call
357 * @param cb_cls the callback closure 357 * @param cb_cls the callback closure
358 * @return handle to abort the operation 358 * @return handle to abort the operation
359 */ 359 */
360struct GNUNET_IDENTITY_PROVIDER_Operation * 360struct GNUNET_IDENTITY_PROVIDER_Operation *
361GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id, 361GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
362 const struct GNUNET_CRYPTO_EcdsaPrivateKey * identity, 362 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
363 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, 363 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
364 GNUNET_IDENTITY_PROVIDER_AttributeResult cb, 364 GNUNET_IDENTITY_PROVIDER_AttributeResult cb,
365 void *cb_cls); 365 void *cb_cls);
366 366
367/** 367/**
368 * Lists all tickets that have been issued to remote 368 * Lists all tickets that have been issued to remote
@@ -382,14 +382,14 @@ GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Hand
382 * @return an iterator handle to use for iteration 382 * @return an iterator handle to use for iteration
383 */ 383 */
384struct GNUNET_IDENTITY_PROVIDER_TicketIterator * 384struct GNUNET_IDENTITY_PROVIDER_TicketIterator *
385GNUNET_IDENTITY_PROVIDER_idp_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, 385GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
386 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 386 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
387 GNUNET_SCHEDULER_TaskCallback error_cb, 387 GNUNET_SCHEDULER_TaskCallback error_cb,
388 void *error_cb_cls, 388 void *error_cb_cls,
389 GNUNET_IDENTITY_PROVIDER_TicketCallback proc, 389 GNUNET_IDENTITY_PROVIDER_TicketCallback proc,
390 void *proc_cls, 390 void *proc_cls,
391 GNUNET_SCHEDULER_TaskCallback finish_cb, 391 GNUNET_SCHEDULER_TaskCallback finish_cb,
392 void *finish_cb_cls); 392 void *finish_cb_cls);
393 393
394/** 394/**
395 * Lists all tickets that have been issued to remote 395 * Lists all tickets that have been issued to remote
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index b22e1b417..dd806fcac 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2620,39 +2620,31 @@ extern "C"
2620 * 2620 *
2621 * IDENTITY PROVIDER MESSAGE TYPES 2621 * IDENTITY PROVIDER MESSAGE TYPES
2622 */ 2622 */
2623#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE 961 2623#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE 961
2624 2624
2625#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE 962 2625#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE 962
2626 2626
2627#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT 963 2627#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START 963
2628 2628
2629#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT 964 2629#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP 964
2630 2630
2631#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE 965 2631#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT 965
2632 2632
2633#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE 966 2633#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT 966
2634 2634
2635#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START 967 2635#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE 967
2636 2636
2637#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP 968 2637#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT 968
2638 2638
2639#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT 969 2639#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET 969
2640 2640
2641#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT 970 2641#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT 970
2642 2642
2643#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE 971 2643#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START 971
2644 2644
2645#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT 972 2645#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP 972
2646 2646
2647#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET 973 2647#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT 973
2648
2649#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT 974
2650
2651#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START 975
2652
2653#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP 976
2654
2655#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT 977
2656 2648
2657/************************************************** 2649/**************************************************
2658 * 2650 *