From: Christian Grothoff Date: Thu, 11 Oct 2012 14:12:46 +0000 (+0000) Subject: -only generate keys of size 914 X-Git-Tag: initial-import-from-subversion-38251~11447 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e10d678fc055eadde27abf723782c701012322ce;p=oweals%2Fgnunet.git -only generate keys of size 914 --- diff --git a/src/util/gnunet-rsa.c b/src/util/gnunet-rsa.c index cdf693841..040e66ea9 100644 --- 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 @@ -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,