#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/evp.h>
+#include <openssl/bn.h>
#include "avl_tree.h"
#include "conf.h"
char *myport;
devops_t devops;
-#ifndef HAVE_RSA_SET0_KEY
-int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) {
- BN_free(r->n);
- r->n = n;
- BN_free(r->e);
- r->e = e;
- BN_free(r->d);
- r->d = d;
- return 1;
-}
-#endif
-
bool read_rsa_public_key(connection_t *c) {
FILE *fp;
char *pubname;
return false;
}
-#if !defined(HAVE_MINGW) && !defined(HAVE___CYGWIN32__)
+#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
struct stat s;
if(!fstat(fileno(fp), &s)) {
char *address = NULL;
char *proxy = NULL;
char *space;
- char *envp[5] = {};
- struct addrinfo *ai, *aip, hint = {};
+ char *envp[5] = {0};
+ struct addrinfo *ai, *aip, hint = {0};
bool choice;
int i, err;
int replaywin_int;
}
/* Run tinc-up script to further initialize the tap interface */
- xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
- xasprintf(&envp[1], "DEVICE=%s", device ? : "");
- xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
+ xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
+ xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
+ xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
xasprintf(&envp[3], "NAME=%s", myself->name);
#ifdef HAVE_MINGW
Sleep(1000);
#endif
-#ifdef HAVE___CYGWIN32__
+#ifdef HAVE_CYGWIN
sleep(1);
#endif
execute_script("tinc-up", envp);
void close_network_connections(void) {
avl_node_t *node, *next;
connection_t *c;
- char *envp[5] = {};
+ char *envp[5] = {0};
int i;
for(node = connection_tree->head; node; node = next) {
close(listen_socket[i].udp);
}
- xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
- xasprintf(&envp[1], "DEVICE=%s", device ? : "");
- xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
+ xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
+ xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
+ xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
xasprintf(&envp[3], "NAME=%s", myself->name);
exit_requests();