-revise API naming; cleanups
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Fri, 6 Oct 2017 14:55:48 +0000 (16:55 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Fri, 6 Oct 2017 14:55:48 +0000 (16:55 +0200)
src/identity-provider/gnunet-idp.c
src/identity-provider/identity_provider_api.c
src/include/gnunet_identity_provider_service.h
src/include/gnunet_protocols.h

index bc30a1148f3314b75780028326774d6dfd43a21f..d6544eb3b414fa4f42d69fc32224abef4e508394 100644 (file)
@@ -193,20 +193,20 @@ iter_finished (void *cls)
   }
 
   if (issue_attrs) {
-    idp_op = GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (idp_handle,
-                                                        pkey,
-                                                        &rp_key,
-                                                        attr_list,
-                                                        &ticket_issue_cb,
-                                                        NULL);
+    idp_op = GNUNET_IDENTITY_PROVIDER_ticket_issue (idp_handle,
+                                                    pkey,
+                                                    &rp_key,
+                                                    attr_list,
+                                                    &ticket_issue_cb,
+                                                    NULL);
     return;
   }
   if (consume_ticket) {
-    idp_op = GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (idp_handle,
-                                                         pkey,
-                                                         &ticket,
-                                                         &process_attrs,
-                                                         NULL);
+    idp_op = GNUNET_IDENTITY_PROVIDER_ticket_consume (idp_handle,
+                                                      pkey,
+                                                      &ticket,
+                                                      &process_attrs,
+                                                      NULL);
     return;
   }
   attr = GNUNET_IDENTITY_PROVIDER_attribute_new (attr_name,
index d623eaf3b0b98875e8bcd43494ecf2cc105784a0..33468cc13d58f2018a7a2d4aedaa1d19037c48a1 100644 (file)
@@ -1027,12 +1027,12 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At
  * @return handle to abort the operation
  */
 struct GNUNET_IDENTITY_PROVIDER_Operation *
-GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
-                                           const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
-                                           const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
-                                           const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs,
-                                           GNUNET_IDENTITY_PROVIDER_TicketCallback cb,
-                                           void *cb_cls)
+GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
+                                       const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
+                                       const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
+                                       const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs,
+                                       GNUNET_IDENTITY_PROVIDER_TicketCallback cb,
+                                       void *cb_cls)
 {
   struct GNUNET_IDENTITY_PROVIDER_Operation *op;
   struct TicketIssueMessage *tim;
@@ -1076,8 +1076,8 @@ GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handl
  * @return handle to abort the operation
  */
 struct GNUNET_IDENTITY_PROVIDER_Operation *
-GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
-                                            const struct GNUNET_CRYPTO_EcdsaPrivateKey * identity,
+GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
+                                            const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
                                             const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
                                             GNUNET_IDENTITY_PROVIDER_AttributeResult cb,
                                             void *cb_cls)
@@ -1129,14 +1129,14 @@ GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Hand
  * @return an iterator handle to use for iteration
  */
 struct GNUNET_IDENTITY_PROVIDER_TicketIterator *
-GNUNET_IDENTITY_PROVIDER_idp_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
-                                                     const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
-                                                     GNUNET_SCHEDULER_TaskCallback error_cb,
-                                                     void *error_cb_cls,
-                                                     GNUNET_IDENTITY_PROVIDER_TicketCallback proc,
-                                                     void *proc_cls,
-                                                     GNUNET_SCHEDULER_TaskCallback finish_cb,
-                                                     void *finish_cb_cls)
+GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
+                                                 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+                                                 GNUNET_SCHEDULER_TaskCallback error_cb,
+                                                 void *error_cb_cls,
+                                                 GNUNET_IDENTITY_PROVIDER_TicketCallback proc,
+                                                 void *proc_cls,
+                                                 GNUNET_SCHEDULER_TaskCallback finish_cb,
+                                                 void *finish_cb_cls)
 {
   struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it;
   struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub;
index fb5131567142a66ab41b84d274113c758065d964..d1b4371289709eb5fda46a408a242fdfb4931522 100644 (file)
@@ -319,12 +319,12 @@ typedef void
  * @return handle to abort the operation
  */
 struct GNUNET_IDENTITY_PROVIDER_Operation *
-GNUNET_IDENTITY_PROVIDER_idp_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
-                                           const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
-                                           const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
-                                           const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs,
-                                           GNUNET_IDENTITY_PROVIDER_TicketCallback cb,
-                                           void *cb_cls);
+GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
+                                       const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
+                                       const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
+                                       const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs,
+                                       GNUNET_IDENTITY_PROVIDER_TicketCallback cb,
+                                       void *cb_cls);
 
 /** TODO
  * 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
  * @return handle to abort the operation
  */
 struct GNUNET_IDENTITY_PROVIDER_Operation *
