diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/gnunet-gns-benchmark.c | 12 | ||||
-rw-r--r-- | src/util/crypto_ecc.c | 1 | ||||
-rw-r--r-- | src/util/crypto_rsa.c | 7 | ||||
-rw-r--r-- | src/util/test_crypto_ecdh_eddsa.c | 4 |
4 files changed, 17 insertions, 7 deletions
diff --git a/src/gns/gnunet-gns-benchmark.c b/src/gns/gnunet-gns-benchmark.c index 414c84495..dd393972a 100644 --- a/src/gns/gnunet-gns-benchmark.c +++ b/src/gns/gnunet-gns-benchmark.c | |||
@@ -181,6 +181,10 @@ static struct GNUNET_TIME_Relative timeout; | |||
181 | */ | 181 | */ |
182 | static unsigned int active_cnt; | 182 | static unsigned int active_cnt; |
183 | 183 | ||
184 | /** | ||
185 | * Look for GNS2DNS records specifically? | ||
186 | */ | ||
187 | static int g2d; | ||
184 | 188 | ||
185 | /** | 189 | /** |
186 | * Free @a req and data structures reachable from it. | 190 | * Free @a req and data structures reachable from it. |
@@ -294,7 +298,9 @@ process_queue (void *cls) | |||
294 | active_cnt); | 298 | active_cnt); |
295 | req->lr = GNUNET_GNS_lookup_with_tld (gns, | 299 | req->lr = GNUNET_GNS_lookup_with_tld (gns, |
296 | req->hostname, | 300 | req->hostname, |
297 | GNUNET_GNSRECORD_TYPE_GNS2DNS, | 301 | g2d |
302 | ? GNUNET_GNSRECORD_TYPE_GNS2DNS | ||
303 | : GNUNET_GNSRECORD_TYPE_ANY, | ||
298 | GNUNET_GNS_LO_DEFAULT, | 304 | GNUNET_GNS_LO_DEFAULT, |
299 | &process_result, | 305 | &process_result, |
300 | req); | 306 | req); |
@@ -580,6 +586,10 @@ main (int argc, | |||
580 | "RELATIVETIME", | 586 | "RELATIVETIME", |
581 | gettext_noop ("how long to wait for an answer"), | 587 | gettext_noop ("how long to wait for an answer"), |
582 | &timeout), | 588 | &timeout), |
589 | GNUNET_GETOPT_option_flag ('2', | ||
590 | "g2d", | ||
591 | gettext_noop ("look for GNS2DNS records instead of ANY"), | ||
592 | &g2d), | ||
583 | GNUNET_GETOPT_OPTION_END | 593 | GNUNET_GETOPT_OPTION_END |
584 | }; | 594 | }; |
585 | 595 | ||
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index 1abf0fddc..200371cd7 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c | |||
@@ -1275,6 +1275,7 @@ eddsa_d_to_a (gcry_mpi_t d) | |||
1275 | 1275 | ||
1276 | /* Note that we clear DIGEST so we can use it as input to left pad | 1276 | /* Note that we clear DIGEST so we can use it as input to left pad |
1277 | the key with zeroes for hashing. */ | 1277 | the key with zeroes for hashing. */ |
1278 | memset (digest, 0, sizeof digest); | ||
1278 | memset (hvec, 0, sizeof hvec); | 1279 | memset (hvec, 0, sizeof hvec); |
1279 | rawmpilen = sizeof (rawmpi); | 1280 | rawmpilen = sizeof (rawmpi); |
1280 | GNUNET_assert (0 == | 1281 | GNUNET_assert (0 == |
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index a985d8e59..bbd6c95ea 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -94,7 +94,6 @@ key_from_sexp (gcry_mpi_t *array, | |||
94 | gcry_sexp_t list; | 94 | gcry_sexp_t list; |
95 | gcry_sexp_t l2; | 95 | gcry_sexp_t l2; |
96 | const char *s; | 96 | const char *s; |
97 | unsigned int i; | ||
98 | unsigned int idx; | 97 | unsigned int idx; |
99 | 98 | ||
100 | if (! (list = gcry_sexp_find_token (sexp, topname, 0))) | 99 | if (! (list = gcry_sexp_find_token (sexp, topname, 0))) |
@@ -109,7 +108,7 @@ key_from_sexp (gcry_mpi_t *array, | |||
109 | { | 108 | { |
110 | if (! (l2 = gcry_sexp_find_token (list, s, 1))) | 109 | if (! (l2 = gcry_sexp_find_token (list, s, 1))) |
111 | { | 110 | { |
112 | for (i = 0; i < idx; i++) | 111 | for (unsigned int i = 0; i < idx; i++) |
113 | { | 112 | { |
114 | gcry_free (array[i]); | 113 | gcry_free (array[i]); |
115 | array[i] = NULL; | 114 | array[i] = NULL; |
@@ -121,7 +120,7 @@ key_from_sexp (gcry_mpi_t *array, | |||
121 | gcry_sexp_release (l2); | 120 | gcry_sexp_release (l2); |
122 | if (! array[idx]) | 121 | if (! array[idx]) |
123 | { | 122 | { |
124 | for (i = 0; i < idx; i++) | 123 | for (unsigned int i = 0; i < idx; i++) |
125 | { | 124 | { |
126 | gcry_free (array[i]); | 125 | gcry_free (array[i]); |
127 | array[i] = NULL; | 126 | array[i] = NULL; |
@@ -720,7 +719,7 @@ rsa_full_domain_hash (const struct GNUNET_CRYPTO_RsaPublicKey *pkey, | |||
720 | * @param pkey the public key of the signer | 719 | * @param pkey the public key of the signer |
721 | * @param[out] buf set to a buffer with the blinded message to be signed | 720 | * @param[out] buf set to a buffer with the blinded message to be signed |
722 | * @param[out] buf_size number of bytes stored in @a buf | 721 | * @param[out] buf_size number of bytes stored in @a buf |
723 | * @return GNUNET_YES if successful, GNUNET_NO if RSA key is malicious | 722 | * @return #GNUNET_YES if successful, #GNUNET_NO if RSA key is malicious |
724 | */ | 723 | */ |
725 | int | 724 | int |
726 | GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, | 725 | GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, |
diff --git a/src/util/test_crypto_ecdh_eddsa.c b/src/util/test_crypto_ecdh_eddsa.c index 356c64bf1..dba28e90a 100644 --- a/src/util/test_crypto_ecdh_eddsa.c +++ b/src/util/test_crypto_ecdh_eddsa.c | |||
@@ -42,7 +42,7 @@ test_ecdh() | |||
42 | priv_dsa = GNUNET_CRYPTO_eddsa_key_create (); | 42 | priv_dsa = GNUNET_CRYPTO_eddsa_key_create (); |
43 | GNUNET_CRYPTO_eddsa_key_get_public (priv_dsa, | 43 | GNUNET_CRYPTO_eddsa_key_get_public (priv_dsa, |
44 | &id1); | 44 | &id1); |
45 | for (unsigned int j=0;j<10;j++) | 45 | for (unsigned int j=0;j<4;j++) |
46 | { | 46 | { |
47 | fprintf (stderr, ","); | 47 | fprintf (stderr, ","); |
48 | priv_ecdh = GNUNET_CRYPTO_ecdhe_key_create (); | 48 | priv_ecdh = GNUNET_CRYPTO_ecdhe_key_create (); |
@@ -82,7 +82,7 @@ main (int argc, char *argv[]) | |||
82 | if (getenv ("GNUNET_GCRYPT_DEBUG")) | 82 | if (getenv ("GNUNET_GCRYPT_DEBUG")) |
83 | gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); | 83 | gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); |
84 | GNUNET_log_setup ("test-crypto-ecdh-eddsa", "WARNING", NULL); | 84 | GNUNET_log_setup ("test-crypto-ecdh-eddsa", "WARNING", NULL); |
85 | for (unsigned int i=0;i<100;i++) | 85 | for (unsigned int i=0;i<4;i++) |
86 | { | 86 | { |
87 | fprintf (stderr, | 87 | fprintf (stderr, |
88 | "."); | 88 | "."); |