projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b403b91
)
-only generate keys of size 914
author
Christian Grothoff
<christian@grothoff.org>
Thu, 11 Oct 2012 14:12:46 +0000
(14:12 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Thu, 11 Oct 2012 14:12:46 +0000
(14:12 +0000)
src/util/gnunet-rsa.c
patch
|
blob
|
history
diff --git
a/src/util/gnunet-rsa.c
b/src/util/gnunet-rsa.c
index cdf69384141a04e2ecca34268620dfbe5748b85e..040e66ea9ae134f226f89a7fae9f6ed8a6f20be8 100644
(file)
--- a/
src/util/gnunet-rsa.c
+++ b/
src/util/gnunet-rsa.c
@@
-25,6
+25,7
@@
*/
#include "platform.h"
#include "gnunet_util_lib.h"
+#include "gnunet_testing_lib-new.h"
#include <gcrypt.h>
@@
-121,6
+122,13
@@
create_keys (const char *fn)
break;
}
enc = GNUNET_CRYPTO_rsa_encode_key (pk);
+ if (GNUNET_TESTING_HOSTKEYFILESIZE != htons (enc->len))
+ {
+ /* sometimes we get a different key length because 'd' or 'u' start
+ with leading bits; skip those... */
+ make_keys++;
+ continue;
+ }
if (htons (enc->len) != fwrite (enc, 1, htons (enc->len), f))
{
fprintf (stderr,