aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/identity-provider/gnunet-service-identity-provider.c6
-rw-r--r--src/identity-provider/identity_token.c22
-rw-r--r--src/identity-provider/plugin_rest_identity_provider.c2
-rw-r--r--src/namestore/plugin_rest_namestore.c5
4 files changed, 14 insertions, 21 deletions
diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/identity-provider/gnunet-service-identity-provider.c
index db23c179b..2a7316d17 100644
--- a/src/identity-provider/gnunet-service-identity-provider.c
+++ b/src/identity-provider/gnunet-service-identity-provider.c
@@ -1248,7 +1248,7 @@ handle_exchange_message (void *cls,
1248 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 1248 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1249 return; 1249 return;
1250 } 1250 }
1251 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Looking for token under %s\n", 1251 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking for token under %s\n",
1252 xchange_handle->ticket->payload->label); 1252 xchange_handle->ticket->payload->label);
1253 GNUNET_asprintf (&lookup_query, 1253 GNUNET_asprintf (&lookup_query,
1254 "%s.gnu", 1254 "%s.gnu",
@@ -1349,7 +1349,7 @@ find_existing_token (void *cls,
1349 char *tmp = GNUNET_GNSRECORD_value_to_string (GNUNET_GNSRECORD_TYPE_ID_TOKEN_METADATA, 1349 char *tmp = GNUNET_GNSRECORD_value_to_string (GNUNET_GNSRECORD_TYPE_ID_TOKEN_METADATA,
1350 token_metadata_record->data, 1350 token_metadata_record->data,
1351 token_metadata_record->data_size); 1351 token_metadata_record->data_size);
1352 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1353 "Token does not match audience %s vs %s. Moving on\n", 1353 "Token does not match audience %s vs %s. Moving on\n",
1354 tmp2, 1354 tmp2,
1355 tmp); 1355 tmp);
@@ -1369,7 +1369,7 @@ find_existing_token (void *cls,
1369 if ((NULL != handle->attr_map) && 1369 if ((NULL != handle->attr_map) &&
1370 (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (handle->attr_map, &key))) 1370 (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (handle->attr_map, &key)))
1371 { 1371 {
1372 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1372 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1373 "Issued token does not include `%s'. Moving on\n", scope); 1373 "Issued token does not include `%s'. Moving on\n", scope);
1374 GNUNET_free (tmp_scopes); 1374 GNUNET_free (tmp_scopes);
1375 GNUNET_NAMESTORE_zone_iterator_next (handle->ns_it); 1375 GNUNET_NAMESTORE_zone_iterator_next (handle->ns_it);
diff --git a/src/identity-provider/identity_token.c b/src/identity-provider/identity_token.c
index 1974df6a5..673d0b037 100644
--- a/src/identity-provider/identity_token.c
+++ b/src/identity-provider/identity_token.c
@@ -50,7 +50,7 @@ create_sym_key_from_ecdh(const struct GNUNET_HashCode *new_key_hash,
50 50
51 GNUNET_CRYPTO_hash_to_enc (new_key_hash, 51 GNUNET_CRYPTO_hash_to_enc (new_key_hash,
52 &new_key_hash_str); 52 &new_key_hash_str);
53 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Creating symmetric rsa key from %s\n", (char*)&new_key_hash_str); 53 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating symmetric rsa key from %s\n", (char*)&new_key_hash_str);
54 static const char ctx_key[] = "gnuid-aes-ctx-key"; 54 static const char ctx_key[] = "gnuid-aes-ctx-key";
55 GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey), 55 GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey),
56 new_key_hash, sizeof (struct GNUNET_HashCode), 56 new_key_hash, sizeof (struct GNUNET_HashCode),
@@ -97,7 +97,7 @@ decrypt_str_ecdhe (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key,
97 &enc_key, 97 &enc_key,
98 &enc_iv, 98 &enc_iv,
99 str_buf); 99 str_buf);
100 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Decrypted bytes: %d Expected bytes: %d\n", str_size, cyphertext_len); 100 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decrypted bytes: %d Expected bytes: %d\n", str_size, cyphertext_len);
101 if (-1 == str_size) 101 if (-1 == str_size)
102 { 102 {
103 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ECDH invalid\n"); 103 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ECDH invalid\n");
@@ -171,14 +171,14 @@ encrypt_str_ecdhe (const char *plaintext,
171 pub_key, 171 pub_key,
172 &new_key_hash)); 172 &new_key_hash));
173 create_sym_key_from_ecdh(&new_key_hash, &skey, &iv); 173 create_sym_key_from_ecdh(&new_key_hash, &skey, &iv);
174 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Encrypting string %s\n (len=%d)", 174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypting string %s\n (len=%d)",
175 plaintext, 175 plaintext,
176 strlen (plaintext)); 176 strlen (plaintext));
177 enc_size = GNUNET_CRYPTO_symmetric_encrypt (plaintext, 177 enc_size = GNUNET_CRYPTO_symmetric_encrypt (plaintext,
178 strlen (plaintext), 178 strlen (plaintext),
179 &skey, &iv, 179 &skey, &iv,
180 *cyphertext); 180 *cyphertext);
181 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Encrypted (len=%d)", enc_size); 181 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted (len=%d)", enc_size);
182 return GNUNET_OK; 182 return GNUNET_OK;
183} 183}
184 184
@@ -724,7 +724,7 @@ ticket_serialize (struct TokenTicket *ticket,
724 724
725 dh_key_str = GNUNET_STRINGS_data_to_string_alloc (&ticket->ecdh_pubkey, 725 dh_key_str = GNUNET_STRINGS_data_to_string_alloc (&ticket->ecdh_pubkey,
726 sizeof (struct GNUNET_CRYPTO_EcdhePublicKey)); 726 sizeof (struct GNUNET_CRYPTO_EcdhePublicKey));
727 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Using ECDH pubkey %s to encrypt\n", dh_key_str); 727 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using ECDH pubkey %s to encrypt\n", dh_key_str);
728 GNUNET_asprintf (&ticket_str, "{\"meta\": \"%s\", \"ecdh\": \"%s\", \"signature\": \"%s\"}", 728 GNUNET_asprintf (&ticket_str, "{\"meta\": \"%s\", \"ecdh\": \"%s\", \"signature\": \"%s\"}",
729 ticket_payload_str, dh_key_str, ticket_sig_str); 729 ticket_payload_str, dh_key_str, ticket_sig_str);
730 GNUNET_STRINGS_base64_encode (ticket_str, strlen (ticket_str), result); 730 GNUNET_STRINGS_base64_encode (ticket_str, strlen (ticket_str), result);
@@ -767,7 +767,7 @@ ticket_payload_parse(const char *raw_data,
767 return GNUNET_SYSERR; 767 return GNUNET_SYSERR;
768 } 768 }
769 769
770 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Metadata: %s\n", meta_str); 770 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Metadata: %s\n", meta_str);
771 root = json_loads (meta_str, JSON_DECODE_ANY, &err_json); 771 root = json_loads (meta_str, JSON_DECODE_ANY, &err_json);
772 if (!root) 772 if (!root)
773 { 773 {
@@ -804,7 +804,7 @@ ticket_payload_parse(const char *raw_data,
804 } 804 }
805 805
806 label_str = json_string_value (label_json); 806 label_str = json_string_value (label_json);
807 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Found label: %s\n", label_str); 807 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found label: %s\n", label_str);
808 808
809 nonce_json = json_object_get (root, "nonce"); 809 nonce_json = json_object_get (root, "nonce");
810 if (!json_is_string (label_json)) 810 if (!json_is_string (label_json))
@@ -817,7 +817,7 @@ ticket_payload_parse(const char *raw_data,
817 } 817 }
818 818
819 nonce_str = json_string_value (nonce_json); 819 nonce_str = json_string_value (nonce_json);
820 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Found nonce: %s\n", nonce_str); 820 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found nonce: %s\n", nonce_str);
821 821
822 *result = ticket_payload_create (nonce_str, 822 *result = ticket_payload_create (nonce_str,
823 (const struct GNUNET_CRYPTO_EcdsaPublicKey*)&id_pkey, 823 (const struct GNUNET_CRYPTO_EcdsaPublicKey*)&id_pkey,
@@ -852,7 +852,7 @@ ticket_parse (const char *raw_data,
852 852
853 ticket_decoded = NULL; 853 ticket_decoded = NULL;
854 GNUNET_STRINGS_base64_decode (raw_data, strlen (raw_data), &ticket_decoded); 854 GNUNET_STRINGS_base64_decode (raw_data, strlen (raw_data), &ticket_decoded);
855 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Token Code: %s\n", ticket_decoded); 855 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ticket: %s\n", ticket_decoded);
856 root = json_loads (ticket_decoded, JSON_DECODE_ANY, &err_json); 856 root = json_loads (ticket_decoded, JSON_DECODE_ANY, &err_json);
857 if (!root) 857 if (!root)
858 { 858 {
@@ -881,7 +881,7 @@ ticket_parse (const char *raw_data,
881 GNUNET_free (ticket); 881 GNUNET_free (ticket);
882 return GNUNET_SYSERR; 882 return GNUNET_SYSERR;
883 } 883 }
884 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Using ECDH pubkey %s for metadata decryption\n", ecdh_enc_str); 884 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using ECDH pubkey %s for metadata decryption\n", ecdh_enc_str);
885 if (GNUNET_OK != GNUNET_STRINGS_string_to_data (signature_enc_str, 885 if (GNUNET_OK != GNUNET_STRINGS_string_to_data (signature_enc_str,
886 strlen (signature_enc_str), 886 strlen (signature_enc_str),
887 &ticket->signature, 887 &ticket->signature,
@@ -938,7 +938,7 @@ ticket_parse (const char *raw_data,
938 json_decref (root); 938 json_decref (root);
939 GNUNET_free (purpose); 939 GNUNET_free (purpose);
940 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 940 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
941 "Error verifying signature for token code\n"); 941 "Error verifying signature for ticket\n");
942 return GNUNET_SYSERR; 942 return GNUNET_SYSERR;
943 } 943 }
944 *result = ticket; 944 *result = ticket;
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c
index 771f6d7bd..cb0d6666e 100644
--- a/src/identity-provider/plugin_rest_identity_provider.c
+++ b/src/identity-provider/plugin_rest_identity_provider.c
@@ -66,7 +66,6 @@
66 */ 66 */
67#define GNUNET_REST_JSONAPI_IDENTITY_PROVIDER_TOKEN "token" 67#define GNUNET_REST_JSONAPI_IDENTITY_PROVIDER_TOKEN "token"
68 68
69
70/** 69/**
71 * The URL parameter name in which the nonce must be provided 70 * The URL parameter name in which the nonce must be provided
72 */ 71 */
@@ -783,7 +782,6 @@ exchange_cont (void *cls,
783 GNUNET_free (token_str); 782 GNUNET_free (token_str);
784 783
785 result = json_dumps (root, JSON_INDENT(1)); 784 result = json_dumps (root, JSON_INDENT(1));
786 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", result);
787 resp = GNUNET_REST_create_json_response (result); 785 resp = GNUNET_REST_create_json_response (result);
788 GNUNET_free (result); 786 GNUNET_free (result);
789 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 787 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index dfad24d3c..48de1a7e5 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -499,9 +499,6 @@ create_new_record_cont (void *cls,
499 return; 499 return;
500 } 500 }
501 501
502 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
503 "Received %u records for name `%s'\n",
504 rd_count, rec_name);
505 if (0 != rd_count) 502 if (0 != rd_count)
506 { 503 {
507 handle->proc (handle->proc_cls, 504 handle->proc (handle->proc_cls,
@@ -1087,10 +1084,8 @@ testservice_id_task (void *cls, int result)
1087 GNUNET_asprintf (&handle->ego_name, "%s", ego); 1084 GNUNET_asprintf (&handle->ego_name, "%s", ego);
1088 if (NULL != name) 1085 if (NULL != name)
1089 GNUNET_asprintf (&handle->name, "%s", name); 1086 GNUNET_asprintf (&handle->name, "%s", name);
1090 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", handle->ego_name);
1091 if (NULL == handle->ego_name) 1087 if (NULL == handle->ego_name)
1092 { 1088 {
1093 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", handle->ego_name);
1094 handle->identity_handle = GNUNET_IDENTITY_connect (handle->cfg, &id_connect_cb, handle); 1089 handle->identity_handle = GNUNET_IDENTITY_connect (handle->cfg, &id_connect_cb, handle);
1095 if (NULL == handle->identity_handle) 1090 if (NULL == handle->identity_handle)
1096 { 1091 {