[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24266 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24266 - gnunet/src/util |
Date: |
Thu, 11 Oct 2012 16:12:46 +0200 |
Author: grothoff
Date: 2012-10-11 16:12:46 +0200 (Thu, 11 Oct 2012)
New Revision: 24266
Modified:
gnunet/src/util/gnunet-rsa.c
Log:
-only generate keys of size 914
Modified: gnunet/src/util/gnunet-rsa.c
===================================================================
--- gnunet/src/util/gnunet-rsa.c 2012-10-11 13:52:22 UTC (rev 24265)
+++ gnunet/src/util/gnunet-rsa.c 2012-10-11 14:12:46 UTC (rev 24266)
@@ -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 @@
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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24266 - gnunet/src/util,
gnunet <=