gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 05/07: - towards fix reclaim


From: gnunet
Subject: [gnunet] 05/07: - towards fix reclaim
Date: Thu, 15 Oct 2020 12:18:59 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 5680378974db794d67b75473435a0651fad0cd24
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Thu Oct 15 09:09:23 2020 +0200

    - towards fix reclaim
---
 src/include/gnunet_reclaim_service.h         | 33 ++++++++--------
 src/reclaim/gnunet-reclaim.c                 | 14 +++----
 src/reclaim/gnunet-service-reclaim.c         | 26 ++++++-------
 src/reclaim/gnunet-service-reclaim_tickets.c | 36 +++++++++---------
 src/reclaim/gnunet-service-reclaim_tickets.h | 12 +++---
 src/reclaim/oidc_helper.c                    | 22 +++++------
 src/reclaim/oidc_helper.h                    | 10 ++---
 src/reclaim/plugin_rest_openid_connect.c     | 57 +++++++++++++---------------
 src/reclaim/plugin_rest_reclaim.c            | 44 ++++++++++-----------
 src/reclaim/reclaim.h                        | 26 ++++++-------
 src/reclaim/reclaim_api.c                    | 30 +++++++--------
 src/reclaim/test_reclaim_attribute.c         |  2 -
 12 files changed, 153 insertions(+), 159 deletions(-)

