aboutsummaryrefslogtreecommitdiff
path: root/src/identity/plugin_rest_identity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity/plugin_rest_identity.c')
-rw-r--r--src/identity/plugin_rest_identity.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index 093a24c39..cae0e4d95 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -385,7 +385,7 @@ ego_get_all (struct GNUNET_REST_RequestHandle *con_handle,
385 GNUNET_CONTAINER_multihashmap_contains ( 385 GNUNET_CONTAINER_multihashmap_contains (
386 handle->rest_handle->url_param_map, &key)) 386 handle->rest_handle->url_param_map, &key))
387 { 387 {
388 privkey_str = GNUNET_IDENTITY_private_key_to_string ( 388 privkey_str = GNUNET_CRYPTO_private_key_to_string (
389 GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego)); 389 GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego));
390 json_object_set_new (json_ego, 390 json_object_set_new (json_ego,
391 GNUNET_REST_IDENTITY_PARAM_PRIVKEY, 391 GNUNET_REST_IDENTITY_PARAM_PRIVKEY,
@@ -440,7 +440,7 @@ ego_get_response (struct RequestHandle *handle, struct EgoEntry *ego_entry)
440 GNUNET_CONTAINER_multihashmap_contains ( 440 GNUNET_CONTAINER_multihashmap_contains (
441 handle->rest_handle->url_param_map, &key)) 441 handle->rest_handle->url_param_map, &key))
442 { 442 {
443 privkey_str = GNUNET_IDENTITY_private_key_to_string ( 443 privkey_str = GNUNET_CRYPTO_private_key_to_string (
444 GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego)); 444 GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego));
445 json_object_set_new (json_ego, 445 json_object_set_new (json_ego,
446 GNUNET_REST_IDENTITY_PARAM_PRIVKEY, 446 GNUNET_REST_IDENTITY_PARAM_PRIVKEY,
@@ -576,7 +576,7 @@ do_finished (void *cls, enum GNUNET_ErrorCode ec)
576 */ 576 */
577static void 577static void
578do_finished_create (void *cls, 578do_finished_create (void *cls,
579 const struct GNUNET_IDENTITY_PrivateKey *pk, 579 const struct GNUNET_CRYPTO_PrivateKey *pk,
580 enum GNUNET_ErrorCode ec) 580 enum GNUNET_ErrorCode ec)
581{ 581{
582 struct RequestHandle *handle = cls; 582 struct RequestHandle *handle = cls;
@@ -762,8 +762,8 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle,
762 json_error_t err; 762 json_error_t err;
763 char *egoname; 763 char *egoname;
764 char *privkey; 764 char *privkey;
765 struct GNUNET_IDENTITY_PrivateKey pk; 765 struct GNUNET_CRYPTO_PrivateKey pk;
766 struct GNUNET_IDENTITY_PrivateKey *pk_ptr; 766 struct GNUNET_CRYPTO_PrivateKey *pk_ptr;
767 int json_unpack_state; 767 int json_unpack_state;
768 char term_data[handle->data_size + 1]; 768 char term_data[handle->data_size + 1];
769 769
@@ -825,7 +825,7 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle,
825 strlen (privkey), 825 strlen (privkey),
826 &pk, 826 &pk,
827 sizeof(struct 827 sizeof(struct
828 GNUNET_IDENTITY_PrivateKey)); 828 GNUNET_CRYPTO_PrivateKey));
829 pk_ptr = &pk; 829 pk_ptr = &pk;
830 } 830 }
831 else 831 else
@@ -834,7 +834,7 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle,
834 handle->op = GNUNET_IDENTITY_create (identity_handle, 834 handle->op = GNUNET_IDENTITY_create (identity_handle,
835 handle->name, 835 handle->name,
836 pk_ptr, 836 pk_ptr,
837 GNUNET_IDENTITY_TYPE_ECDSA, 837 GNUNET_PUBLIC_KEY_TYPE_ECDSA,
838 &do_finished_create, 838 &do_finished_create,
839 handle); 839 handle);
840} 840}
@@ -945,7 +945,7 @@ ego_sign_data_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
945 return; 945 return;
946 } 946 }
947 947
948 if (ntohl (ego->pk.type) != GNUNET_IDENTITY_TYPE_EDDSA) 948 if (ntohl (ego->pk.type) != GNUNET_PUBLIC_KEY_TYPE_EDDSA)
949 { 949 {
950 handle->ec = GNUNET_EC_IDENTITY_NOT_FOUND; 950 handle->ec = GNUNET_EC_IDENTITY_NOT_FOUND;
951 GNUNET_SCHEDULER_add_now (&do_error, handle); 951 GNUNET_SCHEDULER_add_now (&do_error, handle);
@@ -1069,7 +1069,7 @@ list_ego (void *cls,
1069 const char *identifier) 1069 const char *identifier)
1070{ 1070{
1071 struct EgoEntry *ego_entry; 1071 struct EgoEntry *ego_entry;
1072 struct GNUNET_IDENTITY_PublicKey pk; 1072 struct GNUNET_CRYPTO_PublicKey pk;
1073 1073
1074 if ((NULL == ego) && (ID_REST_STATE_INIT == state)) 1074 if ((NULL == ego) && (ID_REST_STATE_INIT == state))
1075 { 1075 {
@@ -1086,7 +1086,7 @@ list_ego (void *cls,
1086 { 1086 {
1087 ego_entry = GNUNET_new (struct EgoEntry); 1087 ego_entry = GNUNET_new (struct EgoEntry);
1088 GNUNET_IDENTITY_ego_get_public_key (ego, &pk); 1088 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
1089 ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); 1089 ego_entry->keystring = GNUNET_CRYPTO_public_key_to_string (&pk);
1090 ego_entry->ego = ego; 1090 ego_entry->ego = ego;
1091 ego_entry->identifier = GNUNET_strdup (identifier); 1091 ego_entry->identifier = GNUNET_strdup (identifier);
1092 GNUNET_CONTAINER_DLL_insert_tail (ego_head, 1092 GNUNET_CONTAINER_DLL_insert_tail (ego_head,
@@ -1112,7 +1112,7 @@ list_ego (void *cls,
1112 /* Add */ 1112 /* Add */
1113 ego_entry = GNUNET_new (struct EgoEntry); 1113 ego_entry = GNUNET_new (struct EgoEntry);
1114 GNUNET_IDENTITY_ego_get_public_key (ego, &pk); 1114 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
1115 ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); 1115 ego_entry->keystring = GNUNET_CRYPTO_public_key_to_string (&pk);
1116 ego_entry->ego = ego; 1116 ego_entry->ego = ego;
1117 ego_entry->identifier = GNUNET_strdup (identifier); 1117 ego_entry->identifier = GNUNET_strdup (identifier);
1118 GNUNET_CONTAINER_DLL_insert_tail (ego_head, 1118 GNUNET_CONTAINER_DLL_insert_tail (ego_head,