[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23901 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23901 - gnunet/src/transport |
Date: |
Wed, 19 Sep 2012 14:51:44 +0200 |
Author: wachs
Date: 2012-09-19 14:51:44 +0200 (Wed, 19 Sep 2012)
New Revision: 23901
Modified:
gnunet/src/transport/plugin_transport_http_server.c
gnunet/src/transport/transport.conf.in
Log:
move https cert location to servicehome
Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-09-19 09:56:17 UTC
(rev 23900)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-09-19 12:51:44 UTC
(rev 23901)
@@ -1646,10 +1646,10 @@
last_timeout, timeout);
last_timeout = timeout;
}
- //if (timeout <= GNUNET_TIME_UNIT_SECONDS.rel_value)
+ if (timeout <= GNUNET_TIME_UNIT_SECONDS.rel_value)
tv.rel_value = (uint64_t) timeout;
- //else
- //tv = GNUNET_TIME_UNIT_SECONDS;
+ else
+ tv = GNUNET_TIME_UNIT_SECONDS;
}
else
tv = GNUNET_TIME_UNIT_SECONDS;
@@ -1750,12 +1750,25 @@
{
int res = GNUNET_OK;
+ char *sh;
char *key_file;
char *cert_file;
/* Get crypto init string from config
* If not present just use default values */
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg,
+ "PATHS",
+ "SERVICEHOME",
+ &sh))
+ {
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
+ "Failed to get servicehome!\n");
+ return GNUNET_SYSERR;
+ }
+
+
if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg,
plugin->name,
@@ -1772,16 +1785,19 @@
GNUNET_CONFIGURATION_get_value_filename (plugin->env->cfg, plugin->name,
"KEY_FILE", &key_file))
{
- key_file = GNUNET_strdup ("https_key.key");
+ GNUNET_break (0);
+ GNUNET_asprintf (&key_file, "%s/%s", sh, "https_key.key");
}
+
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (plugin->env->cfg, plugin->name,
"CERT_FILE", &cert_file))
{
- GNUNET_asprintf (&cert_file, "%s", "https_cert.crt");
+ GNUNET_break (0);
+ GNUNET_asprintf (&cert_file, "%s/%s", sh, "https_cert.crt");
}
-
+ GNUNET_free (sh);
/* read key & certificates from file */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Trying to loading TLS certificate from key-file `%s'
cert-file`%s'\n",
Modified: gnunet/src/transport/transport.conf.in
===================================================================
--- gnunet/src/transport/transport.conf.in 2012-09-19 09:56:17 UTC (rev
23900)
+++ gnunet/src/transport/transport.conf.in 2012-09-19 12:51:44 UTC (rev
23901)
@@ -70,8 +70,8 @@
[transport-https_server]
PORT = 4433
CRYPTO_INIT = NORMAL
-KEY_FILE = https.key
-CERT_FILE = https.cert
+KEY_FILE = $SERVICEHOME/https.key
+CERT_FILE = $SERVICEHOME/https.cert
MAX_CONNECTIONS = 128
TESTING_IGNORE_KEYS = ACCEPT_FROM;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23901 - gnunet/src/transport,
gnunet <=