diff --git a/src/include/gnunet_reclaim_service.h 
b/src/include/gnunet_reclaim_service.h
index 368058f56..8549081a1 100644
--- a/src/include/gnunet_reclaim_service.h
+++ b/src/include/gnunet_reclaim_service.h
@@ -38,6 +38,7 @@ extern "C" {
 #endif
 #endif
 
+#include "gnunet_identity_service.h"
 #include "gnunet_reclaim_lib.h"
 #include "gnunet_util_lib.h"
 
@@ -69,12 +70,12 @@ struct GNUNET_RECLAIM_Ticket
   /**
    * The ticket issuer (= the user)
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey identity;
+  struct GNUNET_IDENTITY_PublicKey identity;
 
   /**
    * The ticket audience (= relying party)
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey audience;
+  struct GNUNET_IDENTITY_PublicKey audience;
 
   /**
    * The ticket random identifier
@@ -129,7 +130,7 @@ typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void 
*cls,
  * @param attr The attribute
  */
 typedef void (*GNUNET_RECLAIM_AttributeResult) (
-  void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+  void *cls, const struct GNUNET_IDENTITY_PublicKey *identity,
   const struct GNUNET_RECLAIM_Attribute *attr);
 
 /**
@@ -141,7 +142,7 @@ typedef void (*GNUNET_RECLAIM_AttributeResult) (
  * @param presentation The presentation for the credential (may be NULL)
  */
 typedef void (*GNUNET_RECLAIM_AttributeTicketResult) (
-  void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+  void *cls, const struct GNUNET_IDENTITY_PublicKey *identity,
   const struct GNUNET_RECLAIM_Attribute *attr,
   const struct GNUNET_RECLAIM_Presentation *presentation);
 
@@ -155,7 +156,7 @@ typedef void (*GNUNET_RECLAIM_AttributeTicketResult) (
  * @param attributes the parsed attributes
  */
 typedef void (*GNUNET_RECLAIM_CredentialResult) (
-  void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+  void *cls, const struct GNUNET_IDENTITY_PublicKey *identity,
   const struct GNUNET_RECLAIM_Credential *credential);
 
 
@@ -184,7 +185,7 @@ GNUNET_RECLAIM_connect (const struct 
GNUNET_CONFIGURATION_Handle *cfg);
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_attribute_store (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Attribute *attr,
   const struct GNUNET_TIME_Relative *exp_interval,
   GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
@@ -205,7 +206,7 @@ GNUNET_RECLAIM_attribute_store (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_credential_store (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Credential *credential,
   const struct GNUNET_TIME_Relative *exp_interval,
   GNUNET_RECLAIM_ContinuationWithStatus cont,
@@ -226,7 +227,7 @@ GNUNET_RECLAIM_credential_store (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_attribute_delete (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Attribute *attr,
   GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
 
@@ -244,7 +245,7 @@ GNUNET_RECLAIM_attribute_delete (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_credential_delete (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Credential *cred,
   GNUNET_RECLAIM_ContinuationWithStatus cont,
   void *cont_cls);
@@ -276,7 +277,7 @@ GNUNET_RECLAIM_credential_delete (
 struct GNUNET_RECLAIM_AttributeIterator *
 GNUNET_RECLAIM_get_attributes_start (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls,
   GNUNET_RECLAIM_AttributeResult proc, void *proc_cls,
   GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls);
@@ -332,7 +333,7 @@ GNUNET_RECLAIM_get_attributes_stop (
 struct GNUNET_RECLAIM_CredentialIterator *
 GNUNET_RECLAIM_get_credentials_start (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   GNUNET_SCHEDULER_TaskCallback error_cb,
   void *error_cb_cls,
   GNUNET_RECLAIM_CredentialResult proc,
@@ -380,8 +381,8 @@ GNUNET_RECLAIM_get_credentials_stop (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_ticket_issue (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
-  const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
+  const struct GNUNET_IDENTITY_PrivateKey *iss,
+  const struct GNUNET_IDENTITY_PublicKey *rp,
   const struct GNUNET_RECLAIM_AttributeList *attrs,
   GNUNET_RECLAIM_IssueTicketCallback cb, void *cb_cls);
 
@@ -402,7 +403,7 @@ GNUNET_RECLAIM_ticket_issue (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_ticket_revoke (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   const struct GNUNET_RECLAIM_Ticket *ticket,
   GNUNET_RECLAIM_ContinuationWithStatus cb, void *cb_cls);
 
@@ -422,7 +423,7 @@ GNUNET_RECLAIM_ticket_revoke (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_ticket_consume (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   const struct GNUNET_RECLAIM_Ticket *ticket,
   GNUNET_RECLAIM_AttributeTicketResult cb, void *cb_cls);
 
@@ -447,7 +448,7 @@ GNUNET_RECLAIM_ticket_consume (
 struct GNUNET_RECLAIM_TicketIterator *
 GNUNET_RECLAIM_ticket_iteration_start (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls,
   GNUNET_RECLAIM_TicketCallback proc, void *proc_cls,
   GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls);
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c
index b9306b802..cefb66b8f 100644
--- a/src/reclaim/gnunet-reclaim.c
+++ b/src/reclaim/gnunet-reclaim.c
@@ -152,12 +152,12 @@ static struct GNUNET_RECLAIM_TicketIterator 
*ticket_iterator;
 /**
  * ego private key
  */
-static const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey;
+static const struct GNUNET_IDENTITY_PrivateKey *pkey;
 
 /**
  * rp public key
  */
-static struct GNUNET_CRYPTO_EcdsaPublicKey rp_key;
+static struct GNUNET_IDENTITY_PublicKey rp_key;
 
 /**
  * Ticket to consume
@@ -261,7 +261,7 @@ store_cont (void *cls, int32_t success, const char *emsg)
 
 static void
 process_attrs (void *cls,
-               const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+               const struct GNUNET_IDENTITY_PublicKey *identity,
                const struct GNUNET_RECLAIM_Attribute *attr,
                const struct GNUNET_RECLAIM_Presentation *presentation)
 {
@@ -346,7 +346,7 @@ ticket_iter (void *cls, const struct GNUNET_RECLAIM_Ticket 
*ticket)
   aud =
     GNUNET_STRINGS_data_to_string_alloc (&ticket->audience,
                                          sizeof(struct
-                                                GNUNET_CRYPTO_EcdsaPublicKey));
+                                                GNUNET_IDENTITY_PublicKey));
   ref = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, 
sizeof(ticket->rnd));
   tkt =
     GNUNET_STRINGS_data_to_string_alloc (ticket,
@@ -511,7 +511,7 @@ iter_finished (void *cls)
 
 static void
 iter_cb (void *cls,
-         const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+         const struct GNUNET_IDENTITY_PublicKey *identity,
          const struct GNUNET_RECLAIM_Attribute *attr)
 {
   struct GNUNET_RECLAIM_AttributeListEntry *le;
@@ -653,7 +653,7 @@ cred_iter_finished (void *cls)
 
 static void
 cred_iter_cb (void *cls,
-              const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+              const struct GNUNET_IDENTITY_PublicKey *identity,
               const struct GNUNET_RECLAIM_Credential *cred)
 {
   char *cred_str;
@@ -734,7 +734,7 @@ start_process ()
 
   if ((NULL != rp) &&
       (GNUNET_OK !=
-       GNUNET_CRYPTO_ecdsa_public_key_from_string (rp, strlen (rp), &rp_key)) )
+       GNUNET_IDENTITY_public_key_from_string (rp, &rp_key)) )
   {
     fprintf (stderr, "%s is not a public key!\n", rp);
     cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
diff --git a/src/reclaim/gnunet-service-reclaim.c 
b/src/reclaim/gnunet-service-reclaim.c
index d2cdc62a2..0774fecea 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -110,7 +110,7 @@ struct Iterator
   /**
    * Key of the zone we are iterating over.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * Namestore iterator
@@ -266,7 +266,7 @@ struct AttributeDeleteHandle
   /**
    * Identity
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
 
   /**
@@ -334,12 +334,12 @@ struct AttributeStoreHandle
   /**
    * Identity
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * Identity pubkey
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey identity_pkey;
+  struct GNUNET_IDENTITY_PublicKey identity_pkey;
 
   /**
    * QueueEntry
@@ -862,7 +862,7 @@ handle_revoke_ticket_message (void *cls, const struct 
RevokeTicketMessage *rm)
  */
 static void
 consume_result_cb (void *cls,
-                   const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+                   const struct GNUNET_IDENTITY_PublicKey *identity,
                    const struct GNUNET_RECLAIM_AttributeList *attrs,
                    const struct GNUNET_RECLAIM_PresentationList *presentations,
                    int32_t success,
@@ -1082,7 +1082,7 @@ handle_attribute_store_message (void *cls,
   ash->r_id = ntohl (sam->id);
   ash->identity = sam->identity;
   ash->exp.rel_value_us = GNUNET_ntohll (sam->exp);
-  GNUNET_CRYPTO_ecdsa_key_get_public (&sam->identity, &ash->identity_pkey);
+  GNUNET_IDENTITY_key_get_public (&sam->identity, &ash->identity_pkey);
 
   GNUNET_SERVICE_client_continue (idp->client);
   ash->client = idp;
@@ -1157,7 +1157,7 @@ cred_error (void *cls)
 */
 static void
 cred_add_cb (void *cls,
-             const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+             const struct GNUNET_IDENTITY_PrivateKey *zone,
              const char *label,
              unsigned int rd_count,
              const struct GNUNET_GNSRECORD_Data *rd)
@@ -1266,7 +1266,7 @@ handle_credential_store_message (void *cls,
   ash->r_id = ntohl (sam->id);
   ash->identity = sam->identity;
   ash->exp.rel_value_us = GNUNET_ntohll (sam->exp);
-  GNUNET_CRYPTO_ecdsa_key_get_public (&sam->identity, &ash->identity_pkey);
+  GNUNET_IDENTITY_key_get_public (&sam->identity, &ash->identity_pkey);
 
   GNUNET_SERVICE_client_continue (idp->client);
   ash->client = idp;
@@ -1311,7 +1311,7 @@ send_delete_response (struct AttributeDeleteHandle *adh, 
int32_t success)
  */
 static void
 ticket_iter (void *cls,
-             const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+             const struct GNUNET_IDENTITY_PrivateKey *zone,
              const char *label,
              unsigned int rd_count,
              const struct GNUNET_GNSRECORD_Data *rd)
@@ -1739,7 +1739,7 @@ attr_iter_error (void *cls)
  */
 static void
 attr_iter_cb (void *cls,
-              const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+              const struct GNUNET_IDENTITY_PrivateKey *zone,
               const char *label,
               unsigned int rd_count,
               const struct GNUNET_GNSRECORD_Data *rd)
@@ -1764,7 +1764,7 @@ attr_iter_cb (void *cls,
                              GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
   arm->id = htonl (ai->request_id);
   arm->attr_len = htons (rd->data_size);
-  GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
+  GNUNET_IDENTITY_key_get_public (zone, &arm->identity);
   data_tmp = (char *) &arm[1];
   GNUNET_memcpy (data_tmp, rd->data, rd->data_size);
   GNUNET_MQ_send (ai->client->mq, env);
@@ -1923,7 +1923,7 @@ cred_iter_error (void *cls)
  */
 static void
 cred_iter_cb (void *cls,
-              const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+              const struct GNUNET_IDENTITY_PrivateKey *zone,
               const char *label,
               unsigned int rd_count,
               const struct GNUNET_GNSRECORD_Data *rd)
@@ -1948,7 +1948,7 @@ cred_iter_cb (void *cls,
                              GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT);
   arm->id = htonl (ai->request_id);
   arm->credential_len = htons (rd->data_size);
-  GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
+  GNUNET_IDENTITY_key_get_public (zone, &arm->identity);
   data_tmp = (char *) &arm[1];
   GNUNET_memcpy (data_tmp, rd->data, rd->data_size);
 
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c 
b/src/reclaim/gnunet-service-reclaim_tickets.c
index 4dd8100f9..0b1730bec 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.c
+++ b/src/reclaim/gnunet-service-reclaim_tickets.c
@@ -86,12 +86,12 @@ struct RECLAIM_TICKETS_ConsumeHandle
   /**
    * Audience Key
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * Audience Key
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub;
+  struct GNUNET_IDENTITY_PublicKey identity_pub;
 
   /**
    * Lookup DLL
@@ -180,7 +180,7 @@ struct TicketIssueHandle
   /**
    * Issuer Key
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * Ticket to issue
@@ -263,7 +263,7 @@ struct RECLAIM_TICKETS_RevokeHandle
   /**
    * Issuer Key
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * Callback
@@ -490,7 +490,7 @@ rvk_ticket_update_finished (void *cls)
  */
 static void
 rvk_ticket_update (void *cls,
-                   const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+                   const struct GNUNET_IDENTITY_PrivateKey *zone,
                    const char *label,
                    unsigned int rd_count,
                    const struct GNUNET_GNSRECORD_Data *rd)
@@ -665,7 +665,7 @@ move_attr_finished (void *cls, int32_t success, const char 
*emsg)
  */
 static void
 rvk_move_attr_cb (void *cls,
-                  const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+                  const struct GNUNET_IDENTITY_PrivateKey *zone,
                   const char *label,
                   unsigned int rd_count,
                   const struct GNUNET_GNSRECORD_Data *rd)
@@ -850,7 +850,7 @@ remove_ticket_cont (void *cls, int32_t success, const char 
*emsg)
  */
 static void
 revoke_attrs_cb (void *cls,
-                 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+                 const struct GNUNET_IDENTITY_PrivateKey *zone,
                  const char *label,
                  unsigned int rd_count,
                  const struct GNUNET_GNSRECORD_Data *rd)
@@ -913,7 +913,7 @@ rvk_attrs_err_cb (void *cls)
  */
 struct RECLAIM_TICKETS_RevokeHandle *
 RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket,
-                        const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+                        const struct GNUNET_IDENTITY_PrivateKey *identity,
                         RECLAIM_TICKETS_RevokeCallback cb,
                         void *cb_cls)
 {
@@ -925,7 +925,7 @@ RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket 
*ticket,
   rvk->cb_cls = cb_cls;
   rvk->identity = *identity;
   rvk->ticket = *ticket;
-  GNUNET_CRYPTO_ecdsa_key_get_public (&rvk->identity, &rvk->ticket.identity);
+  GNUNET_IDENTITY_key_get_public (&rvk->identity, &rvk->ticket.identity);
   /** Get shared attributes **/
   label = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd,
                                                sizeof(ticket->rnd));
@@ -1184,7 +1184,7 @@ lookup_authz_cb (void *cls,
  * @return handle to the operation
  */
 struct RECLAIM_TICKETS_ConsumeHandle *
-RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id,
+RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id,
                          const struct GNUNET_RECLAIM_Ticket *ticket,
                          RECLAIM_TICKETS_ConsumeCallback cb,
                          void *cb_cls)
@@ -1195,7 +1195,7 @@ RECLAIM_TICKETS_consume (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *id,
   cth = GNUNET_new (struct RECLAIM_TICKETS_ConsumeHandle);
 
   cth->identity = *id;
-  GNUNET_CRYPTO_ecdsa_key_get_public (&cth->identity, &cth->identity_pub);
+  GNUNET_IDENTITY_key_get_public (&cth->identity, &cth->identity_pub);
   cth->attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList);
   cth->presentations = GNUNET_new (struct GNUNET_RECLAIM_PresentationList);
   cth->ticket = *ticket;
@@ -1453,7 +1453,7 @@ filter_tickets_error_cb (void *cls)
  */
 static void
 filter_tickets_cb (void *cls,
-                   const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+                   const struct GNUNET_IDENTITY_PrivateKey *zone,
                    const char *label,
                    unsigned int rd_count,
                    const struct GNUNET_GNSRECORD_Data *rd)
@@ -1489,7 +1489,7 @@ filter_tickets_cb (void *cls,
       // cmp audience
       if (0 == memcmp (&tih->ticket.audience,
                        &ticket->audience,
-                       sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)))
+                       sizeof(struct GNUNET_IDENTITY_PublicKey)))
       {
         tih->ticket = *ticket;
         continue;
@@ -1602,7 +1602,7 @@ filter_tickets_finished_cb (void *cls)
 {
   struct TicketIssueHandle *tih = cls;
 
-  GNUNET_CRYPTO_ecdsa_key_get_public (&tih->identity, &tih->ticket.identity);
+  GNUNET_IDENTITY_key_get_public (&tih->identity, &tih->ticket.identity);
   GNUNET_RECLAIM_id_generate (&tih->ticket.rnd);
   issue_ticket (tih);
 }
@@ -1620,9 +1620,9 @@ filter_tickets_finished_cb (void *cls)
  * FIXME: Return handle??
  */
 void
-RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+RECLAIM_TICKETS_issue (const struct GNUNET_IDENTITY_PrivateKey *identity,
                        const struct GNUNET_RECLAIM_AttributeList *attrs,
-                       const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
+                       const struct GNUNET_IDENTITY_PublicKey *audience,
                        RECLAIM_TICKETS_TicketResult cb,
                        void *cb_cls)
 {
@@ -1680,7 +1680,7 @@ cleanup_iter (struct RECLAIM_TICKETS_Iterator *iter)
  */
 static void
 collect_tickets_cb (void *cls,
-                    const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+                    const struct GNUNET_IDENTITY_PrivateKey *zone,
                     const char *label,
                     unsigned int rd_count,
                     const struct GNUNET_GNSRECORD_Data *rd)
@@ -1765,7 +1765,7 @@ RECLAIM_TICKETS_iteration_stop (struct 
RECLAIM_TICKETS_Iterator *iter)
  */
 struct RECLAIM_TICKETS_Iterator *
 RECLAIM_TICKETS_iteration_start (
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   RECLAIM_TICKETS_TicketIter cb,
   void *cb_cls)
 {
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.h 
b/src/reclaim/gnunet-service-reclaim_tickets.h
index 0dd790fc7..9c31a6143 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.h
+++ b/src/reclaim/gnunet-service-reclaim_tickets.h
@@ -138,7 +138,7 @@ typedef void (*RECLAIM_TICKETS_TicketResult) (
  */
 typedef void (*RECLAIM_TICKETS_ConsumeCallback) (
   void *cls,
-  const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+  const struct GNUNET_IDENTITY_PublicKey *identity,
   const struct GNUNET_RECLAIM_AttributeList *attributes,
   const struct GNUNET_RECLAIM_PresentationList *presentations,
   int32_t success,
@@ -167,7 +167,7 @@ typedef void (*RECLAIM_TICKETS_RevokeCallback) (void *cls, 
int32_t success);
  */
 struct RECLAIM_TICKETS_RevokeHandle *
 RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket,
-                        const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+                        const struct GNUNET_IDENTITY_PrivateKey *identity,
                         RECLAIM_TICKETS_RevokeCallback cb,
                         void *cb_cls);
 
@@ -193,7 +193,7 @@ RECLAIM_TICKETS_revoke_cancel (struct 
RECLAIM_TICKETS_RevokeHandle *rh);
  * @return handle to the operation
  */
 struct RECLAIM_TICKETS_ConsumeHandle *
-RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id,
+RECLAIM_TICKETS_consume (const struct GNUNET_IDENTITY_PrivateKey *id,
                          const struct GNUNET_RECLAIM_Ticket *ticket,
                          RECLAIM_TICKETS_ConsumeCallback cb,
                          void *cb_cls);
@@ -220,9 +220,9 @@ RECLAIM_TICKETS_consume_cancel (struct 
RECLAIM_TICKETS_ConsumeHandle *cth);
  * FIXME: Return handle??
  */
 void
-RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+RECLAIM_TICKETS_issue (const struct GNUNET_IDENTITY_PrivateKey *identity,
                        const struct GNUNET_RECLAIM_AttributeList *attrs,
-                       const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
+                       const struct GNUNET_IDENTITY_PublicKey *audience,
                        RECLAIM_TICKETS_TicketResult cb,
                        void *cb_cls);
 
@@ -255,7 +255,7 @@ RECLAIM_TICKETS_iteration_stop (struct 
RECLAIM_TICKETS_Iterator *iter);
  */
 struct RECLAIM_TICKETS_Iterator *
 RECLAIM_TICKETS_iteration_start (
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   RECLAIM_TICKETS_TicketIter cb,
   void *cb_cls);
 
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index b307a358c..c3ff07976 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -155,7 +155,7 @@ fix_base64 (char *str)
 }
 
 static json_t*
-generate_userinfo_json(const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
+generate_userinfo_json(const struct GNUNET_IDENTITY_PublicKey *sub_key,
                        const struct GNUNET_RECLAIM_AttributeList *attrs,
                        const struct GNUNET_RECLAIM_PresentationList 
*presentations)
 {
@@ -180,7 +180,7 @@ generate_userinfo_json(const struct 
GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
   subject =
     GNUNET_STRINGS_data_to_string_alloc (sub_key,
                                          sizeof(struct
-                                                GNUNET_CRYPTO_EcdsaPublicKey));
+                                                GNUNET_IDENTITY_PublicKey));
   body = json_object ();
   aggr_names = json_object ();
   aggr_sources = json_object ();
@@ -295,7 +295,7 @@ generate_userinfo_json(const struct 
GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
  * @return Userinfo JSON
  */
 char *
-OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
+OIDC_generate_userinfo (const struct GNUNET_IDENTITY_PublicKey *sub_key,
                         const struct GNUNET_RECLAIM_AttributeList *attrs,
                         const struct GNUNET_RECLAIM_PresentationList 
*presentations)
 {
@@ -321,8 +321,8 @@ OIDC_generate_userinfo (const struct 
GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
  * @return a new base64-encoded JWT string.
  */
 char *
-OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
-                        const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
+OIDC_generate_id_token (const struct GNUNET_IDENTITY_PublicKey *aud_key,
+                        const struct GNUNET_IDENTITY_PublicKey *sub_key,
                         const struct GNUNET_RECLAIM_AttributeList *attrs,
                         const struct GNUNET_RECLAIM_PresentationList 
*presentations,
                         const struct GNUNET_TIME_Relative *expiration_time,
@@ -356,11 +356,11 @@ OIDC_generate_id_token (const struct 
GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
   subject =
     GNUNET_STRINGS_data_to_string_alloc (sub_key,
                                          sizeof(struct
-                                                GNUNET_CRYPTO_EcdsaPublicKey));
+                                                GNUNET_IDENTITY_PublicKey));
   audience =
     GNUNET_STRINGS_data_to_string_alloc (aud_key,
                                          sizeof(struct
-                                                GNUNET_CRYPTO_EcdsaPublicKey));
+                                                GNUNET_IDENTITY_PublicKey));
   header = create_jwt_header ();
 
   // aud REQUIRED public key client_id must be there
@@ -438,7 +438,7 @@ OIDC_generate_id_token (const struct 
GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
  * @return a new authorization code (caller must free)
  */
 char *
-OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
+OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer,
                        const struct GNUNET_RECLAIM_Ticket *ticket,
                        const struct GNUNET_RECLAIM_AttributeList *attrs,
                        const struct GNUNET_RECLAIM_PresentationList 
*presentations,
@@ -544,7 +544,7 @@ OIDC_build_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
   buf_ptr += payload_len;
   // Sign and store signature
   if (GNUNET_SYSERR ==
-      GNUNET_CRYPTO_ecdsa_sign_ (issuer,
+      GNUNET_CRYPTO_ecdsa_sign_ (&issuer->ecdsa_key,
                                  purpose,
                                  (struct GNUNET_CRYPTO_EcdsaSignature *)
                                  buf_ptr))
@@ -576,7 +576,7 @@ OIDC_build_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
  * @return GNUNET_OK if successful, else GNUNET_SYSERR
  */
 int
-OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
+OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *audience,
                        const char *code,
                        const char *code_verifier,
                        struct GNUNET_RECLAIM_Ticket *ticket,
@@ -687,7 +687,7 @@ OIDC_parse_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPublicKey *audience,
       GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN,
                                    purpose,
                                    signature,
-                                   &ticket->identity))
+                                   &ticket->identity.ecdsa_key))
   {
     GNUNET_free (code_payload);
     if (NULL != *nonce_str)
diff --git a/src/reclaim/oidc_helper.h b/src/reclaim/oidc_helper.h
index 10a6f3d1f..eb1022423 100644
--- a/src/reclaim/oidc_helper.h
+++ b/src/reclaim/oidc_helper.h
@@ -50,8 +50,8 @@
  * @return a new base64-encoded JWT string.
  */
 char*
-OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
-                   const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
+OIDC_generate_id_token (const struct GNUNET_IDENTITY_PublicKey *aud_key,
+                   const struct GNUNET_IDENTITY_PublicKey *sub_key,
                    const struct GNUNET_RECLAIM_AttributeList *attrs,
                    const struct GNUNET_RECLAIM_PresentationList *presentations,
                    const struct GNUNET_TIME_Relative *expiration_time,
@@ -71,7 +71,7 @@ OIDC_generate_id_token (const struct 
GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
  * @return a new authorization code (caller must free)
  */
 char*
-OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
+OIDC_build_authz_code (const struct GNUNET_IDENTITY_PrivateKey *issuer,
                        const struct GNUNET_RECLAIM_Ticket *ticket,
                        const struct GNUNET_RECLAIM_AttributeList *attrs,
                        const struct GNUNET_RECLAIM_PresentationList 
*presentations,
@@ -93,7 +93,7 @@ OIDC_build_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
  * @return GNUNET_OK if successful, else GNUNET_SYSERR
  */
 int
-OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *ecdsa_pub,
+OIDC_parse_authz_code (const struct GNUNET_IDENTITY_PublicKey *ecdsa_pub,
                        const char *code,
                        const char *code_verifier,
                        struct GNUNET_RECLAIM_Ticket *ticket,
@@ -152,7 +152,7 @@ OIDC_check_scopes_for_claim_request (const char *scopes,
  * @return Userinfo JSON
  */
 char *
-OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
+OIDC_generate_userinfo (const struct GNUNET_IDENTITY_PublicKey *sub_key,
                         const struct GNUNET_RECLAIM_AttributeList *attrs,
                         const struct GNUNET_RECLAIM_PresentationList 
*presentations);
 
diff --git a/src/reclaim/plugin_rest_openid_connect.c 
b/src/reclaim/plugin_rest_openid_connect.c
index 5b0bb2b6f..7a8a886bd 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -300,7 +300,7 @@ struct OIDC_Variables
   /**
    * The RP client public key
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey client_pkey;
+  struct GNUNET_IDENTITY_PublicKey client_pkey;
 
   /**
    * The OIDC client id of the RP
@@ -411,7 +411,7 @@ struct RequestHandle
   /**
    * Pointer to ego private key
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey priv_key;
+  struct GNUNET_IDENTITY_PrivateKey priv_key;
 
   /**
    * OIDC variables
@@ -972,7 +972,7 @@ oidc_ticket_issue_cb (void *cls,
       (NULL != handle->tld))
   {
     GNUNET_asprintf (&redirect_uri,
-                     "%s.%s/%s?%s=%s&state=%s",
+                     "%s.%s/%s%s%s=%s&state=%s",
                      handle->redirect_prefix,
                      handle->tld,
                      handle->redirect_suffix,
@@ -1087,7 +1087,7 @@ oidc_cred_collect_finished_cb (void *cls)
  */
 static void
 oidc_cred_collect (void *cls,
-                   const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+                   const struct GNUNET_IDENTITY_PublicKey *identity,
                    const struct GNUNET_RECLAIM_Credential *cred)
 {
   struct RequestHandle *handle = cls;
@@ -1211,7 +1211,7 @@ attr_in_userinfo_request (struct RequestHandle *handle,
  */
 static void
 oidc_attr_collect (void *cls,
-                   const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+                   const struct GNUNET_IDENTITY_PublicKey *identity,
                    const struct GNUNET_RECLAIM_Attribute *attr)
 {
   struct RequestHandle *handle = cls;
@@ -1260,8 +1260,8 @@ code_redirect (void *cls)
   struct RequestHandle *handle = cls;
   struct GNUNET_TIME_Absolute current_time;
   struct GNUNET_TIME_Absolute *relog_time;
-  struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
-  struct GNUNET_CRYPTO_EcdsaPublicKey ego_pkey;
+  struct GNUNET_IDENTITY_PublicKey pubkey;
+  struct GNUNET_IDENTITY_PublicKey ego_pkey;
   struct GNUNET_HashCode cache_key;
   char *identity_cookie;
 
@@ -1281,11 +1281,8 @@ code_redirect (void *cls)
     if (current_time.abs_value_us <= relog_time->abs_value_us)
     {
       if (GNUNET_OK !=
-          GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->oidc
+          GNUNET_IDENTITY_public_key_from_string (handle->oidc
                                                       ->login_identity,
-                                                      strlen (
-                                                        handle->oidc
-                                                        ->login_identity),
                                                       &pubkey))
       {
         handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_COOKIE);
@@ -1376,7 +1373,7 @@ lookup_redirect_uri_result (void *cls,
   char *tmp;
   char *tmp_key_str;
   char *pos;
-  struct GNUNET_CRYPTO_EcdsaPublicKey redirect_zone;
+  struct GNUNET_IDENTITY_PublicKey redirect_zone;
 
   handle->gns_op = NULL;
   if (0 == rd_count)
@@ -1608,10 +1605,10 @@ static void
 tld_iter (void *cls, const char *section, const char *option, const char 
*value)
 {
   struct RequestHandle *handle = cls;
-  struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
+  struct GNUNET_IDENTITY_PublicKey pkey;
 
   if (GNUNET_OK !=
-      GNUNET_CRYPTO_ecdsa_public_key_from_string (value, strlen (value), 
&pkey))
+      GNUNET_IDENTITY_public_key_from_string (value, &pkey))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Skipping non key %s\n", value);
     return;
@@ -1635,8 +1632,8 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
 {
   struct RequestHandle *handle = cls;
   struct EgoEntry *tmp_ego;
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
-  struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
+  const struct GNUNET_IDENTITY_PrivateKey *priv_key;
+  struct GNUNET_IDENTITY_PublicKey pkey;
 
   cookie_identity_interpretation (handle);
 
@@ -1664,9 +1661,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
   }
 
   if (GNUNET_OK !=
-      GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->oidc->client_id,
-                                                  strlen (
-                                                    handle->oidc->client_id),
+      GNUNET_IDENTITY_public_key_from_string (handle->oidc->client_id,
                                                   &handle->oidc->client_pkey))
   {
     handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_UNAUTHORIZED_CLIENT);
@@ -1682,7 +1677,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
   for (tmp_ego = ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next)
   {
     priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego);
-    GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &pkey);
+    GNUNET_IDENTITY_key_get_public (priv_key, &pkey);
     if (0 == GNUNET_memcmp (&pkey, &handle->oidc->client_pkey))
     {
       handle->tld = GNUNET_strdup (tmp_ego->identifier);
@@ -1865,7 +1860,7 @@ parse_credentials_post_body (struct RequestHandle *handle,
 
 static int
 check_authorization (struct RequestHandle *handle,
-                     struct GNUNET_CRYPTO_EcdsaPublicKey *cid)
+                     struct GNUNET_IDENTITY_PublicKey *cid)
 {
   char *expected_pass;
   char *received_cid;
@@ -1902,7 +1897,7 @@ check_authorization (struct RequestHandle *handle,
     GNUNET_STRINGS_string_to_data (received_cid,
                                    strlen (received_cid),
                                    cid,
-                                   sizeof(struct 
GNUNET_CRYPTO_EcdsaPublicKey));
+                                   sizeof(struct GNUNET_IDENTITY_PublicKey));
     GNUNET_free (received_cid);
     return GNUNET_OK;
 
@@ -1948,7 +1943,7 @@ check_authorization (struct RequestHandle *handle,
   GNUNET_STRINGS_string_to_data (received_cid,
                                  strlen (received_cid),
                                  cid,
-                                 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey));
+                                 sizeof(struct GNUNET_IDENTITY_PublicKey));
 
   GNUNET_free (received_cpw);
   GNUNET_free (received_cid);
@@ -1958,10 +1953,10 @@ check_authorization (struct RequestHandle *handle,
 
 const struct EgoEntry *
 find_ego (struct RequestHandle *handle,
-          struct GNUNET_CRYPTO_EcdsaPublicKey *test_key)
+          struct GNUNET_IDENTITY_PublicKey *test_key)
 {
   struct EgoEntry *ego_entry;
-  struct GNUNET_CRYPTO_EcdsaPublicKey pub_key;
+  struct GNUNET_IDENTITY_PublicKey pub_key;
 
   for (ego_entry = ego_head; NULL != ego_entry;
        ego_entry = ego_entry->next)
@@ -1992,7 +1987,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
   struct GNUNET_RECLAIM_AttributeList *cl = NULL;
   struct GNUNET_RECLAIM_PresentationList *pl = NULL;
   struct GNUNET_RECLAIM_Ticket ticket;
-  struct GNUNET_CRYPTO_EcdsaPublicKey cid;
+  struct GNUNET_IDENTITY_PublicKey cid;
   struct GNUNET_HashCode cache_key;
   struct MHD_Response *resp;
   char *grant_type;
@@ -2145,7 +2140,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
  */
 static void
 consume_ticket (void *cls,
-                const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+                const struct GNUNET_IDENTITY_PublicKey *identity,
                 const struct GNUNET_RECLAIM_Attribute *attr,
                 const struct GNUNET_RECLAIM_Presentation *pres)
 {
@@ -2225,7 +2220,7 @@ userinfo_endpoint (struct GNUNET_REST_RequestHandle 
*con_handle,
   char *authorization_type;
   char *authorization_access_token;
   const struct EgoEntry *aud_ego;
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
+  const struct GNUNET_IDENTITY_PrivateKey *privkey;
 
   GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Getting userinfo\n");
   GNUNET_CRYPTO_hash (OIDC_AUTHORIZATION_HEADER_KEY,
@@ -2349,7 +2344,7 @@ list_ego (void *cls,
           const char *identifier)
 {
   struct EgoEntry *ego_entry;
-  struct GNUNET_CRYPTO_EcdsaPublicKey pk;
+  struct GNUNET_IDENTITY_PublicKey pk;
 
   if ((NULL == ego) && (ID_REST_STATE_INIT == state))
   {
@@ -2362,7 +2357,7 @@ list_ego (void *cls,
   {
     ego_entry = GNUNET_new (struct EgoEntry);
     GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
-    ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
+    ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk);
     ego_entry->ego = ego;
     ego_entry->identifier = GNUNET_strdup (identifier);
     GNUNET_CONTAINER_DLL_insert_tail (ego_head,
@@ -2389,7 +2384,7 @@ list_ego (void *cls,
       /* Add */
       ego_entry = GNUNET_new (struct EgoEntry);
       GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
-      ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
+      ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk);
       ego_entry->ego = ego;
       ego_entry->identifier = GNUNET_strdup (identifier);
       GNUNET_CONTAINER_DLL_insert_tail (ego_head,
diff --git a/src/reclaim/plugin_rest_reclaim.c 
b/src/reclaim/plugin_rest_reclaim.c
index ff11d2a56..022744c82 100644
--- a/src/reclaim/plugin_rest_reclaim.c
+++ b/src/reclaim/plugin_rest_reclaim.c
@@ -172,7 +172,7 @@ struct RequestHandle
   /**
    * Pointer to ego private key
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey priv_key;
+  struct GNUNET_IDENTITY_PrivateKey priv_key;
 
   /**
    * Rest connection
@@ -440,14 +440,14 @@ ticket_collect (void *cls, const struct 
GNUNET_RECLAIM_Ticket *ticket)
   tmp =
     GNUNET_STRINGS_data_to_string_alloc (&ticket->identity,
                                          sizeof(struct
-                                                GNUNET_CRYPTO_EcdsaPublicKey));
+                                                GNUNET_IDENTITY_PublicKey));
   value = json_string (tmp);
   json_object_set_new (json_resource, "issuer", value);
   GNUNET_free (tmp);
   tmp =
     GNUNET_STRINGS_data_to_string_alloc (&ticket->audience,
                                          sizeof(struct
-                                                GNUNET_CRYPTO_EcdsaPublicKey));
+                                                GNUNET_IDENTITY_PublicKey));
   value = json_string (tmp);
   json_object_set_new (json_resource, "audience", value);
   GNUNET_free (tmp);
@@ -465,7 +465,7 @@ add_credential_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                       void *cls)
 {
   struct RequestHandle *handle = cls;
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity_priv;
+  const struct GNUNET_IDENTITY_PrivateKey *identity_priv;
   const char *identity;
   struct EgoEntry *ego_entry;
   struct GNUNET_RECLAIM_Credential *attribute;
@@ -545,7 +545,7 @@ add_credential_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
  */
 static void
 cred_collect (void *cls,
-                const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+                const struct GNUNET_IDENTITY_PublicKey *identity,
                 const struct GNUNET_RECLAIM_Credential *cred)
 {
   struct RequestHandle *handle = cls;
@@ -631,7 +631,7 @@ list_credential_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                        void *cls)
 {
   struct RequestHandle *handle = cls;
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+  const struct GNUNET_IDENTITY_PrivateKey *priv_key;
   struct EgoEntry *ego_entry;
   char *identity;
 
@@ -688,7 +688,7 @@ delete_credential_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                          void *cls)
 {
   struct RequestHandle *handle = cls;
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+  const struct GNUNET_IDENTITY_PrivateKey *priv_key;
   struct GNUNET_RECLAIM_Credential attr;
   struct EgoEntry *ego_entry;
   char *identity_id_str;
@@ -754,7 +754,7 @@ list_tickets_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                    const char *url,
                    void *cls)
 {
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+  const struct GNUNET_IDENTITY_PrivateKey *priv_key;
   struct RequestHandle *handle = cls;
   struct EgoEntry *ego_entry;
   char *identity;
@@ -801,7 +801,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                     const char *url,
                     void *cls)
 {
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity_priv;
+  const struct GNUNET_IDENTITY_PrivateKey *identity_priv;
   const char *identity;
   struct RequestHandle *handle = cls;
   struct EgoEntry *ego_entry;
@@ -949,7 +949,7 @@ parse_jwt (const struct GNUNET_RECLAIM_Credential *cred,
  */
 static void
 attr_collect (void *cls,
-              const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+              const struct GNUNET_IDENTITY_PublicKey *identity,
               const struct GNUNET_RECLAIM_Attribute *attr)
 {
   struct RequestHandle *handle = cls;
@@ -996,7 +996,7 @@ list_attribute_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                      const char *url,
                      void *cls)
 {
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+  const struct GNUNET_IDENTITY_PrivateKey *priv_key;
   struct RequestHandle *handle = cls;
   struct EgoEntry *ego_entry;
   char *identity;
@@ -1050,7 +1050,7 @@ delete_attribute_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                        const char *url,
                        void *cls)
 {
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
+  const struct GNUNET_IDENTITY_PrivateKey *priv_key;
   struct RequestHandle *handle = cls;
   struct GNUNET_RECLAIM_Attribute attr;
   struct EgoEntry *ego_entry;
@@ -1108,11 +1108,11 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                     const char *url,
                     void *cls)
 {
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity_priv;
+  const struct GNUNET_IDENTITY_PrivateKey *identity_priv;
   struct RequestHandle *handle = cls;
   struct EgoEntry *ego_entry;
   struct GNUNET_RECLAIM_Ticket *ticket = NULL;
-  struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk;
+  struct GNUNET_IDENTITY_PublicKey tmp_pk;
   char term_data[handle->rest_handle->data_size + 1];
   json_t *data_json;
   json_error_t err;
@@ -1156,7 +1156,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
     GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &tmp_pk);
     if (0 == memcmp (&ticket->identity,
                      &tmp_pk,
-                     sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)))
+                     sizeof(struct GNUNET_IDENTITY_PublicKey)))
       break;
   }
   if (NULL == ego_entry)
@@ -1178,7 +1178,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
 
 static void
 consume_cont (void *cls,
-              const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
+              const struct GNUNET_IDENTITY_PublicKey *identity,
               const struct GNUNET_RECLAIM_Attribute *attr,
               const struct GNUNET_RECLAIM_Presentation *pres)
 {
@@ -1215,11 +1215,11 @@ consume_ticket_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
                      const char *url,
                      void *cls)
 {
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity_priv;
+  const struct GNUNET_IDENTITY_PrivateKey *identity_priv;
   struct RequestHandle *handle = cls;
   struct EgoEntry *ego_entry;
   struct GNUNET_RECLAIM_Ticket *ticket;
-  struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk;
+  struct GNUNET_IDENTITY_PublicKey tmp_pk;
   char term_data[handle->rest_handle->data_size + 1];
   json_t *data_json;
   json_error_t err;
@@ -1259,7 +1259,7 @@ consume_ticket_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
     GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &tmp_pk);
     if (0 == memcmp (&ticket->audience,
                      &tmp_pk,
-                     sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)))
+                     sizeof(struct GNUNET_IDENTITY_PublicKey)))
       break;
   }
   if (NULL == ego_entry)
@@ -1343,7 +1343,7 @@ list_ego (void *cls,
           const char *identifier)
 {
   struct EgoEntry *ego_entry;
-  struct GNUNET_CRYPTO_EcdsaPublicKey pk;
+  struct GNUNET_IDENTITY_PublicKey pk;
 
   if ((NULL == ego) && (ID_REST_STATE_INIT == state))
   {
@@ -1354,7 +1354,7 @@ list_ego (void *cls,
   {
     ego_entry = GNUNET_new (struct EgoEntry);
     GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
-    ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
+    ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk);
     ego_entry->ego = ego;
     ego_entry->identifier = GNUNET_strdup (identifier);
     GNUNET_CONTAINER_DLL_insert_tail (ego_head,
@@ -1380,7 +1380,7 @@ list_ego (void *cls,
       /* Add */
       ego_entry = GNUNET_new (struct EgoEntry);
       GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
-      ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
+      ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk);
       ego_entry->ego = ego;
       ego_entry->identifier = GNUNET_strdup (identifier);
       GNUNET_CONTAINER_DLL_insert_tail (ego_head,
diff --git a/src/reclaim/reclaim.h b/src/reclaim/reclaim.h
index bc7f34365..aae8ee89a 100644
--- a/src/reclaim/reclaim.h
+++ b/src/reclaim/reclaim.h
@@ -29,7 +29,7 @@
 #define RECLAIM_H
 
 #include "gnunet_common.h"
-
+#include "gnunet_identity_service.h"
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
@@ -62,7 +62,7 @@ struct AttributeStoreMessage
   /**
    * Identity
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /* followed by the serialized attribute */
 };
@@ -91,7 +91,7 @@ struct AttributeDeleteMessage
   /**
    * Identity
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /* followed by the serialized attribute */
 };
@@ -151,7 +151,7 @@ struct AttributeResultMessage
   /**
    * The public key of the identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey identity;
+  struct GNUNET_IDENTITY_PublicKey identity;
 
   /* followed by:
    * serialized attribute data
@@ -186,7 +186,7 @@ struct CredentialResultMessage
   /**
    * The public key of the identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey identity;
+  struct GNUNET_IDENTITY_PublicKey identity;
 
   /* followed by:
    * serialized credential data
@@ -212,7 +212,7 @@ struct AttributeIterationStartMessage
   /**
    * Identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 };
 
 
@@ -251,7 +251,7 @@ struct CredentialIterationStartMessage
   /**
    * Identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 };
 
 
@@ -323,7 +323,7 @@ struct TicketIterationStartMessage
   /**
    * Identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 };
 
 
@@ -379,12 +379,12 @@ struct IssueTicketMessage
   /**
    * Identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * Requesting party.
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey rp;
+  struct GNUNET_IDENTITY_PublicKey rp;
 
   /**
    * length of serialized attribute list
@@ -412,7 +412,7 @@ struct RevokeTicketMessage
   /**
    * Identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * length of serialized attribute list
@@ -493,7 +493,7 @@ struct ConsumeTicketMessage
   /**
    * Identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * The ticket to consume
@@ -539,7 +539,7 @@ struct ConsumeTicketResultMessage
   /**
    * The public key of the identity.
    */
-  struct GNUNET_CRYPTO_EcdsaPublicKey identity;
+  struct GNUNET_IDENTITY_PublicKey identity;
 
   /* followed by:
    * serialized attributes data
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c
index 1e0251519..f4f2b946a 100644
--- a/src/reclaim/reclaim_api.c
+++ b/src/reclaim/reclaim_api.c
@@ -235,7 +235,7 @@ struct GNUNET_RECLAIM_AttributeIterator
   /**
    * Private key of the zone.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * The operation id this zone iteration operation has
@@ -302,7 +302,7 @@ struct GNUNET_RECLAIM_CredentialIterator
   /**
    * Private key of the zone.
    */
-  struct GNUNET_CRYPTO_EcdsaPrivateKey identity;
+  struct GNUNET_IDENTITY_PrivateKey identity;
 
   /**
    * The operation id this zone iteration operation has
@@ -704,7 +704,7 @@ check_attribute_result (void *cls, const struct 
AttributeResultMessage *msg)
 static void
 handle_attribute_result (void *cls, const struct AttributeResultMessage *msg)
 {
-  static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy;
+  static struct GNUNET_IDENTITY_PrivateKey identity_dummy;
   struct GNUNET_RECLAIM_Handle *h = cls;
   struct GNUNET_RECLAIM_AttributeIterator *it;
   struct GNUNET_RECLAIM_Operation *op;
@@ -806,7 +806,7 @@ static void
 handle_credential_result (void *cls, const struct
                            CredentialResultMessage *msg)
 {
-  static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy;
+  static struct GNUNET_IDENTITY_PrivateKey identity_dummy;
   struct GNUNET_RECLAIM_Handle *h = cls;
   struct GNUNET_RECLAIM_CredentialIterator *it;
   struct GNUNET_RECLAIM_Operation *op;
@@ -1134,7 +1134,7 @@ GNUNET_RECLAIM_disconnect (struct GNUNET_RECLAIM_Handle 
*h)
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_attribute_store (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Attribute *attr,
   const struct GNUNET_TIME_Relative *exp_interval,
   GNUNET_RECLAIM_ContinuationWithStatus cont,
@@ -1181,7 +1181,7 @@ GNUNET_RECLAIM_attribute_store (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_attribute_delete (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Attribute *attr,
   GNUNET_RECLAIM_ContinuationWithStatus cont,
   void *cont_cls)
@@ -1226,7 +1226,7 @@ GNUNET_RECLAIM_attribute_delete (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_credential_store (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Credential *attr,
   const struct GNUNET_TIME_Relative *exp_interval,
   GNUNET_RECLAIM_ContinuationWithStatus cont,
@@ -1273,7 +1273,7 @@ GNUNET_RECLAIM_credential_store (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_credential_delete (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
+  const struct GNUNET_IDENTITY_PrivateKey *pkey,
   const struct GNUNET_RECLAIM_Credential *attr,
   GNUNET_RECLAIM_ContinuationWithStatus cont,
   void *cont_cls)
@@ -1330,7 +1330,7 @@ GNUNET_RECLAIM_credential_delete (
 struct GNUNET_RECLAIM_AttributeIterator *
 GNUNET_RECLAIM_get_attributes_start (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   GNUNET_SCHEDULER_TaskCallback error_cb,
   void *error_cb_cls,
   GNUNET_RECLAIM_AttributeResult proc,
@@ -1439,7 +1439,7 @@ GNUNET_RECLAIM_get_attributes_stop (struct 
GNUNET_RECLAIM_AttributeIterator *it)
 struct GNUNET_RECLAIM_CredentialIterator *
 GNUNET_RECLAIM_get_credentials_start (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   GNUNET_SCHEDULER_TaskCallback error_cb,
   void *error_cb_cls,
   GNUNET_RECLAIM_CredentialResult proc,
@@ -1541,8 +1541,8 @@ GNUNET_RECLAIM_get_credentials_stop (struct
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_ticket_issue (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
-  const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
+  const struct GNUNET_IDENTITY_PrivateKey *iss,
+  const struct GNUNET_IDENTITY_PublicKey *rp,
   const struct GNUNET_RECLAIM_AttributeList *attrs,
   GNUNET_RECLAIM_IssueTicketCallback cb,
   void *cb_cls)
@@ -1590,7 +1590,7 @@ GNUNET_RECLAIM_ticket_issue (
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_ticket_consume (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   const struct GNUNET_RECLAIM_Ticket *ticket,
   GNUNET_RECLAIM_AttributeTicketResult cb,
   void *cb_cls)
@@ -1636,7 +1636,7 @@ GNUNET_RECLAIM_ticket_consume (
 struct GNUNET_RECLAIM_TicketIterator *
 GNUNET_RECLAIM_ticket_iteration_start (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   GNUNET_SCHEDULER_TaskCallback error_cb,
   void *error_cb_cls,
   GNUNET_RECLAIM_TicketCallback proc,
@@ -1731,7 +1731,7 @@ GNUNET_RECLAIM_ticket_iteration_stop (struct 
GNUNET_RECLAIM_TicketIterator *it)
 struct GNUNET_RECLAIM_Operation *
 GNUNET_RECLAIM_ticket_revoke (
   struct GNUNET_RECLAIM_Handle *h,
-  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
+  const struct GNUNET_IDENTITY_PrivateKey *identity,
   const struct GNUNET_RECLAIM_Ticket *ticket,
   GNUNET_RECLAIM_ContinuationWithStatus cb,
   void *cb_cls)
diff --git a/src/reclaim/test_reclaim_attribute.c 
b/src/reclaim/test_reclaim_attribute.c
index f71d86b56..f8faf8021 100644
--- a/src/reclaim/test_reclaim_attribute.c
+++ b/src/reclaim/test_reclaim_attribute.c
@@ -9,12 +9,10 @@ main (int argc, char *argv[])
   struct GNUNET_RECLAIM_AttributeList *al;
   struct GNUNET_RECLAIM_AttributeList *al_two;
   struct GNUNET_RECLAIM_AttributeListEntry *ale;
-  struct GNUNET_RECLAIM_Attribute *attr;
   char attrname[100];
   char attrdata[100];
   size_t ser_len_claimed;
   size_t ser_len_actual;
-  ssize_t deser_len;
   char *ser_data;
   int count = 0;
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]