projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable AutoConnect in the ns-ping test.
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
ed69808
..
7b4c741
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-222,7
+222,7
@@
static bool read_ecdsa_private_key(void) {
return false;
}
return false;
}
-#if
!defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
+#if
ndef HAVE_MINGW
struct stat s;
if(fstat(fileno(fp), &s)) {
struct stat s;
if(fstat(fileno(fp), &s)) {
@@
-314,7
+314,7
@@
static bool read_rsa_private_key(void) {
return false;
}
return false;
}
-#if
!defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
+#if
ndef HAVE_MINGW
struct stat s;
if(fstat(fileno(fp), &s)) {
struct stat s;
if(fstat(fileno(fp), &s)) {
@@
-341,6
+341,7
@@
static bool read_rsa_private_key(void) {
}
#endif
}
#endif
+#ifndef DISABLE_LEGACY
static timeout_t keyexpire_timeout;
static void keyexpire_handler(void *data) {
static timeout_t keyexpire_timeout;
static void keyexpire_handler(void *data) {
@@
-349,6
+350,7
@@
static void keyexpire_handler(void *data) {
keylifetime, rand() % 100000
});
}
keylifetime, rand() % 100000
});
}
+#endif
void regenerate_key(void) {
logger(DEBUG_STATUS, LOG_INFO, "Expiring symmetric keys");
void regenerate_key(void) {
logger(DEBUG_STATUS, LOG_INFO, "Expiring symmetric keys");
@@
-822,7
+824,7
@@
void device_disable(void) {
Configure node_t myself and set up the local sockets (listen only)
*/
static bool setup_myself(void) {
Configure node_t myself and set up the local sockets (listen only)
*/
static bool setup_myself(void) {
- char *name, *hostname, *
cipher, *digest, *
type;
+ char *name, *hostname, *type;
char *address = NULL;
bool port_specified = false;
char *address = NULL;
bool port_specified = false;
@@
-967,6
+969,8
@@
static bool setup_myself(void) {
#ifndef DISABLE_LEGACY
/* Generate packet encryption key */
#ifndef DISABLE_LEGACY
/* Generate packet encryption key */
+ char *cipher;
+
if(!get_config_string(lookup_config(config_tree, "Cipher"), &cipher)) {
cipher = xstrdup("aes-256-cbc");
}
if(!get_config_string(lookup_config(config_tree, "Cipher"), &cipher)) {
cipher = xstrdup("aes-256-cbc");
}
@@
-995,6
+999,8
@@
static bool setup_myself(void) {
return false;
}
return false;
}
+ char *digest;
+
if(!get_config_string(lookup_config(config_tree, "Digest"), &digest)) {
digest = xstrdup("sha256");
}
if(!get_config_string(lookup_config(config_tree, "Digest"), &digest)) {
digest = xstrdup("sha256");
}