diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/net/address.c | 5 | ||||
-rw-r--r-- | src/lib/tls/tortls_openssl.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/net/address.c b/src/lib/net/address.c index 27514ef5b8..03767e2950 100644 --- a/src/lib/net/address.c +++ b/src/lib/net/address.c @@ -1205,11 +1205,6 @@ tor_addr_parse(tor_addr_t *addr, const char *src) return result; } -#ifdef _WIN32 -typedef ULONG (WINAPI *GetAdaptersAddresses_fn_t)( - ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG); -#endif - #ifdef HAVE_IFADDRS_TO_SMARTLIST /* * Convert a linked list consisting of <b>ifaddrs</b> structures diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c index 560a951bc0..dc6c0bee9c 100644 --- a/src/lib/tls/tortls_openssl.c +++ b/src/lib/tls/tortls_openssl.c @@ -548,6 +548,12 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime, if (!(result->ctx = SSL_CTX_new(SSLv23_method()))) goto error; #endif /* defined(HAVE_TLS_METHOD) */ + +#ifdef HAVE_SSL_CTX_SET_SECURITY_LEVEL + /* Level 1 re-enables RSA1024 and DH1024 for compatibility with old tors */ + SSL_CTX_set_security_level(result->ctx, 1); +#endif + SSL_CTX_set_options(result->ctx, SSL_OP_NO_SSLv2); SSL_CTX_set_options(result->ctx, SSL_OP_NO_SSLv3); @@ -1042,7 +1048,7 @@ tor_tls_new(tor_socket_t sock, int isServer) goto err; } result->socket = sock; - bio = BIO_new_socket(sock, 0); + bio = BIO_new_socket(sock, BIO_NOCLOSE); if (! bio) { tls_log_errors(NULL, LOG_WARN, LD_NET, "opening BIO"); #ifdef SSL_set_tlsext_host_name |