aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-26 15:12:34 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-26 15:12:34 +0200
commitb6cbb6f800ef9aeebcfb76a7ba721d4b95a2e2ca (patch)
treec493c4495db597a0382c32f67837cfac23b9ddcf /src
parent4644e3ae1def4f43a24bc76f5dacc3dd94807126 (diff)
downloadgnunet-b6cbb6f800ef9aeebcfb76a7ba721d4b95a2e2ca.tar.gz
gnunet-b6cbb6f800ef9aeebcfb76a7ba721d4b95a2e2ca.zip
-fix typos
Diffstat (limited to 'src')
-rw-r--r--src/gnsrecord/gnsrecord_misc.c9
-rw-r--r--src/gnsrecord/gnunet-gnsrecord-tvg.c6
-rw-r--r--src/include/gnunet_crypto_lib.h2
-rw-r--r--src/include/gnunet_gnsrecord_lib.h2
-rw-r--r--src/include/gnunet_testing_netjail_lib.h2
-rw-r--r--src/include/gnunet_testing_ng_lib.h2
-rw-r--r--src/testing/testing.c18
-rw-r--r--src/testing/testing_api_loop.c9
-rw-r--r--src/transport/gnunet-communicator-tcp.c20
-rw-r--r--src/transport/gnunet-service-tng.c7
-rw-r--r--src/util/test_crypto_cs.c6
11 files changed, 37 insertions, 46 deletions
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 54d8fb860..5e3bbdb8c 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -44,6 +44,7 @@ GNUNET_GNSRECORD_string_normalize (const char *src)
44 return GNUNET_STRINGS_utf8_normalize (src); 44 return GNUNET_STRINGS_utf8_normalize (src);
45} 45}
46 46
47
47enum GNUNET_GenericReturnValue 48enum GNUNET_GenericReturnValue
48GNUNET_GNSRECORD_label_check (const char*label, char **emsg) 49GNUNET_GNSRECORD_label_check (const char*label, char **emsg)
49{ 50{
@@ -60,6 +61,7 @@ GNUNET_GNSRECORD_label_check (const char*label, char **emsg)
60 return GNUNET_OK; 61 return GNUNET_OK;
61} 62}
62 63
64
63/** 65/**
64 * Convert a zone key to a string (for printing debug messages). 66 * Convert a zone key to a string (for printing debug messages).
65 * This is one of the very few calls in the entire API that is 67 * This is one of the very few calls in the entire API that is
@@ -409,6 +411,7 @@ GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data *rd,
409 411
410} 412}
411 413
414
412enum GNUNET_GenericReturnValue 415enum GNUNET_GenericReturnValue
413GNUNET_GNSRECORD_normalize_record_set (const char *label, 416GNUNET_GNSRECORD_normalize_record_set (const char *label,
414 const struct 417 const struct
@@ -488,7 +491,7 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
488 (GNUNET_YES == have_gns2dns)) 491 (GNUNET_YES == have_gns2dns))
489 { 492 {
490 *emsg = GNUNET_strdup (_ ( 493 *emsg = GNUNET_strdup (_ (
491 "Redirection record set conains mutually exclusive records.")); 494 "Redirection record set contains mutually exclusive records."));
492 return GNUNET_SYSERR; 495 return GNUNET_SYSERR;
493 } 496 }
494 /* No redirection records under empty label*/ 497 /* No redirection records under empty label*/
@@ -514,7 +517,7 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
514 (GNUNET_YES == have_zone_delegation)) 517 (GNUNET_YES == have_zone_delegation))
515 { 518 {
516 *emsg = GNUNET_strdup (_ ( 519 *emsg = GNUNET_strdup (_ (
517 "Redirection record set conains mutually exclusive records.")); 520 "Redirection record set contains mutually exclusive records."));
518 return GNUNET_SYSERR; 521 return GNUNET_SYSERR;
519 } 522 }
520 have_gns2dns = GNUNET_YES; 523 have_gns2dns = GNUNET_YES;
@@ -557,6 +560,7 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
557 return GNUNET_OK; 560 return GNUNET_OK;
558} 561}
559 562
563
560enum GNUNET_GenericReturnValue 564enum GNUNET_GenericReturnValue
561GNUNET_GNSRECORD_convert_records_for_export (const char *label, 565GNUNET_GNSRECORD_convert_records_for_export (const char *label,
562 const struct 566 const struct
@@ -580,5 +584,4 @@ GNUNET_GNSRECORD_convert_records_for_export (const char *label,
580} 584}
581 585
582 586
583
584/* end of gnsrecord_misc.c */ 587/* end of gnsrecord_misc.c */
diff --git a/src/gnsrecord/gnunet-gnsrecord-tvg.c b/src/gnsrecord/gnunet-gnsrecord-tvg.c
index 7fef6f8e7..d45b3a5d8 100644
--- a/src/gnsrecord/gnunet-gnsrecord-tvg.c
+++ b/src/gnsrecord/gnunet-gnsrecord-tvg.c
@@ -104,7 +104,7 @@ print_record (const struct GNUNET_GNSRECORD_Data *rd)
104 printf ("\nDATA_SIZE:\n"); 104 printf ("\nDATA_SIZE:\n");
105 print_bytes (&size_nbo, sizeof (size_nbo), 8); 105 print_bytes (&size_nbo, sizeof (size_nbo), 8);
106 printf ("\nTYPE:\n"); 106 printf ("\nTYPE:\n");
107 print_bytes(&type_nbo, sizeof (type_nbo), 8); 107 print_bytes (&type_nbo, sizeof (type_nbo), 8);
108 printf ("\nFLAGS: "); 108 printf ("\nFLAGS: ");
109 print_bytes ((void*) &flags, sizeof (flags), 8); 109 print_bytes ((void*) &flags, sizeof (flags), 8);
110 printf ("\n"); 110 printf ("\n");
@@ -173,7 +173,7 @@ run_pkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char *label)
173 printf ("Label:\n"); 173 printf ("Label:\n");
174 print_bytes (conv_lbl, strlen (conv_lbl), 8); 174 print_bytes (conv_lbl, strlen (conv_lbl), 8);
175 GNUNET_free (conv_lbl); 175 GNUNET_free (conv_lbl);
176 printf ("\nNumber of records (integer): %d\n\n", rd_count); 176 printf ("\Number of records (integer): %d\n\n", rd_count);
177 177
178 for (int i = 0; i < rd_count; i++) 178 for (int i = 0; i < rd_count; i++)
179 { 179 {
@@ -300,7 +300,7 @@ run_edkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char*label)
300 print_bytes (conv_lbl, strlen (conv_lbl), 8); 300 print_bytes (conv_lbl, strlen (conv_lbl), 8);
301 GNUNET_free (conv_lbl); 301 GNUNET_free (conv_lbl);
302 fprintf (stdout, 302 fprintf (stdout,
303 "\nNumber of records (integer): %d\n\n", rd_count); 303 "\Number of records (integer): %d\n\n", rd_count);
304 304
305 for (int i = 0; i < rd_count; i++) 305 for (int i = 0; i < rd_count; i++)
306 { 306 {
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 7bc7cf143..2737ee0e9 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -289,7 +289,7 @@ struct GNUNET_CRYPTO_EddsaPrivateScalar
289 289
290/** 290/**
291 * Private ECC key material encoded for transmission. To be used only for 291 * Private ECC key material encoded for transmission. To be used only for
292 * Edx25519 signatures. An inital key corresponds to data from the key 292 * Edx25519 signatures. An initial key corresponds to data from the key
293 * expansion and clamping in the EdDSA key generation. 293 * expansion and clamping in the EdDSA key generation.
294 */ 294 */
295struct GNUNET_CRYPTO_Edx25519PrivateKey 295struct GNUNET_CRYPTO_Edx25519PrivateKey
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index 51dd5972d..006211aee 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -78,7 +78,7 @@ enum GNUNET_GNSRECORD_Flags
78 78
79 /** 79 /**
80 * This record is critical. If it cannot be processed 80 * This record is critical. If it cannot be processed
81 * (for example beacuse the record type is unknown) 81 * (for example because the record type is unknown)
82 * resolution MUST fail 82 * resolution MUST fail
83 */ 83 */
84 GNUNET_GNSRECORD_RF_CRITICAL = 1, 84 GNUNET_GNSRECORD_RF_CRITICAL = 1,
diff --git a/src/include/gnunet_testing_netjail_lib.h b/src/include/gnunet_testing_netjail_lib.h
index 4b5d7cfa1..b65ae6537 100644
--- a/src/include/gnunet_testing_netjail_lib.h
+++ b/src/include/gnunet_testing_netjail_lib.h
@@ -293,7 +293,7 @@ GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology);
293 293
294 294
295/** 295/**
296 * Calculate the unique id identifying a node from a given connction. 296 * Calculate the unique id identifying a node from a given connection.
297 * 297 *
298 * @param node_connection The connection we calculate the id from. 298 * @param node_connection The connection we calculate the id from.
299 * @param topology The topology we get all needed information from. 299 * @param topology The topology we get all needed information from.
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index 7e1ee4249..1bc66e59d 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -240,7 +240,7 @@ GNUNET_TESTING_interpreter_lookup_command (
240 240
241/** 241/**
242 * Lookup command by label. 242 * Lookup command by label.
243 * All commands, first into the past, then into the furture are looked up. 243 * All commands, first into the past, then into the future are looked up.
244 * 244 *
245 * @param is interpreter to lookup command in 245 * @param is interpreter to lookup command in
246 * @param label label of the command to lookup. 246 * @param label label of the command to lookup.
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 6480d32f9..a00d7217f 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1319,7 +1319,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1319 peer->nports = nports; 1319 peer->nports = nports;
1320 return peer; 1320 return peer;
1321 1321
1322 err_ret: 1322err_ret:
1323 GNUNET_free (ss_instances); 1323 GNUNET_free (ss_instances);
1324 GNUNET_free (ports); 1324 GNUNET_free (ports);
1325 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_); 1325 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
@@ -2258,17 +2258,11 @@ GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology)
2258 GNUNET_free (topology); 2258 GNUNET_free (topology);
2259} 2259}
2260 2260
2261/** 2261
2262 * Calculate the unique id identifying a node from a given connction.
2263 *
2264 * @param node_connection The connection we calculate the id from.
2265 * @param topology The topology we get all needed information from.
2266 * @return The unique id of the node from the connection.
2267 */
2268unsigned int 2262unsigned int
2269GNUNET_TESTING_calculate_num (struct 2263GNUNET_TESTING_calculate_num (
2270 GNUNET_TESTING_NodeConnection *node_connection, 2264 struct GNUNET_TESTING_NodeConnection *node_connection,
2271 struct GNUNET_TESTING_NetjailTopology *topology) 2265 struct GNUNET_TESTING_NetjailTopology *topology)
2272{ 2266{
2273 unsigned int n, m, num; 2267 unsigned int n, m, num;
2274 2268
@@ -2677,7 +2671,7 @@ GNUNET_TESTING_get_topo_from_file (const char *filename)
2677 } 2671 }
2678 2672
2679 LOG (GNUNET_ERROR_TYPE_DEBUG, 2673 LOG (GNUNET_ERROR_TYPE_DEBUG,
2680 "file lenght %lu\n", 2674 "file length %lu\n",
2681 fs); 2675 fs);
2682 data[fs] = '\0'; 2676 data[fs] = '\0';
2683 2677
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 95d6b88e6..283284f26 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -189,14 +189,6 @@ GNUNET_TESTING_interpreter_lookup_command (
189} 189}
190 190
191 191
192/**
193 * Lookup command by label.
194 * All commands, first into the past, then into the furture are looked up.
195 *
196 * @param is interpreter to lookup command in
197 * @param label label of the command to lookup.
198 * @return the command, if it is found, or NULL.
199 */
200const struct GNUNET_TESTING_Command * 192const struct GNUNET_TESTING_Command *
201GNUNET_TESTING_interpreter_lookup_command_all ( 193GNUNET_TESTING_interpreter_lookup_command_all (
202 struct GNUNET_TESTING_Interpreter *is, 194 struct GNUNET_TESTING_Interpreter *is,
@@ -351,6 +343,7 @@ GNUNET_TESTING_interpreter_get_current_command (
351 return &is->commands[is->ip]; 343 return &is->commands[is->ip];
352} 344}
353 345
346
354const char * 347const char *
355GNUNET_TESTING_interpreter_get_current_label ( 348GNUNET_TESTING_interpreter_get_current_label (
356 struct GNUNET_TESTING_Interpreter *is) 349 struct GNUNET_TESTING_Interpreter *is)
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index be75fa0e8..6d7a151ec 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -1340,10 +1340,11 @@ do_rekey (struct Queue *queue, const struct TCPRekey *rekey)
1340 GNUNET_TIME_absolute_ntoh (thp.monotonic_time))); 1340 GNUNET_TIME_absolute_ntoh (thp.monotonic_time)));
1341 GNUNET_assert (ntohl ((&thp)->purpose.size) == sizeof (*(&thp))); 1341 GNUNET_assert (ntohl ((&thp)->purpose.size) == sizeof (*(&thp)));
1342 if (GNUNET_OK != 1342 if (GNUNET_OK !=
1343 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY, 1343 GNUNET_CRYPTO_eddsa_verify (
1344 &thp, 1344 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY,
1345 &rekey->sender_sig, 1345 &thp,
1346 &queue->target.public_key)) 1346 &rekey->sender_sig,
1347 &queue->target.public_key))
1347 { 1348 {
1348 GNUNET_break (0); 1349 GNUNET_break (0);
1349 queue_finish (queue); 1350 queue_finish (queue);
@@ -1447,7 +1448,8 @@ handshake_ack_monotime_cb (void *cls,
1447 * @param queue The queue context. 1448 * @param queue The queue context.
1448 */ 1449 */
1449static void 1450static void
1450send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge, struct Queue *queue) 1451send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge, struct
1452 Queue *queue)
1451{ 1453{
1452 struct TCPConfirmationAck tca; 1454 struct TCPConfirmationAck tca;
1453 struct TcpHandshakeAckSignature thas; 1455 struct TcpHandshakeAckSignature thas;
@@ -2450,7 +2452,7 @@ boot_queue (struct Queue *queue)
2450 * Generate and transmit our ephemeral key and the signature for 2452 * Generate and transmit our ephemeral key and the signature for
2451 * the initial KX with the other peer. Must be called first, before 2453 * the initial KX with the other peer. Must be called first, before
2452 * any other bytes are ever written to the output buffer. Note that 2454 * any other bytes are ever written to the output buffer. Note that
2453 * our cipher must already be initialized when calling thi function. 2455 * our cipher must already be initialized when calling this function.
2454 * Helper function for #start_initial_kx_out(). 2456 * Helper function for #start_initial_kx_out().
2455 * 2457 *
2456 * @param queue queue to do KX for 2458 * @param queue queue to do KX for
@@ -2472,7 +2474,8 @@ transmit_kx (struct Queue *queue,
2472 GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, 2474 GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
2473 &tc.challenge, 2475 &tc.challenge,
2474 sizeof(tc.challenge)); 2476 sizeof(tc.challenge));
2475 ths.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE); 2477 ths.purpose.purpose = htonl (
2478 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
2476 ths.purpose.size = htonl (sizeof(ths)); 2479 ths.purpose.size = htonl (sizeof(ths));
2477 ths.sender = my_identity; 2480 ths.sender = my_identity;
2478 ths.receiver = queue->target; 2481 ths.receiver = queue->target;
@@ -2625,7 +2628,8 @@ decrypt_and_check_tc (struct Queue *queue,
2625 sizeof(*tc), 2628 sizeof(*tc),
2626 &ibuf[sizeof(struct GNUNET_CRYPTO_EcdhePublicKey)], 2629 &ibuf[sizeof(struct GNUNET_CRYPTO_EcdhePublicKey)],
2627 sizeof(*tc))); 2630 sizeof(*tc)));
2628 ths.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE); 2631 ths.purpose.purpose = htonl (
2632 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
2629 ths.purpose.size = htonl (sizeof(ths)); 2633 ths.purpose.size = htonl (sizeof(ths));
2630 ths.sender = tc->sender; 2634 ths.sender = tc->sender;
2631 ths.receiver = my_identity; 2635 ths.receiver = my_identity;
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 18ec0aa0b..7efe07fda 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -82,7 +82,7 @@
82#include "transport.h" 82#include "transport.h"
83 83
84/** 84/**
85 * Maximum number of FC retransmissions for a runing retransmission task. 85 * Maximum number of FC retransmissions for a running retransmission task.
86 */ 86 */
87#define MAX_FC_RETRANSMIT_COUNT 1000 87#define MAX_FC_RETRANSMIT_COUNT 1000
88 88
@@ -1934,9 +1934,6 @@ struct Queue
1934}; 1934};
1935 1935
1936 1936
1937
1938
1939
1940/** 1937/**
1941 * A neighbour that at least one communicator is connected to. 1938 * A neighbour that at least one communicator is connected to.
1942 */ 1939 */
@@ -9827,7 +9824,7 @@ handle_send_message_ack (void *cls,
9827 (unsigned long long) queue->qid, 9824 (unsigned long long) queue->qid,
9828 (unsigned long long) sma->mid); 9825 (unsigned long long) sma->mid);
9829 qe = qep; 9826 qe = qep;
9830 if ((NULL != qe->pm)&&(qe->pm->qe != qe)) 9827 if ((NULL != qe->pm) && (qe->pm->qe != qe))
9831 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 9828 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
9832 "For pending message %llu we had retransmissions.\n", 9829 "For pending message %llu we had retransmissions.\n",
9833 qe->pm->logging_uuid); 9830 qe->pm->logging_uuid);
diff --git a/src/util/test_crypto_cs.c b/src/util/test_crypto_cs.c
index 914ded9bc..a56ff7421 100644
--- a/src/util/test_crypto_cs.c
+++ b/src/util/test_crypto_cs.c
@@ -241,7 +241,7 @@ test_calc_blindedc (const struct GNUNET_CRYPTO_CsBlindingSecret bs[2],
241 241
242 /* TEST 2 242 /* TEST 2
243 * Check if R' - aG -bX = R for b = 0 243 * Check if R' - aG -bX = R for b = 0
244 * This test does the opposite operations and checks wether the equation is still correct. 244 * This test does the opposite operations and checks whether the equation is still correct.
245 */ 245 */
246 for (unsigned int b = 0; b <= 1; b++) 246 for (unsigned int b = 0; b <= 1; b++)
247 { 247 {
@@ -338,7 +338,7 @@ test_blind_sign (unsigned int *b,
338 338
339 /* TEST 2 339 /* TEST 2
340 * Check if s := rb + cbX 340 * Check if s := rb + cbX
341 * This test does the opposite operations and checks wether the equation is still correct. 341 * This test does the opposite operations and checks whether the equation is still correct.
342 */ 342 */
343 struct GNUNET_CRYPTO_Cs25519Scalar cb_mul_x; 343 struct GNUNET_CRYPTO_Cs25519Scalar cb_mul_x;
344 struct GNUNET_CRYPTO_Cs25519Scalar s_min_rb; 344 struct GNUNET_CRYPTO_Cs25519Scalar s_min_rb;
@@ -393,7 +393,7 @@ test_unblinds (const struct GNUNET_CRYPTO_CsBlindS *blinded_signature_scalar,
393 393
394 /* TEST 2 394 /* TEST 2
395 * Check if s' := s + a mod p 395 * Check if s' := s + a mod p
396 * This test does the opposite operations and checks wether the equation is still correct. 396 * This test does the opposite operations and checks whether the equation is still correct.
397 */ 397 */
398 struct GNUNET_CRYPTO_Cs25519Scalar s_min_a; 398 struct GNUNET_CRYPTO_Cs25519Scalar s_min_a;
399 399