aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-07 21:26:46 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-07 21:26:46 +0000
commit1fb28e00ee7b770049328a9d880b00f553599e9a (patch)
treec8fa5ceec37d226b1ee6f7cfe80cf7320f5e0d30 /src/testing
parente063a6dba5bd47c430b87f325e142777b5928715 (diff)
downloadgnunet-1fb28e00ee7b770049328a9d880b00f553599e9a.tar.gz
gnunet-1fb28e00ee7b770049328a9d880b00f553599e9a.zip
-fixing #2976
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 73b2a4ee1..ab85db4d5 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1148,8 +1148,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1148{ 1148{
1149 struct GNUNET_TESTING_Peer *peer; 1149 struct GNUNET_TESTING_Peer *peer;
1150 struct GNUNET_DISK_FileHandle *fd; 1150 struct GNUNET_DISK_FileHandle *fd;
1151 char *service_home; 1151 char *hostkey_filename;
1152 char hostkey_filename[128];
1153 char *config_filename; 1152 char *config_filename;
1154 char *libexec_binary; 1153 char *libexec_binary;
1155 char *emsg_; 1154 char *emsg_;
@@ -1198,13 +1197,9 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1198 if (NULL != pk) 1197 if (NULL != pk)
1199 GNUNET_CRYPTO_ecc_key_free (pk); 1198 GNUNET_CRYPTO_ecc_key_free (pk);
1200 GNUNET_assert (GNUNET_OK == 1199 GNUNET_assert (GNUNET_OK ==
1201 GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", 1200 GNUNET_CONFIGURATION_get_value_filename (cfg, "PEER",
1202 "SERVICEHOME", 1201 "PRIVATE_KEY",
1203 &service_home)); 1202 &hostkey_filename));
1204 /* FIXME: might be better to evaluate actual configuration option here... */
1205 GNUNET_snprintf (hostkey_filename, sizeof (hostkey_filename), "%s/private.ecc",
1206 service_home);
1207 GNUNET_free (service_home);
1208 fd = GNUNET_DISK_file_open (hostkey_filename, 1203 fd = GNUNET_DISK_file_open (hostkey_filename,
1209 GNUNET_DISK_OPEN_CREATE | GNUNET_DISK_OPEN_WRITE, 1204 GNUNET_DISK_OPEN_CREATE | GNUNET_DISK_OPEN_WRITE,
1210 GNUNET_DISK_PERM_USER_READ 1205 GNUNET_DISK_PERM_USER_READ