-GNUNET_IDENTITY_PROVIDER_idp_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
-                                            const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
-                                            const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
-                                            GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb,
-                                            void *cb_cls);
+GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
+                                        const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+                                        const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
+                                        GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb,
+                                        void *cb_cls);
 
 
 
@@ -351,18 +351,18 @@ GNUNET_IDENTITY_PROVIDER_idp_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Hand
  * and used to retrieve identity information from the issuer
  *
  * @param id the identity provider to use
- * @param identity the identity that is the subject of the issued ticket (the relying party)
+ * @param identity the identity that is the subject of the issued ticket (the audience)
  * @param ticket the issued ticket to consume
  * @param cb the callback to call
  * @param cb_cls the callback closure
  * @return handle to abort the operation
  */
 struct GNUNET_IDENTITY_PROVIDER_Operation *
-GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
-                                            const struct GNUNET_CRYPTO_EcdsaPrivateKey * identity,
-                                            const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
-                                            GNUNET_IDENTITY_PROVIDER_AttributeResult cb,
-                                            void *cb_cls);
+GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id,
+                                         const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+                                         const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
+                                         GNUNET_IDENTITY_PROVIDER_AttributeResult cb,
+                                         void *cb_cls);
 
 /**
  * Lists all tickets that have been issued to remote
@@ -382,14 +382,14 @@ GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Hand
  * @return an iterator handle to use for iteration
  */
 struct GNUNET_IDENTITY_PROVIDER_TicketIterator *
-GNUNET_IDENTITY_PROVIDER_idp_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
-                                                     const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
-                                                     GNUNET_SCHEDULER_TaskCallback error_cb,
-                                                     void *error_cb_cls,
-                                                     GNUNET_IDENTITY_PROVIDER_TicketCallback proc,
-                                                     void *proc_cls,
-                                                     GNUNET_SCHEDULER_TaskCallback finish_cb,
-                                                     void *finish_cb_cls);
+GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
+                                                 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+                                                 GNUNET_SCHEDULER_TaskCallback error_cb,
+                                                 void *error_cb_cls,
+                                                 GNUNET_IDENTITY_PROVIDER_TicketCallback proc,
+                                                 void *proc_cls,
+                                                 GNUNET_SCHEDULER_TaskCallback finish_cb,
+                                                 void *finish_cb_cls);
 
 /**
  * Lists all tickets that have been issued to remote
index b22e1b417ce06a686fb7b8feea8362b0131bf3d5..dd806fcac51da6d7fd4b25c5228cca26029dae97 100644 (file)
@@ -2620,39 +2620,31 @@ extern "C"
  *
  * IDENTITY PROVIDER MESSAGE TYPES
  */
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE     961
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE 961
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE  962
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE 962
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT     963
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START 963
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT  964
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP 964
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE 965
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT 965
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE 966
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT 966
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START 967
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE 967
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP 968
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT 968
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT 969
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET 969
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT 970
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT 970
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE 971
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START 971
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT 972
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP 972
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET 973
-
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT 974
-
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START 975
-
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP 976
-
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT 977
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT 973
 
 /**************************************************
  *