projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- add subdirectory gitignore files
[oweals/gnunet.git]
/
src
/
util
/
test_peer.c
diff --git
a/src/util/test_peer.c
b/src/util/test_peer.c
index fa4d31b8db3bd2e319eabd683c2e918b3bdc8a95..d16c66a27da4a706cdba1c3aea8b316c8b1293af 100644
(file)
--- a/
src/util/test_peer.c
+++ b/
src/util/test_peer.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet.
/*
This file is part of GNUnet.
- (C) 2009 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
* @file util/test_peer.c
*/
/**
* @file util/test_peer.c
@@
-24,8
+24,8
@@
*/
#include "platform.h"
*/
#include "platform.h"
-#include "gnunet_
crypto
_lib.h"
-#include
"gnunet_peer_lib.h"
+#include "gnunet_
util
_lib.h"
+#include
<gcrypt.h>
#define NUMBER_OF_PEERS 10
#define NUMBER_OF_PEERS 10
@@
-42,8
+42,9
@@
generatePeerIdList ()
for (i = 0; i < NUMBER_OF_PEERS; i++)
{
for (i = 0; i < NUMBER_OF_PEERS; i++)
{
- GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
- &pidArr[i].hashPubKey);
+ gcry_randomize (&pidArr[i],
+ sizeof (struct GNUNET_PeerIdentity),
+ GCRY_STRONG_RANDOM);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer %d: %s\n", i, GNUNET_i2s (&pidArr[i]));
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer %d: %s\n", i, GNUNET_i2s (&pidArr[i]));
}