- fix 2699
[oweals/gnunet.git] / src / util / crypto_ecc.c
index 97ba2a3b6560563c6ff770b2e32ce6b78c4c8fcb..e0764d8d54d8fbef37df8609708c1ae190c4ad90 100644 (file)
@@ -831,7 +831,6 @@ GNUNET_CRYPTO_ecc_key_create_start (const char *filename,
 {
   struct GNUNET_CRYPTO_EccKeyGenerationContext *gc;
   struct GNUNET_CRYPTO_EccPrivateKey *pk;
-  const char *weak_random;
 
   if (NULL != (pk = try_read_key (filename)))
   {
@@ -859,10 +858,6 @@ GNUNET_CRYPTO_ecc_key_create_start (const char *filename,
     GNUNET_free (gc);
     return NULL;
   }
-  weak_random = NULL;
-  if (GNUNET_YES ==
-      GNUNET_CRYPTO_random_is_weak ())
-    weak_random = "-w";
   gc->gnunet_ecc = GNUNET_OS_start_process (GNUNET_NO,
                                            GNUNET_OS_INHERIT_STD_ERR,
                                            NULL, 
@@ -870,7 +865,6 @@ GNUNET_CRYPTO_ecc_key_create_start (const char *filename,
                                            "gnunet-ecc",
                                            "gnunet-ecc",                                           
                                            gc->filename,
-                                           weak_random,
                                            NULL);
   if (NULL == gc->gnunet_ecc)
   {
@@ -1128,7 +1122,7 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *key,
   }
 #else
   /* use broken version, insecure! */
-  GNUNET_break (0);
+  GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("To be implemented: not secure at the moment, please read README"));
   slen = sprintf ((char*) sdata_buf, "FIXME-this is not key material");
 #endif
   gcry_sexp_release (data);