From 5680378974db794d67b75473435a0651fad0cd24 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Thu, 15 Oct 2020 09:09:23 +0200 Subject: - towards fix reclaim --- src/reclaim/plugin_rest_reclaim.c | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/reclaim/plugin_rest_reclaim.c') 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, -- cgit v1.2.3