1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-19 18:20:40 +03:00
Commit Graph

1158 Commits

Author SHA1 Message Date
Evengard
2cfe031398 Fixing most errors, the link on Windows is working and is stable 2020-05-12 18:10:06 +03:00
Evengard
a2a6502ab9 Numerous fixes. First working version. 2020-05-12 18:05:19 +03:00
Evengard
f2fee4d32c Preliminary implementation of IPv6CP and IPv6 for PPP (untested) 2020-05-12 18:05:18 +03:00
Evengard
f627b64264 Auto formatting with AStyle 2020-05-12 17:59:25 +03:00
Evengard
1d6a4d3ec8 Preliminary IPC IPv6 implementation (untested) 2020-05-12 17:59:24 +03:00
Ben RUBSON
3b7dd25b65
Log client IP in failed accesses 2020-05-11 23:10:40 +02:00
Ben RUBSON
3f16a7e704
Log client IP in failed accesses
to be able to feed tools such as Fail2Ban
2020-05-11 23:09:26 +02:00
Ben RUBSON
4e583e43f1
Increase Radius timeout
to make it 2FA friendly
2020-05-11 23:06:01 +02:00
Davide Beatrici
981b57ee28 Cedar/Server: set ports in Proto, remove OpenVPN UDP server leftovers
The setting's name is still "OpenVPN_UdpPortList".

We will change it as soon as there's another UDP protocol implemented in Proto.
2020-05-11 08:23:32 +02:00
Davide Beatrici
27f7d43ff7 Cedar/Proto_OpenVPN: remove UDP system, use the one provided by Proto
As a side effect, the DH parameter is now applied to the TCP server as well.

Previously, the default value was always used, ignoring the one from the configuration.
2020-05-11 08:23:29 +02:00
Davide Beatrici
a3aea00820 Cedar/Proto: implement UDP system
When a datagram is received, the matching session is looked up in a hash list; if it's not found, a new session is created.

This method allows to use a single UDP port for multiple protocols, as we do with TCP.

Also, each session has its own dedicated thread, used to process the received datagrams and generate the ones that are then sent through the UDP listener.

In addition to guaranteeing constant performance, separate threads also prevent a single one from blocking all sessions.
2020-05-11 08:22:44 +02:00
Davide Beatrici
0570f7d31c Mayaqua/Network: add StopUdpListener()
This allows to stop a UDP listener without deleting it.

It's especially useful when no datagrams should be received anymore, but there are other threads accessing the listener.
2020-05-11 07:50:55 +02:00
Davide Beatrici
667108319d Cedar: prepare Proto for UDP support
- An additional parameter is added to IsPacketForMe(), used to specify the protocol type (currently either TCP or UDP).
- SupportedModes() is dropped because it's now redundant.
- IsOk() and EstablishedSessions() are dropped because error checking should be handled by the implementation.
- ProtoImplDetect() now takes a buffer and its size rather than a SOCK, so that it can be used to detect UDP protocols.
- The OpenVPN toggle check is moved to ProtoImplDetect(), so that we don't have to duplicate it once UDP support is implemented.
2020-05-11 07:07:04 +02:00
Evengard
34dfc14549 Fixing errors discovered with Coverity. 2020-05-04 16:07:21 +03:00
Evengard
1fe863e866 Generate DHCP Client ID based on MAC all the time 2020-05-04 15:40:44 +03:00
Ilya Shipitsin
b41c17f45a
Merge pull request #1109 from Evengard/ppp-eap-tls
Implementation of EAP-TLS for PPP
2020-05-04 17:13:15 +05:00
Evengard
ca1c6a5f3f Fixing a use of unitialized variable as per CPPCHECK 2020-05-03 14:22:18 +03:00
Evengard
8fb456f6a6 Fixing a memory leak in SslCertVerifyCallback because of a duplicated callback 2020-05-03 05:36:01 +03:00
Evengard
132926ee09 Fixing alignment of struct on GCC, changing the method to server one 2020-05-03 05:17:23 +03:00
Evengard
8a856e4672 Codestyle fixes 2020-05-02 21:08:19 +03:00
Evengard
9180e065a0 Some weirdness fixes 2020-05-02 20:29:31 +03:00
Evengard
39becfe4ab Some hacks to make Android VPN Client Pro working 2020-05-02 20:25:01 +03:00
Evengard
723f38e72f Fixing Linux... 2020-05-02 19:52:47 +03:00
Evengard
a2b7cb0148 Added possibility to load CA certificates from chain_certs folder to allow verifying the client certificates against it. 2020-05-02 19:52:46 +03:00
Evengard
24bd2b3198 Fixing up some errors 2020-05-02 19:52:46 +03:00
Evengard
9f2a5cecf3 Preliminary (untested) EAP-TLS implementation 2020-05-02 19:52:46 +03:00
Evengard
a65c436e8f Writing skeleton for EAP-TLS implementation 2020-05-02 19:52:45 +03:00
Evengard
aa0ec4343c Fixing errors as per static analysis 2020-05-02 19:52:45 +03:00
Evengard
1bdd9a92bc Adding timeout propagation from user policy in PPP sessions (including L2TP and SSTP). 2020-05-02 19:52:45 +03:00
Davide Beatrici
942051d3a8 Cedar: various improvements to Proto
The PROTO structure is now used to identify the system as a whole, rather than a single protocol. It's stored and initialized in Server.

ProtoCompare(), ProtoAdd() and ProtoDetected() are renamed to make the difference between PROTO and PROTO_IMPL more clear.

ProtoGet() and ProtoNum() are removed because the related list can now be accessed directly by Server.
2020-05-01 07:14:38 +02:00
Ilya Shipitsin
039cd8edf0
Merge pull request #1107 from chipitsine/master
5.01.9674 release
2020-04-30 13:26:45 +05:00
Ilya Shipitsin
a902d3eed9 5.01.9674 release 2020-04-30 12:02:05 +05:00
dependabot[bot]
44f731f781
Bump jquery in /src/bin/hamcore/wwwroot/admin/default
Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](https://github.com/jquery/jquery/compare/3.4.1...3.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-04-30 06:12:25 +00:00
Evengard
f20e99f8e4 Treating empty IPCP requests as IPCP requests with IP-Address option zeroed out 2020-04-25 20:59:08 +03:00
Evengard
b9109211d3 ACKing an empty LCP options list 2020-04-25 15:29:57 +03:00
Davide Beatrici
9073452b09
Merge PR #1092: src/Cedar/Proto_OpenVPN.c: push "block-outside-dns" to clients 2020-04-20 03:25:43 +02:00
Ilya Shipitsin
70a7c4596d 5.01.9673 release 2020-04-18 00:47:47 +05:00
Daiyuu Nobori
033647c8ac Fix security issue: Fix the security of JSON-API. If the administrator password of the Virtual Hub is empty, JSON-API (which was added in 4.30 Build 9696 Beta) will not be able to access to the virtual hub with a empty password since this release. Because there are relatively many cases in which administrator password is empty for a virtual hub, being able to manage a virtual hub without a password using JSON-API was a security problem. In this release, this behavior has been changed so that JSON-API cannot be accessed in the Virtual Hub management mode until it is configured with non-empty password. 2020-04-06 00:44:14 +09:00
Davide Beatrici
b6ef9f88c9 src/Cedar/Proto_OpenVPN.c: push "block-outside-dns" to clients
From https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage:

--block-outside-dns

Block DNS servers on other network adapters to prevent DNS leaks.
This option prevents any application from accessing TCP or UDP port 53 except one inside the tunnel.
It uses Windows Filtering Platform (WFP) and works on Windows Vista or later.
This option is considered unknown on non-Windows platforms and unsupported on Windows XP, resulting in fatal error.
You may want to use --setenv opt or --ignore-unknown-option (not suitable for Windows XP) to ignore said error.
Note that pushing unknown options from server does not trigger fatal errors.
2020-04-04 08:37:19 +02:00
Ilya Shipitsin
c6f186bd73
Merge pull request #1084 from ffontaine/master
Only enable getifaddrs support when available
2020-04-03 17:45:19 +05:00
Ilya Shipitsin
84bd9abb30
Merge pull request #1072 from Evengard/ppp-ipv6
Rewriting the PPP stack
2020-04-02 20:29:51 +05:00
Georgy Komarov
4772a508dc
sam: fix using pointer to local variable that is out of scope 2020-03-27 07:28:43 +03:00
Georgy Komarov
1416a693e7
protocol: fix uninitialized variable
Value of server_cert is undefined if `b = PackGetBuf(p, "Cert");` was
failed.
2020-03-27 07:25:45 +03:00
Paul Menzel
be3e45a4bf hamcore: Remove trailing spaces from comments 2020-03-25 12:23:55 +01:00
Fabrice Fontaine
dcecd4c0d5 Only enable getifaddrs support when available
On uClibc, the ifaddrs.h support is optional. While the default
Buildroot uClibc configuration has it enabled, some external
toolchains may not. Therefore this patch detects that and adjusts
softether usage of ifaddrs accordingly.

Based on an initial patch from Bernd Kuhls.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/softether/0009-uclibc-ai-addrconfig.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-03-21 17:57:37 +01:00
Ilya Shipitsin
3b00d4c56b
Merge pull request #1081 from metalefty/describe_cmake_flags
Describe CMake options added by myself
2020-03-20 18:43:16 +05:00
Koichiro IWAO
e6b8e6eee3
replace SoftEther project related http links with https
Outside links such as http://www.openssl.org and http links appear in
source code are untouched.
2020-03-20 21:27:51 +09:00
Koichiro IWAO
78b0684dd4
Document additional CMake options
Some CMake options are added by myself (#1047 #1079). So I should
describe in document.
2020-03-20 21:24:51 +09:00
Koichiro IWAO
c222ef525b
Update build requirements on Unix 2020-03-18 18:28:33 +09:00
Ilya Shipitsin
c3d56c2201
Merge pull request #1079 from metalefty/skip_cpu_features
allow to SKIP_CPU_FEATURES explicitly, not only autodetect
2020-03-18 11:59:02 +05:00
Koichiro IWAO
f34d3c80b1
allow to SKIP_CPU_FEATURES explicitly, not only autodetect
Formerly, SKIP_CPU_FEATURES is automatically detected by system
processor. However, "^(armv7l|aarch64|s390x)$" does not cover all
processors that cpu_features should be skipped.

"armv6", "armv7", "mips", "mips64" on FreeBSD are examples [1]
that cpu_features is not correctly skipped.

This change intends to build SoftEther without any modifications on
CMakeLists.txt on such processors.

    cmake . -DSKIP_CPU_FEATURES=1

[1] https://www.freebsd.org/platforms/
2020-03-16 18:50:55 +09:00
dependabot[bot]
c635cdd614
Bump acorn from 6.1.1 to 6.4.1 in /src/bin/hamcore/wwwroot/admin/default
Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.1 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.1.1...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-15 22:06:23 +00:00
Evengard
fa9e9d15a5 Removing unrelated changes as per review 2020-02-06 10:52:34 +03:00
Evengard
60e85afd1f
Apply reviewed code style
Co-Authored-By: Davide Beatrici <davidebeatrici@gmail.com>
2020-02-06 10:49:09 +03:00
Evengard
a6970e3e61 Merge branch 'master' into ppp-ipv6 2020-02-05 00:23:03 +03:00
Ilya Shipitsin
eeec9a82f6
Merge pull request #1062 from dnobori/200101_impr_url_log_spacing
Merge pull request #1062: Improvement: Add a space character between URL and other tokens in the packet log format.
2020-01-01 17:53:27 +05:00
Daiyuu Nobori
a49219db83 Merge branch 'master' of github.com:SoftEtherVPN/SoftEtherVPN into 200101_fix_securenat_ecn 2020-01-01 19:59:42 +09:00
Daiyuu Nobori
a4f87565ae Bugfix: Fix the SecureNAT connection problem with ignoring TCP ECN bit enabled packets 2020-01-01 17:51:38 +09:00
Ilya Shipitsin
9487bc8d47
Merge pull request #1060 from dnobori/200101_fix_imperfect_lock
Merge pull request #1060: src/Cedar/Hub.c: fix possible crash because of imperfect Virtual Hub FDB lock
2020-01-01 12:33:15 +05:00
Daiyuu Nobori
70564a8f52 Bugfix: Imperfect Virtual Hub FDB lock may cause process crush. 2020-01-01 15:52:47 +09:00
Daiyuu Nobori
17e7d65839 Improvement: Add a space character between URL and other tokens in the packet log format. 2020-01-01 11:00:51 +09:00
Daiyuu Nobori
e5d691977d Bugfix: OpenVPN Certificate Authentication may cause process crush. 2020-01-01 10:59:24 +09:00
Daiyuu Nobori
f083c59905 Bugfix: Imperfect Virtual Hub FDB lock may cause process crush. 2020-01-01 10:57:51 +09:00
FelipeL
6d3fef8da6 pt-br translation 2019-12-28 15:43:06 +05:00
Koichiro IWAO
c8479e3011
CMake: make db, log, pid directory customizable 2019-12-04 23:59:18 +09:00
Koichiro IWAO
b1aae5080d
put chain_certs in dbdir 2019-12-04 23:59:13 +09:00
Koichiro IWAO
a69c4980d5
log eraser, log enumerator should refer logdir 2019-12-04 23:59:11 +09:00
Koichiro IWAO
c64674479d
separte log directory and database(config) directory
@ was an alias for exedir. To separate log directory and
database(config) directory, @ is now an alias for logdir and $ is an
alias for dbdir.
2019-12-04 23:59:09 +09:00
Koichiro IWAO
01abdedc45
put PID files under PidDir 2019-12-04 23:59:07 +09:00
Koichiro IWAO
18c9b74ff0
implement Get{Db,Log,Pid}{,W} function
DbDir  : directory to store files such as vpn_server.config and backups etc
LogDir : directory to write logs (sub directories is created in this dir)
PidDir : directory to put PID files such as .ctl-* .pid-* .VPN-*
2019-12-04 23:59:01 +09:00
Ilya Shipitsin
3b6c4d02ac 5.01.9672 release 2019-11-24 20:47:23 +05:00
dnobori
1d2a58b172 Cedar: handle UDP acceleration and R-UDP versions 2019-11-23 04:38:27 +01:00
Davide Beatrici
6b08a451da Mayaqua: implement R-UDP version 2, powered by ChaCha20-Poly1305 2019-11-23 04:38:20 +01:00
Davide Beatrici
2ea5c2a7b0 Cedar: implement UDP acceleration version 2, powered by ChaCha20-Poly1305 2019-11-23 04:23:56 +01:00
dnobori
82a81a3ce6 Cedar: serve new web management interface 2019-11-23 04:23:56 +01:00
dnobori
9aaa9a7f15 Cedar: implement detailed protocol info 2019-11-23 04:23:56 +01:00
dnobori
ab57ef3f54 Mayaqua: add Windows Server 2019 to the supported operating systems list 2019-11-23 04:23:56 +01:00
dnobori
76ae935172 Cedar: various fixes 2019-11-23 04:23:51 +01:00
Daiyuu Nobori
76c330e74b Cedar: add "DisableIPsecAggressiveMode" option
Setting it to "true" mitigates CVE-2002-1623.
2019-11-18 06:16:49 +01:00
Davide Beatrici
4acd7ab98e
Merge PR #1022: Move generic proxy stuff from Cedar to Mayaqua 2019-11-01 09:35:18 +01:00
Donald Buczek
12cbf34302 Make install dir for unit files configurable
Currently the systemd service unit files are installed
into /lib/systemd/system if that directory exists. This
might not be optimal for every user, e.g. when the build
system is not the target system or when building as an
unprivileged user using CMAKE_INSTALL_PREFIX.

Make this configurable by adding a cached cmake variable
CMAKE_INSTALL_SYSTEMD_UNITDIR. Usage:

- install unit files into /lib/systemd/system if it exists (old
behavior)

    cmake

- don't install unit files

   cmake -D CMAKE_INSTALL_SYSTEMD_UNITDIR=

- install into absolute path

   cmake -D CMAKE_INSTALL_SYSTEMD_UNITDIR=/path

- install into path relative to ${CMAKE_INSTALL_PREFIX}

   cmake -D CMAKE_INSTALL_SYSTEMD_UNITDIR=path
2019-10-30 11:33:08 +01:00
Davide Beatrici
63caa4b07f Protocol.c: adapt ClientConnectGetSocket() for new proxy functions
The function has been greatly improved, here are some of the changes:

- The required SESSION (c->Session) parameter is checked correctly: the function returns immediately in case it's NULL. Previously, the function didn't return in case the parameter was NULL; multiple checks were in place, but not in all instances where the parameter was dereferenced.
- The resolved IP address is cached with all proxy types.
- The "RestoreServerNameAndPort" variable is documented.
- The Debug() messages have been improved.
2019-10-30 01:39:11 +01:00
Davide Beatrici
3c21d982fc Wpc.c: adapt WpcSockConnectEx() for new proxy functions 2019-10-30 01:39:11 +01:00
Davide Beatrici
59dc26aa21 Protocol: add ProxyCodeToCedar()
This new function translates a proxy error code to a Cedar error code.
2019-10-30 01:39:11 +01:00
Davide Beatrici
b8f58a2f94 Move generic proxy stuff from Cedar to Mayaqua
This commit moves the generic (not related to our protocol) proxy stuff from Cedar to Mayaqua, in dedicated files.

The functions are refactored so that they all have the same arguments and follow the same logic.

Dedicated error codes are added, in order to indicate clearly why the function(s) failed.
2019-10-30 01:39:04 +01:00
Davide Beatrici
5d73cd878f Proto_OpenVPN.c: improve OvsProcessData(), fix out-of-bounds access found by Coverity
Coverity Scan detected an out-of-bounds access issue: OvsProcessData() checked whether the payload size was bigger than the size of the buffer, instead of checking whether the entire packet size (payload size + 2 bytes) was, resulting in an out-of-bounds access in case the payload size is bigger than 1998.

This commit also improves the variable names, the comments and adds two Debug() lines.
2019-10-27 09:01:56 +01:00
Davide Beatrici
16bde47763 Proto_OpenVPN.c: fix segmentation fault in OvsProceccRecvPacket()
OvsDecrypt() returns 0 when it fails, resulting in "size" rolling over with an end result of 4294967292.

This commit fixes the issue by checking whether "size" is greater than sizeof(UINT) before performing the subtraction.
2019-10-26 00:36:07 +02:00
Daiyuu Nobori
4d42f450b2 Addressing the UDP reflection amplification attack: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1001 2019-10-22 11:14:05 +09:00
Davide Beatrici
51330fdb43 Mayaqua.h: include <stdarg.h> for "va_list" on Illumos 2019-10-21 21:44:38 +02:00
Davide Beatrici
12cc242529 Protocol.c: fix bug in ClientConnectGetSocket() causing custom HTTP header not to work
The bug was caused by a typo in the StrCpy() call: the source buffer was the same as the destination one, meaning that the function didn't do anything.
2019-10-21 20:26:56 +02:00
Davide Beatrici
2f90e9ecb8 Mayaqua: move HTTP functions from "Network" to "HTTP" 2019-10-20 04:15:12 +02:00
Davide Beatrici
c3d6ffc533 Move GetMimeTypeFromFileName() and related structure to Mayaqua
The structure (containing all mimetypes) occupies almost 700 lines, which are a lot.

This is just the beginning of the refactor plan.
2019-10-20 04:15:12 +02:00
Davide Beatrici
04ecbf843a Mayaqua.h: include <stdio.h> for "FILE" 2019-10-20 04:15:12 +02:00
Davide Beatrici
6b41b19327 Mayaqua.h: include <stddef.h>, for "wchar_t" 2019-10-20 04:15:12 +02:00
dependabot[bot]
5fed2b8903
Bump mixin-deep in /src/bin/hamcore/wwwroot/admin/default
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-19 22:39:12 +00:00
Davide Beatrici
2aeec323f9
Merge PR #1008: Adding RADIUS and L3 MAC address fixing function, with small bug-fixes 2019-10-19 19:37:21 +02:00
Daiyuu Nobori
f0357d4000 - Fixed the problem occurs when RPC messages between Cluster Members exceed 64Kbytes.
- Fixed the RADIUS PEAP client to use the standard TLS versioning.
- Implementation of a function to fix the MAC address of L3 VPN protocol by entering e.g. "MAC: 112233445566" in the "Notes" field of the user information.
- Implementation of a function to fix the virtual MAC address to be assigned to the L3 VPN client as a string attribute from RADIUS server when authentication.
2019-10-19 17:34:12 +09:00
Daiyuu Nobori
7413fec646 Updating built-in Win32 libraries
- OpenSSL 1.1.1 -> 1.1.1d
- zlib 1.2.3 -> 1.2.11
2019-10-19 16:59:13 +09:00
Davide Beatrici
c8a0a5648b
Merge PR #970: Fix buffer overflow during NETBIOS name resolution 2019-09-30 06:59:04 +02:00
Ilya Shipitsin
e03db7ee60
Merge pull request #966 from Flucons/patch-1
Merge pull request #966: Create strtable_pt_br.stb
2019-09-21 17:33:12 +00:00
Ilya Shipitsin
93183f7b3f
Merge pull request #967 from Flucons/patch-2
Merge pull request #967 : Update SEVPN.sln
2019-09-21 17:32:03 +00:00
柊 ゆり子
50960dbe16
Update strtable_cn.stb
Improve some translation.
2019-09-17 17:51:03 +08:00
Koichiro IWAO
21e3ce104b Avoid using hardcoded paths in log file enumeration
Hardcoded paths are used in log file enumeration such as LogFileList
command or GenerateEraseFileList function to delete old log files when
disk free space is lacking.

Fixes: SoftEtherVPN/SoftEtherVPN#972
2019-09-13 10:38:09 +09:00
stffabi
850a5faa0d Fix buffer overflow during NETBIOS name resolution
If SecureNAT is enabled and the hostname of the server
is longer than 16characters, every NETBIOS name resolution
query triggers the buffer overflow. If the server was built
with stack protection, the process will be killed.
2019-09-04 14:32:19 +02:00
FelipeL
1144d6c430
Update SEVPN.sln
Add pt-br
2019-08-15 13:03:14 -03:00
FelipeL
926b99047a
Create strtable_pt_br.stb
Start pt-br translation
2019-08-15 00:46:58 -03:00
Davide Beatrici
d10f83417f
Merge PR #962: Fix several compile warnings on MS VC++ 2008. 2019-08-04 04:03:14 +02:00
Davide Beatrici
82b84a9436
Merge PR #961: Enable crash minidump for Win32 vpntest 2019-08-04 03:51:00 +02:00
Daiyuu Nobori
bf4667cfce Fix several compile warnings on MS VC++ 2008. 2019-08-04 10:35:16 +09:00
Daiyuu Nobori
c6068d23c7 Enables crash minidump for Win32 vpntest. Minidump files will be saved to the 'C:\Users\<username>\AppData\Local\Temp\vpn_debug' (for normal user) or 'src\bin\vpn_debug\' (for administrator user). 2019-08-04 10:26:41 +09:00
Davide Beatrici
9f19efb7af OpenVPN: use new protocol interface 2019-07-26 08:37:00 +02:00
Davide Beatrici
7d58e6bf60 Add interface for easy protocol implementation
This commit adds a protocol interface to the server, its purpose is to manage TCP connections and the various third-party protocols.

More specifically, ProtoHandleConnection() takes care of exchanging the packets between the local and remote endpoint; the protocol implementation only has to parse them and act accordingly.

The interface knows which protocol is the connection for by calling IsPacketForMe(), a function implemented for each protocol.
2019-07-26 08:36:54 +02:00
Rosen Penev
d57fc3524c
Fix LibreSSL support
My previous patch used a wrong if directive, which disabled removed
(de)initialization and threading for LibreSSL. This most likely causes
issues at runtime.
2019-07-22 11:35:19 -07:00
Rosen Penev
a9f707c813
Switch to OpenSSL THREADID API
The old threading API was deprecated in OpenSSL 1.0.
2019-07-22 11:28:12 -07:00
Davide Beatrici
d6cf1b85a9 Virtual: fix race condition in DHCP server which resulted in multiple clients receiving the same IP
A race condition in the DHCP server caused it to offer the same IP address to multiple clients when they connected at the same time, because an offered IP address was considered free until the final step (DHCP_ACK).

This commit introduces a list to keep track of the pending leases created during DHCP_OFFER, so that an IP address is guaranteed to be offered to a single client.
2019-07-13 23:29:16 +02:00
Rosen Penev
1bd39485cf
Mayaqua: Fix compilation without deprecated OpenSSL APIs
Initialization and deinitialization are deprecated.

Missing headers were added.

Explicit threading is also deprecated.
2019-07-11 12:42:26 -07:00
Rosen Penev
a4ed656001
Mayaqua: Replace GNU specific sys/poll.h header with POSIX poll.h
Fixes warning from the musl libc:

warning redirecting incorrect #include <sys/poll.h> to <poll.h>
2019-07-10 17:01:01 -07:00
Ilya Shipitsin
13dbf83e95 release 5.01.9671 2019-07-10 12:45:14 +05:00
Daiyuu Nobori
a9f31d7df9 Fixing the typo "descrption" of the JSON-RPC document. Thanks to https://github.com/SoftEtherVPN/SoftEtherVPN/issues/938 2019-07-10 14:37:30 +09:00
Ilya Shipitsin
47ad2328c0 src/Cedar/Admin.c: remove redundant check
found by Coverity

*** CID 341551:  Incorrect expression  (NO_EFFECT)
/src/Cedar/Admin.c: 414 in AdminWebHandleFileRequest()
408     // Handle the file request
409     bool AdminWebHandleFileRequest(ADMIN *a, CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_src, char *query_string, char *virtual_root_dir, char *physical_root_dir)
410     {
411             bool ret = false;
412             char url[MAX_PATH];
413             UINT i, len;
>>>     CID 341551:  Incorrect expression  (NO_EFFECT)
>>>     Comparing an array to null is not useful: "url == NULL", since the test will always evaluate as true.
414             if (a == NULL || c == NULL || s == NULL || h == NULL || url == NULL || query_string == NULL ||
415                     virtual_root_dir == NULL || physical_root_dir == NULL)
416             {
417                     return false;
418             }
419
2019-07-06 10:22:44 +05:00
Daiyuu Nobori
2592525b64
Merge pull request #931 from dnobori/190630_update_see_ndis5_driver
Update the driver binary for https://github.com/SoftEtherVPN/SoftEtherVPN/pull/929
2019-06-30 02:24:32 +09:00
Daiyuu Nobori
896ac8e285
Merge pull request #930 from dnobori/190630_kb3033929_message
Add the warning message if KB3033929 is not installed in Windows 7 / Server 2008 R2.
2019-06-30 02:24:24 +09:00
Daiyuu Nobori
6e78068a65 Update the driver binary for https://github.com/SoftEtherVPN/SoftEtherVPN/pull/929 2019-06-30 01:22:04 +09:00
Daiyuu Nobori
9c227f3480 Add the warning message if KB3033929 is not installed in Windows 7 / Server 2008 R2. 2019-06-30 01:20:52 +09:00
Daiyuu Nobori
9c6c88a1a8
Merge pull request #927 from dnobori/190629_fix_url
Fix incorrect URLs in text files
2019-06-30 01:17:38 +09:00
Davide Beatrici
919f6c825f
Merge PR #929: Added ProbeForWrite() buffer writable check routine for Irp->UserBuffer in the NDIX 5.x See driver. 2019-06-29 17:02:57 +02:00
Daiyuu Nobori
7ef7c36c83 OpenVPN X.509 certificate authentication will be used only when no username / password is specified 2019-06-29 21:30:58 +09:00
Daiyuu Nobori
9cba49b89a Fix incorrect URLs in text files 2019-06-29 21:16:27 +09:00
Daiyuu Nobori
afc6a706e5 Adding wwwroot/admin/README.md 2019-05-29 20:17:43 +09:00
Daiyuu Nobori
b1d2dd8d87 Updating README 2019-05-29 19:37:29 +09:00
Daiyuu Nobori
39b80e04c5 Add initial wwwroot/admin/default/ HTML5 admin pages 2019-05-29 19:17:50 +09:00
Daiyuu Nobori
529d8f593c Update developer tools for JSON-RPC 2019-05-29 18:23:33 +09:00
Daiyuu Nobori
458906b151 Added JSON-RPC error message 2019-05-28 22:48:26 +09:00
Daiyuu Nobori
98b08c2ad1 Implementation of the JSON-RPC API and the Web Admin interface. (dnobori's internal note: 7579 - 7682) 2019-05-28 12:51:51 +09:00
Daiyuu Nobori
03841e4181 Initial vpnserver-jsonrpc-clients 2019-05-28 11:48:16 +09:00
Daiyuu Nobori
18cfe18950 Added ProbeForWrite() buffer writable check routine for Irp->UserBuffer in the See driver. The See driver is a legacy driver for packet capturing with NDIS 5.x (Windows 2000 or XP). It is based on the source code of WinPcap. 2019-05-28 10:36:31 +09:00
Ilya Shipitsin
854814475c release 5.01.9670 2019-04-07 19:11:27 +00:00
MatAtBread
6dbcda6026 Set unbuffered mode for *nix systems stdout, allowing interactive use within spawned processes. Fixes issue #898 2019-04-07 19:13:18 +01:00
Daiyuu Nobori
98443715d9 Fixed the vulnerability that a malformed packet will cause the buffer overflow at the receive path. This vulnerability may occur abnormal process exit with the buffer security check mechanism built-in with SoftEther VPN binary. Although this buffer overflow can theoretically bypass the security check in theory, in the actual binary it is detected by the buffer security check inserted by the C compiler and the process is forcibly terminated. Therefore, as a result, it can be abused by a DoS attacker. Acknowledgments: The last problems is discovered and reported by Fabrizio Steiner. 2019-02-28 20:40:23 +09:00
vvd
372e8aa031 Fixed memory leak in OpenSSL deinitialization function 2019-02-27 21:41:20 +01:00
Rosen Penev
26261236ba
Fix compilation without OpenSSL ENGINE 2019-02-25 14:24:31 -08:00
Nick
23b8161ac2
Fixed wrong function name in Debug message 2019-02-15 20:41:16 -05:00
Davide Beatrici
c1243c5198
Merge PR #873: ver.rc: fix misspelling 2019-02-14 08:51:19 +01:00
parly
962356af9c Fix misspelling 2019-02-14 16:07:35 +09:00
parly
5a7e4693fc Fix GetCedarVersionNumber() 2019-02-14 16:04:16 +09:00
Ilya Shipitsin
d790223700 release 5.01.9669 2019-02-03 19:43:50 +00:00
Ilya Shipitsin
45c13c5409 disable cpu features on arm64, amrhf, s390x
tested on launchpad
2019-02-03 18:05:34 +05:00
Ilya Shipitsin
c253c55a8c
Merge pull request #862 from davidebeatrici/mayaqua-getcipherlist-double-free-fix
Merge PR #862: Fix crashes in GetCipherList() and StGetServerCipherList()
2019-01-29 19:31:57 +05:00
Ilya Shipitsin
ce6e49a3f9 release 5.01.9668 2019-01-27 07:49:56 +00:00
Davide Beatrici
8657955c92 Merge PR #867: Improve translations for inf file. 2019-01-24 01:42:25 +01:00
Davide Beatrici
a97b87da68 Cedar/Admin.c: fix segmentation fault caused by non-initialized string in StGetServerCipherList()
StrCat() appends a string to an already existing string. In order to know where the existing string ends, it uses StrLen() which in turn uses strlen(), a function considered unsafe because it doesn't stop until it finds the null character.

Since the string was allocated but not initialized, StrCat() was either:

- Working correctly.
- Copying only a part of the string.
- Making the program crash via strlen().

The fix consists in using StrCpy(), which starts writing at the beginning of the string.
2019-01-21 04:15:55 +01:00
Davide Beatrici
09ee19e72b Mayaqua/Network.c: fix double free crash in GetCipherList()
SSL_free() also frees the associated context.

d6c3c1896c/ssl/ssl_lib.c (L1209)

From https://www.openssl.org/docs/man1.1.1/man3/SSL_free.html:

"SSL_free() also calls the free()ing procedures for indirectly affected items, if applicable: the buffering BIO, the read and write BIOs, cipher lists specially created for this ssl, the SSL_SESSION. Do not explicitly free these indirectly freed up items before or after calling SSL_free(), as trying to free things twice may lead to program failure."
2019-01-21 04:14:47 +01:00
Umi
e939f887c4 Update vpninstall_cn.inf 2019-01-21 03:59:31 +01:00
Daiyuu Nobori
63c01ba736
Merge pull request #832 from dnobori/181202_switch_to_apache_license
Switching license from GPLv2 to Apache License 2.0.
2019-01-21 09:36:19 +09:00
Umi
bf493e359b
Update vpninstall_cn.inf 2019-01-19 16:56:15 +08:00
Daiyuu Nobori
881f34ac56 Compacting headers, updating trivial texts to fit to the license change from GPLv2 to Apache License 2.0. 2019-01-14 12:25:53 +09:00
Ilya Shipitsin
3bb0e20add src/Mayaqua/FileIO: remove unused function
found by cppcheck

[src/Mayaqua/FileIO.c:2082]: (style) The function 'FileRename' is never used.
2019-01-06 23:44:23 +05:00
Ilya Shipitsin
7f8e5b00dc src/Cedar/UT: remove unused function
found by cppcheck

[src/Cedar/Proto_SSTP.c:126]: (style) The function 'SetNoSstp' is never used.
2019-01-06 23:39:43 +05:00
Ilya Shipitsin
057984b87c src/Cedar/Proto_SSTP: remove unused function
found by cppcheck

[src/Cedar/Proto_SSTP.c:126]: (style) The function 'SetNoSstp' is never used.
2019-01-06 23:34:10 +05:00
Ilya Shipitsin
dcf5c57fc2 src/Cedar/Proto_IPsec" remove unused function
found by cppcheck

[src/Cedar/Proto_IPsec.c:120]: (style) The function 'IPSecSetDisable' is never used.
2019-01-06 23:31:29 +05:00
Ilya Shipitsin
162a181b04 src/Cedar/Protocol: remove unused function
found by cppcheck

[src/Cedar/Protocol.c:6643]: (style) The function 'ProxyConnectEx' is never used.
2019-01-06 23:22:08 +05:00
Ilya Shipitsin
8534f2843e src/Cedar/DDNS: remove unused function, variables
found by cppcheck

[src/Cedar/DDNS.c:656]: (style) Condition 'ret==NULL' is always true
[src/Cedar/DDNS.c:515] -> [src/Cedar/DDNS.c:640]: (style) The expression 'use_https == false' is always true because 'use_https' and 'false' represent the same value.
[src/Cedar/DDNS.c:516] -> [src/Cedar/DDNS.c:648]: (style) The expression 'no_cert_verify == false' is always true because 'no_cert_verify' and 'false' represent the same value.
[src/Cedar/DDNS.c:816] -> [src/Cedar/DDNS.c:860]: (style) The expression 'no_cert_verify == false' is always true because 'no_cert_verify' and 'false' represent the same value.
[src/Cedar/DDNS.c:530]: (style) Variable 'use_vgs' is assigned a value that is never used.
[src/Cedar/DDNS.c:497]: (style) The function 'DCUpdateNow' is never used.
2019-01-06 23:18:25 +05:00
Ilya Shipitsin
72bd221bb4 src/Cedar/Account: remove unused functions
found by cppcheck

[src/Cedar/Account.c:523]: (style) The function 'GetUserPolicy' is never used.
[src/Cedar/Account.c:163]: (style) The function 'NormalizePolicyName' is never used.
2019-01-06 18:53:18 +05:00
Ilya Shipitsin
266f013880 src/Cedar/Command: remove redundant assignment
found by cppcheck

[src/Cedar/Command.c:23220] -> [src/Cedar/Command.c:23232]: (style) Variable 'len' is reassigned a value before the old one has been used.
2019-01-06 18:49:56 +05:00
Ilya Shipitsin
9d4d111555 src/Cedar/CM: remove unused function, variables
found by cppcheck

[src/Cedar/CM.c:4509]: (style) Variable 'easy' is assigned a value that is never used.
[src/Cedar/CM.c:4547]: (style) Variable 'hub_name' is assigned a value that is never used.
[src/Cedar/CM.c:4609]: (style) Variable 'is_account' is assigned a value that is never used.
[src/Cedar/CM.c:8545]: (style) The function 'CmLoadK' is never used.
2019-01-06 18:43:51 +05:00
Ilya Shipitsin
4760b3d0c3 src/Cedar/AzureClient: remove unused function
found by cppcheck

[src/Cedar/AzureClient.c:526]: (style) The function 'AcGetEnable' is never used.
2019-01-06 18:34:04 +05:00
Davide Beatrici
d62421adcb Cedar: retrieve the list of available encryption algorithms from the server 2019-01-01 20:31:13 +01:00
Davide Beatrici
2a572aab21 Mayaqua: fix segmentation fault, add new FreeHttpHeaderSafe() function 2018-12-30 14:46:26 +01:00
Davide Beatrici
619a533b8f
Merge PR #843: Mayaqua: query OpenSSL for the list of available ciphers instead of relying on a static list 2018-12-28 20:24:13 +01:00
Kero Yang
5ea5dd34b6
Update strtable_cn.stb
fixed a typo ("取消l" => "取消")
2018-12-25 04:05:37 +08:00
Davide Beatrici
eee494f046
Merge PR #847: Mayaqua: add "PTR_TO_PTR" macro intended to be used with FreeSafe() 2018-12-23 11:36:40 +01:00
Davide Beatrici
e51c319648 Mayaqua: add "PTR_TO_PTR" macro intended to be used with FreeSafe() 2018-12-22 07:38:38 +01:00
Davide Beatrici
ef77e95f87 Cedar/IPC.c: fix memory leak occurring when both the username and common name are not present (OpenVPN) 2018-12-21 21:24:22 +01:00
Ilya Shipitsin
0cf6fac7a3 5.01.9667
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-12-21 11:18:18 +00:00
Davide Beatrici
7f9d47b3aa Mayaqua: query OpenSSL for the list of available ciphers instead of relying on a static list 2018-12-21 09:54:51 +01:00
Davide Beatrici
ac5e68b3ed hamcore: fix port number shown in the server management info string of vpncmd 2018-12-21 07:27:57 +01:00
Davide Beatrici
bd01cbff9a Mayaqua: add new FreeSafe() function which calls Free() and set the pointer's value to NULL 2018-12-20 02:52:22 +01:00
Davide Beatrici
ada06e218e Mayaqua: revamp RecvHttpHeader() so that cleanup functions are not called twice 2018-12-19 20:00:18 +01:00
Davide Beatrici
6c44cecc64 Cedar: Bind the special listeners to the specified IP address 2018-12-15 21:33:37 +01:00
Daiyuu Nobori
9c0eee0aad Merge branch 'master' of github.com:SoftEtherVPN/SoftEtherVPN into 181202_switch_to_apache_license 2018-12-14 10:58:58 +09:00
Davide Beatrici
a812910f85 src: Update VPN Client Manager and VPN Server Manager icons 2018-12-07 08:35:02 +00:00
Ilya Shipitsin
272c69d35a Release v5.01.9666
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-12-04 04:14:18 +00:00
Daiyuu Nobori
456efa7f87 Modification the header comments for some definitions in TunTap.h. 2018-12-02 16:00:45 +09:00
Daiyuu Nobori
337aaa0dfa Modification the header comments for some definitions in TunTap.h. 2018-12-02 15:58:23 +09:00
Daiyuu Nobori
c407f35322 SHA-0 Implementation replacement from GPLv3 to Apache License 2018-12-02 10:30:22 +09:00
Daiyuu Nobori
16ed2f3e0c Documents: Switching license from GPLv2 to Apache License 2.0. 2018-12-02 09:37:24 +09:00
Daiyuu Nobori
58e2f74f7f Added the "OpenVPNPushDummyIPv4AddressOnL2Mode" option for the OpenVPN L2 mode.
To fix the bug of OpenVPN 2.4.6 and particular version of kernel mode TAP driver on Linux, the TAP device must be up after the OpenVPN client is connected. However there is no direct push instruction to do so to OpenVPN client. Therefore we push the dummy IPv4 address (RFC7600) to the OpenVPN client to enforce the TAP driver UP state.
2018-12-01 16:20:30 +09:00
Ilya Shipitsin
08465e3f39
Merge pull request #772 from davidebeatrici/http-proxy-custom-header
Merge PR #772: Add custom HTTP header feature for HTTP proxy
2018-11-30 10:22:32 +05:00
Ilya Shipitsin
cbaf198bd1
Merge pull request #826 from chipitsine/issue_689
Merge PR #826: missing warning_ru.txt which caused null pointer dereference
2018-11-30 02:56:23 +05:00
Davide Beatrici
aefbd2e903 Add custom HTTP header feature for HTTP proxy
A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS.
2018-11-29 20:32:21 +01:00
Ilya Shipitsin
9e250e62be src/Mayaqua/Mayaqua: remove unused functions
found by cppcheck

[src/Mayaqua/Mayaqua.c:753]: (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
[src/Mayaqua/Mayaqua.c:484]: (style) The function 'IsUnicode' is never used.
[src/Mayaqua/Mayaqua.c:438]: (style) The function 'MayaquaDotNetMode' is never used.
[src/Mayaqua/Mayaqua.c:774]: (style) The function 'PrintOsInfo' is never used.
2018-11-30 00:01:11 +05:00
Ilya Shipitsin
f985a50f31 quick and dirty fix for issue 689 2018-11-28 23:19:56 +05:00
Davide Beatrici
a1722ac2e0 Cedar: allow @ in username 2018-11-28 15:51:04 +01:00
Ilya Shipitsin
974f18505b v5.01.9665
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-11-28 10:34:59 +00:00
Davide Beatrici
8d37f3fa0f BuildUtil: use new variables 2018-11-27 05:26:28 +01:00
Davide Beatrici
6903f9b89f CMake: build targets with versioning info on Windows 2018-11-27 05:26:21 +01:00
Davide Beatrici
0642427080 BuildFiles: edit "ver.rc" so that it uses CMake's variables syntax 2018-11-27 05:00:30 +01:00
Davide Beatrici
04188f8606 CMake: change project name to "SoftEther VPN", create and use "TOP_DIRECTORY" variable 2018-11-27 05:00:30 +01:00
Ilya Shipitsin
70ee8abae8
Merge pull request #818 from chipitsine/cleanup
Merge PR #818: src/Mayaqua/Cfg: remove unused functions, variables
2018-11-27 02:13:10 +05:00
Ilya Shipitsin
d72329c007 src/Mayaqua/Cfg: remove unused functions, variables
found by cppcheck

[src/Mayaqua/Cfg.c:669]: (style) Variable 'invalid_file' is assigned a value that is never used.
[src/Mayaqua/Cfg.c:2111]: (style) Variable 'v' is assigned a value that is never used.
[src/Mayaqua/Cfg.c:1114]: (style) The function 'CfgFolderToBufText' is never used.
[src/Mayaqua/Cfg.c:539]: (style) The function 'CfgRead' is never used.
[src/Mayaqua/Cfg.c:418]: (style) The function 'CfgSave' is never used.
[src/Mayaqua/Cfg.c:1425]: (style) The function 'CfgStrToType' is never used.
[src/Mayaqua/Cfg.c:708]: (style) The function 'CfgTest' is never used.
[src/Mayaqua/Cfg.c:704]: (style) The function 'CfgTest2' is never used.
[src/Mayaqua/Cfg.c:247]: (style) The function 'NewCfgRwW' is never used.
2018-11-27 01:52:27 +05:00
Davide Beatrici
8a58af86b1 Cedar: add new "UsernameHubSeparator" configuration option for the server, to specify a different character from '@' 2018-11-25 20:50:14 +01:00
Ilya Shipitsin
3842e813d6 Release v5.01.9664
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-11-20 04:20:51 +00:00
Davide Beatrici
03f80edfcd Cedar/Proto_OpenVPN.c: don't release data channel if it's not established, improve logic and debug messages 2018-11-19 21:30:42 +01:00
Davide Beatrici
264760aaf5
Merge PR #808: OpenVPN: Add packet scrambling/obfuscation feature 2018-11-19 21:14:27 +01:00
Davide Beatrici
c48de5924a Mayaqua: ability to toggle memory tracking at runtime, various logic improvements 2018-11-18 04:18:51 +01:00
Davide Beatrici
e1bd84d7f3 CMake: set PDB output directory, don't set default build type 2018-11-18 04:18:42 +01:00
Davide Beatrici
6a45921f41 OpenVPN: Add packet scrambling/obfuscation feature
This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.
The XOR mask set on the server has to be the same on the client, otherwise it will not be able to connect with certain obfuscation modes.
A special OpenVPN client built with the "XOR patch" is required in order to use this function, because it has never been merged in the official OpenVPN repository.

Two parameters are added to the server configuration: "OpenVPNObfuscationMethod" and "OpenVPNObfuscationMask".
Their value can be retrieved with "OpenVpnObfuscationGet" and set with "OpenVpnObfuscationEnable" in the VPN Command Line Management Utility.
2018-11-12 22:32:37 +01:00
Ilya Shipitsin
304893c139 src/Cedar/Protocol, src/Cedar/Session: cleanup, remove unused functions, variables,
resolve possible null pointer dereference

found by cppcheck

[src/Cedar/Protocol.c:3138] -> [src/Cedar/Protocol.c:3071]: (warning) Either the condition 's!=NULL' is redundant or there is possible null pointer dereference: s.
[src/Cedar/Protocol.c:916]: (style) Variable 'save' is assigned a value that is never used.
[src/Cedar/Protocol.c:6242]: (style) Variable 'size' is assigned a value that is never used.
[src/Cedar/Protocol.c:778]: (style) Variable 'old_disable' is assigned a value that is never used.
[src/Cedar/Protocol.c:1021]: (style) Variable 'save' is assigned a value that is never used.
[src/Cedar/Protocol.c:3708]: (style) Variable 'is_vgc' is assigned a value that is never used.
[src/Cedar/Protocol.c:5785]: (style) Variable 's' is assigned a value that is never used.
[src/Cedar/Protocol.c:6164]: (style) The function 'SocksConnectEx' is never used.
[src/Cedar/Protocol.c:907]: (style) The function 'CompareNodeInfo' is never used.
[src/Cedar/Protocol.c:6968]: (style) The function 'ProxyConnect' is never used.
[src/Cedar/Protocol.c:3986]: (style) The function 'SecureDelete' is never used.
[src/Cedar/Protocol.c:4042]: (style) The function 'SecureEnum' is never used.
[src/Cedar/Protocol.c:4127]: (style) The function 'SecureWrite' is never used.
[src/Cedar/Protocol.c:6463]: (style) The function 'SocksConnect' is never used.
[src/Cedar/Protocol.c:7185]: (style) The function 'TcpConnectEx2' is never used.
[src/Cedar/Protocol.c:7206]: (style) The function 'TcpIpConnect' is never used.
2018-11-10 14:18:18 +05:00
Davide Beatrici
f154cf1cec Mayaqua/Encrypt.h: fix missing AEAD macro for OpenBSD 2018-11-08 19:24:42 +01:00
Davide Beatrici
c259138225 src/BUILD_WINDOWS.md: remove ATL/MFC step 2018-11-08 15:44:52 +01:00
Davide Beatrici
0bc6a9ba5e src: change "afxres.h" to "winres.h" in all resource files, to remove MFC dependency 2018-11-07 21:23:55 +00:00
Ilya Shipitsin
da518914c1 release v5.01.9663
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-11-07 02:15:14 +00:00
Davide Beatrici
a5f18087cd
Merge PR #790: Add support for SOCKS5 proxy protocol 2018-11-07 01:30:56 +01:00
Davide Beatrici
85ebba5e39 Cedar/Proto_PPP.c: push 192.0.0.8 instead of 1.0.0.1 as gateway IP address
1.0.0.1 is a real IP address, owned by CloudFlare and used for their DNS service.

This commit changes the IP address we push to 192.0.0.8, which is defined in RFC7600 as dummy IPv4 address.
2018-11-07 00:07:01 +01:00
Davide Beatrici
540dffda05
Merge PR #793: Added Windows CMake setup info 2018-11-04 04:11:37 +01:00
Fox
7b148d8db0 Added Windows CMake setup info 2018-11-04 01:50:18 -06:00
Davide Beatrici
ba930668ba
Merge PR #796: Cedar/Proto_OpenVPN: add support for GCM ciphers 2018-11-04 01:01:10 +01:00
Ilya Shipitsin
6440521f81 src/Mayaqua/Network.c: remove reccuring check
found by PVS analyzer

src/Mayaqua/Network.c	18715	err	V571 Recurring check. The 'if (u->GetNatTIpThread == NULL)' condition was already verified in line 18712.
2018-11-04 01:04:58 +05:00
Ilya Shipitsin
dcc684ea28 src/Cedar/Admin.c: remove reccuring check
found by PVS analyzer

src/Cedar/Admin.c	5583	err	V571 Recurring check. The 'if (no_include)' condition was already verified in line 5581.
2018-11-04 01:02:51 +05:00
Ilya Shipitsin
87702f0f7d src/Mayaqua/OS: remove unused functions
found by cppcheck

[src/Mayaqua/OS.c:493]: (style) The function 'OSDec32' is never used.
[src/Mayaqua/OS.c:373]: (style) The function 'OSDeleteDir' is never used.
[src/Mayaqua/OS.c:393]: (style) The function 'OSFileCreate' is never used.
[src/Mayaqua/OS.c:353]: (style) The function 'OSFileDelete' is never used.
[src/Mayaqua/OS.c:383]: (style) The function 'OSFileOpen' is never used.
[src/Mayaqua/OS.c:331]: (style) The function 'OSFileRename' is never used.
[src/Mayaqua/OS.c:487]: (style) The function 'OSInc32' is never used.
[src/Mayaqua/OS.c:363]: (style) The function 'OSMakeDir' is never used.
[src/Mayaqua/OS.c:541]: (style) The function 'OSResetEvent' is never used.
2018-11-04 00:41:12 +05:00
Ilya Shipitsin
bfe8ee8127 src/Cedar/Proto_IkePacket: remove unused functions, redundant assignments
found by cppcheck

[src/Cedar/Proto_IkePacket.c:958]: (style) The function 'IkeNewCertPayload' is never used.
[src/Cedar/Proto_IkePacket.c:942]: (style) The function 'IkeNewCertRequestPayload' is never used.
[src/Cedar/Proto_IkePacket.c:875]: (style) The function 'IkeNewNoticeErrorInvalidExchangeTypePayload' is never used.
[src/Cedar/Proto_IkePacket.c:2542]: (style) The function 'IkeNewSpi' is never used.
[src/Cedar/Proto_IkePacket.c:142]: (style) The function 'IkePhase1CryptIdToKeySize' is never used.
[src/Cedar/Proto_IkePacket.c:157]: (style) The function 'IkePhase2CryptIdToKeySize' is never used.
[src/Cedar/Proto_IkePacket.c:172]: (style) The function 'IkeStrToPhase1CryptId' is never used.
[src/Cedar/Proto_IkePacket.c:187]: (style) The function 'IkeStrToPhase1HashId' is never used.
[src/Cedar/Proto_IkePacket.c:196]: (style) The function 'IkeStrToPhase2CryptId' is never used.
[src/Cedar/Proto_IkePacket.c:211]: (style) The function 'IkeStrToPhase2HashId' is never used.
[src/Cedar/Proto_IkePacket.c:2168]: (style) Condition 'b==NULL' is always true
2018-11-04 00:13:51 +05:00
Davide Beatrici
0357024e62 hamcore/openvpn_sample.ovpn: improve "cipher" and "auth" documentation, remove list of supported ciphers 2018-11-03 16:44:56 +01:00
Davide Beatrici
9afcc91ae1 Cedar/Proto_OpenVPN: add support for GCM ciphers 2018-11-03 16:14:56 +01:00
Davide Beatrici
aae9ec0492 Mayaqua/Encrypt: add CipherProcessAead() function to encrypt/decrypt with AEAD ciphers 2018-11-03 15:14:56 +01:00
Davide Beatrici
8b7b45b301
Merge PR #794: Proto_OpenVPN.c: move encrypt and decrypt process into dedicated functions 2018-11-01 00:04:18 +01:00
Nate Stuyvesant
c0731ee9b5
docs(BUILD_UNIX): add macOS specifics 2018-10-31 15:14:39 -04:00
Davide Beatrici
953989d344 Proto_OpenVPN.c: move encrypt and decrypt process into dedicated functions 2018-10-31 18:14:38 +01:00
Ilya Shipitsin
080edcdb81 v5.01.9662
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-10-30 16:47:37 +00:00
Davide Beatrici
53e0a2e5e2 Add support for SOCKS5 proxy protocol 2018-10-30 15:11:16 +01:00
Ilya Shipitsin
8da2464831
Merge pull request #781 from chipitsine/BN_free
Merge PR #781: src/Mayaqua/Encrypt.c: fix memory leak occasionally found by valgrind
2018-10-29 14:22:45 +05:00
Ilya Shipitsin
5e75a1fb99 src/Mayaqua/Encrypt.c: fix memory leak occasionally found by valgrind 2018-10-29 10:52:56 +05:00
Daiyuu Nobori
4e4db36c11 Fix a single memory leak in loading the string table. 2018-10-29 14:48:15 +09:00
Ilya Shipitsin
292670cfa2 vpntest: return non zero on invalid syntax 2018-10-27 09:55:42 +05:00
Davide Beatrici
c1f522c10e CMake: add support for Windows (Visual C++ 2017 toolset) 2018-10-24 21:25:57 +02:00
Davide Beatrici
5fe90bb180 hamcorebuilder: include all files on Windows 2018-10-24 21:21:36 +02:00
Ilya Shipitsin
97393bbe45 CMake: change ${CMAKE_SOURCE_DIR}/tmp with ${CMAKE_BINARY_DIR} 2018-10-24 23:47:17 +05:00
Ilya Shipitsin
e50cf278cd CMake: add dynamic libraries to RPATH
Fixes #766
2018-10-24 00:32:41 +05:00
Ilya Shipitsin
5b11e6bffd fix typo issued by the previous commit 2018-10-22 22:22:08 +05:00
Ilya Shipitsin
a6ac9456b5 v5.01.9661 2018-10-22 21:57:21 +05:00
Ilya Shipitsin
139fffe6e0 adjust systemd paths according to installation path 2018-10-22 10:55:12 +05:00
Davide Beatrici
b72292edd1 Try to fix macOS build 2018-10-20 13:31:45 +02:00
Davide Beatrici
3429e1bf31 CMake: build Cedar and Mayaqua as shared libraries, create "common" package 2018-10-20 13:12:49 +02:00
Ilya Shipitsin
cf6eef4841
Merge pull request #757 from davidebeatrici/cmake-no-build-subdirectories
Merge PR #757: CMake: build all targets in the same directory, so that "hamcore.se2" doesn't have to be copied for each of them
2018-10-19 18:09:53 +05:00
Davide Beatrici
99a029c7c4
Merge PR #759: Protocol.c: fix crash with OpenVPN when the certificate's common name is empty 2018-10-18 22:24:37 +02:00
Davide Beatrici
f061557aad Protocol.c: fix crash with OpenVPN when the certificate's common name is empty 2018-10-18 21:21:37 +02:00
Davide Beatrici
8173eb4509 CMake: build all targets in the same directory, so that "hamcore.se2" doesn't have to be copied for each of them 2018-10-18 02:02:17 +02:00
Ilya Shipitsin
63513259c0 src/Cedar/Logging.c: clean compiler warning
warning: zero-length gnu_printf format string [-Wformat-zero-length]
2018-10-17 15:31:36 +05:00
Davide Beatrici
91c5d5feb8 Cedar/Bridge.c: fix NULL pointer dereference in GetEthDeviceHash() 2018-10-16 04:40:22 +02:00
Ilya Shipitsin
2d3469909b release v5.01.9660 2018-10-15 14:26:01 +05:00
Ilya Shipitsin
68f1260f2c src/Mayaqua/MayaType.h: fix extra bracket
reported by @paskal
2018-10-14 20:40:28 +05:00
Davide Beatrici
e496f33455 Memory.c: fix pointer cast in TrackChangeObjSize() call
This commit fixes the "TrackDeleteObj: 0x12345678 is not Object!!" (where 0x12345678 is the actual address) errors with memcheck enabled.

It also fixes the following related warnings:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
                     ^
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
                                        ^
2018-10-14 07:51:53 +02:00
Davide Beatrici
ec7a9d7281 MayaType.h: fix pointer casting warnings
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 #define POINTER_TO_KEY(p)  ((sizeof(void *) == sizeof(UINT)) ? (UINT)(p) : HashPtrToUINT(p))
                                                                ^

warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 #define UINT64_TO_POINTER(i) ((sizeof(void *) == sizeof(UINT64)) ? (void *)(i) : (void *)((UINT)(i)))
                                                                                  ^

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 #define POINTER_TO_UINT64(p) (((sizeof(void *) == sizeof(UINT64)) ? (UINT64)(p) : (UINT64)((UINT)(p))))
                                                                                            ^
2018-10-14 07:24:18 +02:00
Davide Beatrici
40cca2379e hamcorebuilder.c: check for "_DEBUG" macro and don't enable memcheck 2018-10-14 03:19:12 +02:00
Ilya Shipitsin
c2600e64a5
Merge pull request #744 from chipitsine/12.04
Merge PR #744: gitlab-ci: enable ubuntu 12.04 builds
2018-10-12 01:16:34 +05:00
Ilya Shipitsin
ec09309aa8 gitlab-ci: enable ubuntu 12.04 builds 2018-10-12 01:03:12 +05:00
Davide Beatrici
76f0b2d037 BuildAll.cmd: copy "ossl_static.pdb" where the linker expects it to be 2018-10-10 05:52:54 +02:00
Daiyuu Nobori
2748ac6df5 Added OpenSSL and zlib .pdb files for .lib for Windows. 2018-10-10 08:10:39 +09:00
Daiyuu Nobori
36ac327d7b Fix VS2017 x64 debug OpenSSL libraries name. For backward compatibility, libcrypto.lib is stored as libeay32.lib, and libssl.lib is stored as ssleay32.lib. 2018-10-10 07:25:48 +09:00
Davide Beatrici
0e22adc598
Merge PR #739: vpntest improvement: add Server Manager UI and Client Manager UI test 2018-10-09 19:47:33 +02:00
Davide Beatrici
6dcba8f492
Merge PR #738: Upgrade Windows OpenSSL to 1.1.1, and also Visual Studio 2017 static link libraries support. 2018-10-09 19:45:38 +02:00
Ilya Shipitsin
a25fea0809 release 5.01.9659 2018-10-09 21:25:28 +05:00
Daiyuu Nobori
c000c2f1e0 vpntest improvement: add Server Manager UI and Client Manager UI test 2018-10-09 21:34:54 +09:00
Daiyuu Nobori
a77a98dc41 Added OpenSSL 1.1.1 and zlib's .lib files for Visual Studio 2017. 2018-10-09 21:20:09 +09:00
Daiyuu Nobori
58e659f33f Add automatically generated files to .gitignore 2018-10-09 21:10:29 +09:00
Daiyuu Nobori
8df347c093 Added OpenSSL 1.1.1 .lib files for Visual Studio 2008. 2018-10-09 20:30:03 +09:00
Daiyuu Nobori
baff1b349c Win32 OpenSSL Header File: Ver 1.0.2j -> Ver 1.1.1 2018-10-09 19:29:11 +09:00
Davide Beatrici
03d78693a3
Merge PR #735: Debug flag and test mode improvements 2018-10-08 21:00:44 +02:00
Davide Beatrici
8ddd336c38
Merge PR #736: vpntest project for programmers: runs VPN Server / VPN Client / VPN Bridge in test mode with full debug console output and memory leak checks 2018-10-08 06:33:47 +02:00
Daiyuu Nobori
ff85841dab Fix MSBuild error. 2018-10-08 13:16:52 +09:00
Davide Beatrici
97d7f3fb05 Add "vpntest" to CMake 2018-10-08 05:10:54 +02:00
Daiyuu Nobori
8abcf3d0a9 Debug flag and test mode improvements
1. ifdef DEBUG -> defined(_DEBUG) || defined(DEBUG)
In VC++ compilers, the macro is "_DEBUG", not "DEBUG".

2. If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak.
For normal debug we set memcheck = false.
Please set memcheck = true if you want to test the cause of memory leaks.
2018-10-08 04:50:46 +02:00
Daiyuu Nobori
ee208dd6f0 Finally, the implementation of test code is completed! Ha ha ha 2018-10-08 11:50:11 +09:00
Daiyuu Nobori
2d76507561 Next, change the project name "Ham" to "vpntest" so every programmer will recognize easily it is a test program. 2018-10-08 11:19:39 +09:00
Daiyuu Nobori
0ce8ad7a2b At first, restore "Ham" project. This reverts commit 24d23feacf. 2018-10-08 11:13:48 +09:00
Davide Beatrici
9fa9f6cdc1 Mayaqua/Network.c: improve RecvFrom() and RecvFrom6()
This commit improves the RecvFrom() and RecvFrom6() functions by:
- Using the right data type for the struct size variable passed to recvfrom().
- Improving the arguments validation mechanism.
- Printing unhandled errors.
2018-10-08 03:21:10 +02:00
Davide Beatrici
afe994f252 Mayaqua/OS: improve UnixGetOsInfo() so that it retrieves info on recent Linux/BSD systems 2018-10-07 01:38:02 +02:00
Davide Beatrici
335e0503c9 Mayaqua/Str: add TrimQuotes() function to remove quotes from a string 2018-10-06 22:42:29 +02:00
Davide Beatrici
9970d6f657 Mayaqua/Memory: move and adapt entry list functions from Cedar/Proto_OpenVPN 2018-10-06 22:41:35 +02:00
Davide Beatrici
e02237f397 Add string for "IF_TYPE_PROP_VIRTUAL" network interface type 2018-10-03 09:10:27 +02:00
Davide Beatrici
1f4d8c5a4b legal.txt: remove unneeded text 2018-10-03 08:17:46 +02:00
Davide Beatrici
e8050651c0 Copy authors file into "src/bin/hamcore" automatically 2018-10-03 07:24:42 +02:00
Ilya Shipitsin
6144f45918 increased build number to 5.1.9658 2018-10-01 23:09:30 +05:00
Davide Beatrici
00f66616d2
Merge PR #721: Encrypt.c: fix MdProcess()'s HMAC implementation 2018-10-01 19:08:38 +02:00
Davide Beatrici
34f443c0c7
Merge PR #718: src/Cedar/BridgeUnix.c: resolve null pointer dereference 2018-09-29 23:30:28 +02:00
Ilya Shipitsin
564ca6087f src/Mayaqua/Object.c: remove redundant conditionals
found by PVS analyzer

src/Mayaqua/Object.c	318	warn	V547 Expression 'c->Ready == 0' is always false.
src/Mayaqua/Object.c	348	warn	V547 Expression 'c->Ready == 0' is always false.
src/Mayaqua/Object.c	383	warn	V547 Expression 'c->Ready == 0' is always false.
2018-09-29 00:39:01 +05:00
Davide Beatrici
aee6084b19 BridgeUnix.c: enable local bridge function on all BSD systems 2018-09-28 20:56:10 +02:00
Daiyuu Nobori
ee9990317b Fix bugs reported by Coverity Scan. 2018-09-28 22:39:38 +09:00
Ilya Shipitsin
60bb1c34de src/Cedar/BridgeUnix.c: resolve null pointer dereference
found by coverity
2018-09-28 16:17:20 +05:00
Davide Beatrici
53c8abfd80 Encrypt.c: fix MdProcess()'s HMAC implementation 2018-09-27 20:28:48 +02:00
Ilya Shipitsin
1fdc712e66 src/Cedar/Client.c: silence coverity regarding dead code 2018-09-24 11:19:54 +05:00
Ilya Shipitsin
36dbde6f32 src/Cedar/Hub.c: resolve possible null pointer dereference
found by coverity
2018-09-24 11:13:43 +05:00
Ilya Shipitsin
0f77b5e30e fix localization files, missing strings were taken from "en" 2018-09-23 22:24:21 +05:00
Davide Beatrici
f449b0b405
Merge PR #704: vpncmd: Added information about "Disable UDP Acceleration" setting into output of AccountGet command. 2018-09-23 17:05:45 +02:00
Davide Beatrici
50b42070e2 Encrypt: reorder digest functions 2018-09-22 06:47:03 +02:00
Davide Beatrici
3f5f716357 Revamp digest functions
- Hash() has been removed because it was ambiguous, Md5() and Sha0() are proper replacements.
- HMacMd5() and HMacSha1() now share a common implementation handled by the new Internal_HMac() function.
- NewMd() and MdProcess() now support plain hashing (without the key).
- NewMd(), SetMdKey() and MdProcess() now check the OpenSSL functions' return value and in case of failure a debug message is printed along with the error string, if available.
- SetMdKey()'s return value has been changed from void to bool, so that it's possible to know whether the function succeeded or not.
- MdProcess()' return value has been changed from void to UINT (unsigned int) and the function now returns the number of bytes written by HMAC_Final() or EVP_DigestFinal_ex().
2018-09-22 06:36:09 +02:00
mogikanin
2ec48c765e Added string to other stb files 2018-09-19 12:10:23 +03:00
Davide Beatrici
a78bcb4f21
Merge PR #707: src/Cedar/Hub.c: resolve null pointer dereference found by coverity 2018-09-19 04:23:56 +02:00
Ilya Shipitsin
621fffbfbd src/Cedar/Hub.c: resolve null pointer dereference found by coverity,
also cleanup a code based on PVS analyzer findings

src/Cedar/Hub.c	5279	warn	V547 Expression 'e->UpdatedTime <= oldest_time' is always true.
src/Cedar/Hub.c	5840	warn	V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 5828, 5840.
2018-09-18 10:52:04 +05:00
Davide Beatrici
60a2583ee4 BridgeUnix.c: add TAP local bridge support for FreeBSD 2018-09-18 01:35:23 +02:00
Davide Beatrici
cb2aec1314 BridgeUnix.c: convert line endings from CRLF to LF 2018-09-18 01:32:01 +02:00
Ilya Shipitsin
f469e143fc src/Cedar/Client.c: remove not needed condition
inspired by coverity (however, coverity does not see an issue here)
2018-09-17 16:35:22 +05:00
mogikanin
825a5a828e vpncmd: Added information about "Disable UDP Acceleration" setting into output of AccountGet command. 2018-09-17 09:22:50 +03:00
Davide Beatrici
4e30a40ae1 Enable debug messages and memory check with debug configuration 2018-09-15 19:12:21 +02:00
Ilya Shipitsin
4974b2a13e src/Cedar/Radius: resolve several coverity "issues"
coverity thinks there might be null pointer dereference, make it
happier by removing check (there's a check against NULL in function itself).

condition "a.DataSize <= 1500" is always true
2018-09-14 11:05:24 +05:00
Davide Beatrici
39858d7017 CMake: fix date/time leading 0 removal regex and print both during configuration
The previous regex expression removed all the 0s present in the input string, meaning that it caused the build to fail in case one of the date/time values was effectively 0.
2018-09-13 22:54:03 +02:00
Ilya Shipitsin
83a8b5f4aa src/Cedar/Hub: resolve potential null pointer dereference, remove unused functions
found by coverity, cppcheck

[src/Cedar/Hub.c:6663]: (style) The function 'CalcTrafficEntryDiff' is never used.
[src/Cedar/Hub.c:3387]: (style) The function 'GetSessionByPtr' is never used.
[src/Cedar/Hub.c:3139]: (style) The function 'SetSessionFirstRedirectHttpUrl' is never used.
[src/Cedar/Hub.c:3912]: (style) The function 'VgsSetEmbTag' is never used.
[src/Cedar/Hub.c:3918]: (style) The function 'VgsSetUserAgentValue' is never used.
2018-09-13 23:39:09 +05:00
Bill Welliver
2017e43ad1 Clean up device name parsing code to eliminate Coverity errors 2018-09-13 19:22:00 +02:00
Davide Beatrici
32082eb8af Proto_IkePacket.c: fix and improve IkeHMac() function
Pull request #294 added SHA-256, SHA-384, and SHA-512 support to the protocol, but part of it was removed in faee11ff09, because it caused a buffer over-read crash.

It also broke the MD5 implementation because the switch-case block didn't handle the type anymore.

This pull request fixes all the implementations and improves the IkeHMac() function by using the dedicated hashing functions.
2018-09-11 15:29:12 +02:00
Davide Beatrici
8fdd224ba7
Merge PR #690: CMake: install systemd configuration files 2018-09-10 18:17:55 +02:00
Davide Beatrici
1e6b99e3fe Cedar: replace "Interop_" and "IPsec_" with "Proto_" in the protocol-specific source/header files' names
"IPsec_IPC" has been renamed to "IPC" because it's not related to third-party protocols.
2018-09-10 00:46:29 +02:00
Davide Beatrici
afde7fb981 CMake: install systemd configuration files 2018-09-07 21:45:33 +02:00
Ilya Shipitsin
db226eb4dd src/Cedar/Server: resolve possible null reference exception, remove unused functions, variable, duplicate assignment and conditional
found by coverity, cppcheck

[src/Cedar/Server.c:2899]: (style) Variable 'is_vgs_enabled' is assigned a value that is never used.
[src/Cedar/Server.c:3961]: (style) Variable 'id' is assigned a value that is never used.
[src/Cedar/Server.c:5723]: (style) Variable 'c' is assigned a value that is never used.
[src/Cedar/Server.c:5767]: (style) Variable 'num_connections_per_ip' is assigned a value that is never used.
[src/Cedar/Server.c:7327]: (style) Variable 'num' is assigned a value that is never used.
[src/Cedar/Server.c:8444]: (style) The function 'SiCallEnumHubBegin' is never used.
[src/Cedar/Server.c:8454]: (style) The function 'SiCallEnumHubEnd' is never used.
[src/Cedar/Server.c:9923]: (style) The function 'SiCallTaskAsyncBegin' is never used.
[src/Cedar/Server.c:9949]: (style) The function 'SiCallTaskAsyncEnd' is never used.
[src/Cedar/Server.c:10769]: (style) The function 'SiCheckCurrentRegion' is never used.
[src/Cedar/Server.c:2831]: (style) The function 'SiGetAzureEnable' is never used.
[src/Cedar/Server.c:208]: (style) The function 'SiGetServerNumUserObjects' is never used.
[src/Cedar/Server.c:2435]: (style) The function 'SiInitBridge' is never used.
[src/Cedar/Server.c:2540]: (style) The function 'SiTest' is never used.
[src/Cedar/Server.c:6707]: (style) The function 'StGetServer' is never used.
2018-09-01 17:49:08 +05:00
Ilya Shipitsin
b5f391016e src/Cedar/BridgeUnix.c: resolve possible null pointer dereference
found by coverity
2018-09-01 15:00:42 +05:00
Ilya Shipitsin
56681d41a0 src/Mayaqua/Kernel: remove unused variable, functions
found by cppcheck

[src/Mayaqua/Kernel.c:1199]: (style) Variable 'new_thread' is assigned a value that is never used.
[src/Mayaqua/Kernel.c:385]: (style) The function 'DelThreadFromThreadList' is never used.
[src/Mayaqua/Kernel.c:1726]: (style) The function 'GetCurrentLocale' is never used.
[src/Mayaqua/Kernel.c:562]: (style) The function 'GetHomeDir' is never used.
[src/Mayaqua/Kernel.c:1644]: (style) The function 'GetSpanStr' is never used.
[src/Mayaqua/Kernel.c:1695]: (style) The function 'GetSpanStrEx' is never used.
[src/Mayaqua/Kernel.c:950]: (style) The function 'GetTimeStr64' is never used.
[src/Mayaqua/Kernel.c:909]: (style) The function 'GetTimeStrEx64' is never used.
[src/Mayaqua/Kernel.c:1924]: (style) The function 'System64ToTime' is never used.
[src/Mayaqua/Kernel.c:1900]: (style) The function 'TimeToSystem64' is never used.
[src/Mayaqua/Kernel.c:470]: (style) The function 'WaitAllThreadsWillBeStopped' is never used.
[src/Mayaqua/Kernel.c:1478]: (style) The function 'GetTimeStr' is never used.
2018-09-01 10:25:09 +05:00
Ilya Shipitsin
156166dba1 src/Cedar/Hub: resolve null pointer dereference found by coverity 2018-08-31 00:59:06 +05:00
Ilya Shipitsin
9675b0eb6d src/Cedar/IPsec_EtherIP: resolve "Identical code for different branches"
found by coverity
2018-08-31 00:56:00 +05:00
Ilya Shipitsin
2c2caa81bc src/Cedar/Interop_OpenVPN: resolve coverity "issue"
coverity thinks there might be null pointer dereference. we can
safely remove a check here, because OvsFreePacket checks for null
itself
2018-08-31 00:50:53 +05:00
Davide Beatrici
3fcd8bc4a1
Merge PR #682: src/Cedar/Session: resolve coverity "issue", remove unused functions 2018-08-29 09:47:47 +02:00
Ilya Shipitsin
c81dfc0e58 src/Cedar/Session: modify code to avoid "Identical code for different branches", remove unused functions.
found by coverity, cppcheck

[src/Cedar/Session.c:1856]: (style) The function 'CompareSession' is never used.
[src/Cedar/Session.c:2384]: (style) The function 'DebugPrintSessionKey' is never used.
[src/Cedar/Session.c:2102]: (style) The function 'GetSessionFromKey32' is never used.
2018-08-29 12:36:09 +05:00
Ilya Shipitsin
eb7a8aa517
Merge pull request #680 from Olim98/patch-1
Merge PR #679: Add Russian language to translate.txt
2018-08-29 10:48:10 +05:00
Ilya Shipitsin
eb0edeb1db
Merge pull request #679 from Olim98/patch-2
Merge PR #679: Partial translation to Russian
2018-08-28 22:00:58 +05:00
Davide Beatrici
3f8fa9d5d9
Merge PR #673: Cedar: custom TAP interface name support for FreeBSD, function refactor 2018-08-28 14:08:03 +02:00
Ilya Shipitsin
a55a3b50e8 src/Mayaqua/Unix: remove unused code, improve readability of "ifdef"
refactoring was discussed in PR#672
2018-08-28 10:21:36 +05:00
Davide Beatrici
3f394d23c1
Merge PR #672: Unix.c: remove macOS-specific UnixGetTick64() implementation 2018-08-28 01:27:57 +02:00
Davide Beatrici
9d601c2745 CMake: set build info as compiler macros 2018-08-27 05:50:40 +02:00
Davide Beatrici
c21f427fc6 Divide version in multiple macros and set default values 2018-08-27 05:44:32 +02:00
Davide Beatrici
7f9177f3d7
Merge PR #671: resolve several coverity issues 2018-08-27 01:22:27 +02:00
Davide Beatrici
dbb0bb83f7 Cedar: fix segmentation fault during local bridge creation on FreeBSD 2018-08-27 00:46:59 +02:00
Davide Beatrici
37ced5c479 Cedar: custom TAP interface name support for FreeBSD, function refactor
The maximum number of TAP devices to iterate through has been increased from 16 to 512.
2018-08-26 04:20:57 +02:00
Davide Beatrici
e0598d747a
Merge PR #670: Add TAP devices support for FreeBSD and OpenBSD 2018-08-25 14:43:42 +02:00
Ilya Shipitsin
dcd03476c4 src/Cedar/Connection: resolve null pointer dereference found by coverity,
remove unused function

[src/Cedar/Connection.c:2861]: (style) The function 'InitTcpSockRc4Key' is never used.
2018-08-24 15:26:14 +05:00
Ilya Shipitsin
a58d26f125 src/Cedar/IPsec_IKE.c: resolve null pointer dereference found by coverity,
remove unused variable

[src/Cedar/IPsec_IKE.c:4332] -> [src/Cedar/IPsec_IKE.c:4332]: (style) Same expression on both sides of '||'.
[src/Cedar/IPsec_IKE.c:1665]: (style) Variable 'zero' is assigned a value that is never used.
2018-08-24 15:25:34 +05:00
Ilya Shipitsin
2f7d71a567 src/Cedar/Cedar.c: resolve "Identical code for different branches", remove unused functions
found by coverity, cppcheck

[src/Cedar/Cedar.c:1605]: (style) The function 'EnableDebugLog' is never used.
[src/Cedar/Cedar.c:858]: (style) The function 'GetUnestablishedConnections' is never used.
[src/Cedar/Cedar.c:652]: (style) The function 'InitHiddenPassword' is never used.
[src/Cedar/Cedar.c:633]: (style) The function 'IsHiddenPasswordChanged' is never used.
[src/Cedar/Cedar.c:393]: (style) The function 'IsInNoSsl' is never used.
[src/Cedar/Cedar.c:1785]: (style) The function 'IsLaterBuild' is never used.
2018-08-24 15:23:45 +05:00
Davide Beatrici
19e837d81e Unix.c: remove macOS-specific UnixGetTick64() implementation
clock_gettime() was implemented in macOS 10.12.
2018-08-24 06:43:45 +02:00
Davide Beatrici
3ff5c061d7 Add TAP devices support for FreeBSD and OpenBSD
Thanks to @kennylam777 for the first implementation: https://github.com/kennylam777/SoftEtherVPN/commits/FreeBSD-TAP
2018-08-23 10:56:30 +02:00
Ilya Shipitsin
ddd0c96d46 src/Mayaqua/Network.c: silence coverity on "Unchecked return value" 2018-08-23 13:36:38 +05:00
Davide Beatrici
0e5d432ae4
Merge PR #667: Cedar: fix compilation on FreeBSD, broken by #337 2018-08-23 08:55:26 +02:00
Davide Beatrici
7612c2bf5d Cedar: fix compilation on FreeBSD, broken by #337 2018-08-23 04:39:13 +02:00
Michael B
34b99ea2a5
Added Try+Except block for ProbeForRead
Possible security problem under double-fetch conditions. Microsoft says all ProbeForRead calls should be treated as if they could throw exceptions.  SRC: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-probeforread
2018-08-22 21:58:58 -04:00
Ilya Shipitsin
a2d5fb7015 src/Cedar/Client.c: remove redundant "if" statement, unused variable
found by coverity, cppcheck

[src/Cedar/Client.c:9094]: (style) Unused variable: i
[src/Cedar/Client.c:500] -> [src/Cedar/Client.c:503]: (style) Variable 'ret' is reassigned a value before the old one has been used.
2018-08-22 20:58:03 +05:00
Ilya Shipitsin
e8c6e2c1d9 src/Cedar/Client.c, src/Mayaqua/Network.c, src/Mayaqua/Unix.c: silence coverity 2018-08-22 10:40:13 +05:00
Ilya Shipitsin
5ecc80a14e src/Cedar/Virtual: coverity suspects null pointer dereference here
however, both Cancel() and ReleaseCancel() checks for NULL themselves,
so we can remove this check
2018-08-22 10:33:29 +05:00
Davide Beatrici
4b49540750
Merge PR #663: src/Mayaqua/Network: silence coverity, remove unused functions, variables 2018-08-21 23:53:16 +02:00
Ilya Shipitsin
b398f09912 src/Mayaqua/Network: silence coverity, remove unused functions, variables
found by coverity, cppcheck

[src/Mayaqua/Network.c:10599] -> [src/Mayaqua/Network.c:10603]: (style) Variable 'ret' is reassigned a value before the old one has been used.
[src/Mayaqua/Network.c:10611] -> [src/Mayaqua/Network.c:10615]: (style) Variable 'e' is reassigned a value before the old one has been used.
[src/Mayaqua/Network.c:12979]: (style) Variable 'disable_conditional_accept' is assigned a value that is never used.
[src/Mayaqua/Network.c:12167]: (style) Variable 's' is assigned a value that is never used.
[src/Mayaqua/Network.c:12319]: (style) Variable 's' is assigned a value that is never used.
[src/Mayaqua/Network.c:20660]: (style) The function 'HttpSendInvalidHostname' is never used.
[src/Mayaqua/Network.c:6640]: (style) The function 'IsNetworkPrefixAddress6' is never used.
[src/Mayaqua/Network.c:17593]: (style) The function 'ParseIpAndSubnetMask6' is never used.
[src/Mayaqua/Network.c:473]: (style) The function 'SetNatTLowPriority' is never used.
[src/Mayaqua/Network.c:14924]: (style) The function 'SetSocketSendRecvBufferSize' is never used.
[src/Mayaqua/Network.c:6249]: (style) The function 'Win32AcceptCheckCallback_Delay' is never used.
[src/Mayaqua/Network.c:6264]: (style) The function 'Win32Accept_XP' is never used.
[src/Mayaqua/Network.c:7467]: (style) The function 'Win32GetTcpTableList' is never used.
[src/Mayaqua/Network.c:9171]: (style) The function 'Win32NetworkTest' is never used.
[src/Mayaqua/Network.c:6581]: (style) The function 'GetHostAddress6' is never used.
[src/Mayaqua/Network.c:7468]: (style) The function 'Win32GetTcpTableListByAllocateAndGetTcpExTableFromStack' is never used.
[src/Mayaqua/Network.c:7384]: (style) The function 'Win32GetTcpTableListByGetExtendedTcpTable' is never used.
[src/Mayaqua/Network.c:7515]: (style) The function 'Win32GetTcpTableListByGetTcpTable' is never used.
[src/Mayaqua/Network.c:6758]: (style) The function 'IPNot6' is never used.
2018-08-21 22:00:37 +05:00
Davide Beatrici
233b525d0e
Merge PR #662: Fix that virtual NAT session is closed even if data remains. 2018-08-21 13:04:06 +02:00
MtCedarNet
f9de4a06aa Fix that virtual NAT session is closed even if data remains. 2018-08-21 18:54:07 +09:00
Ilya Shipitsin
99cdd9fe92 src/Cedar/Protocol: remove dead code, silence coverity 2018-08-21 11:55:37 +05:00
Ilya Shipitsin
c98c7858bd src/Cedar/Virtual: resolve null pointer dereference
found by coverity
2018-08-21 11:36:01 +05:00
Ilya Shipitsin
e0e4e8a4c8 src/Mayaqua/Unix: resolve "unchecked return value", remove unused functions,
variables. Found by coverity, cppcheck

[src/Mayaqua/Unix.c:2559]: (style) Unused variable: status
[src/Mayaqua/Unix.c:181]: (style) Redundant condition: select!=NULL. 'select==NULL || (select!=NULL && (*select)(entry))' is equivalent to 'select==NULL || (*select)(entry)'
[src/Mayaqua/Unix.c:1297]: (style) The function 'UnixDaemon' is never used.
[src/Mayaqua/Unix.c:543]: (style) The function 'UnixGetDiskFreeW' is never used.
[src/Mayaqua/Unix.c:834]: (style) The function 'UnixRestoreThreadPriority' is never used.
[src/Mayaqua/Unix.c:816]: (style) The function 'UnixSetThreadPriorityHigh' is never used.
[src/Mayaqua/Unix.c:825]: (style) The function 'UnixSetThreadPriorityIdle' is never used.
[src/Mayaqua/Unix.c:807]: (style) The function 'UnixSetThreadPriorityLow' is never used.
[src/Mayaqua/Unix.c:2805]: (style) The function 'UnixWaitProcess' is never used.
2018-08-21 11:05:31 +05:00
Ilya Shipitsin
f3ff7e2743 src/Cedar/BridgeUnix: resolve coverity "issue" 2018-08-21 11:04:48 +05:00
Ilya Shipitsin
b0ebd1f1d5 src/Cedar/Client: remove dead code, unused functions, variables
found by coverity, cppcheck

[src/Cedar/Client.c:10486]: (style) The function 'CiFreeInnerVPNServer' is never used.
[src/Cedar/Client.c:10877]: (style) The function 'CiGetNumActiveSessions' is never used.
[src/Cedar/Client.c:2042]: (style) The function 'CiHasAccountSensitiveInformationFile' is never used.
[src/Cedar/Client.c:10469]: (style) The function 'CiNewInnerVPNServer' is never used.
[src/Cedar/Client.c:1128]: (style) The function 'CncGetSessionId' is never used.
[src/Cedar/Client.c:767]: (style) The function 'CncPasswordDlgHaltThread' is never used.
[src/Cedar/Client.c:10681]: (style) The function 'CompareInternetSetting' is never used.
[src/Cedar/Client.c:11060]: (style) The function 'CtGetClient' is never used.
[src/Cedar/Client.c:5128]: (style) The function 'InRpcClientNotify' is never used.
[src/Cedar/Client.c:4340]: (style) The function 'InRpcEnumObjectInSecure' is never used.
[src/Cedar/Client.c:5140]: (style) The function 'OutRpcClientNotify' is never used.
[src/Cedar/Client.c:5657]: (style) Condition 'reg_port!=0' is always false
[src/Cedar/Client.c:683]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Client.c:725]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Client.c:1013]: (style) Variable 'param' is assigned a value that is never used.
2018-08-18 19:24:12 +05:00
Ilya Shipitsin
29c991c487 src/Cedar/BridgeUnix: null pointer dereference resolved, unused variables, functions removed
found by coverity, cppcheck

[src/Cedar/BridgeUnix.c:270] -> [src/Cedar/BridgeUnix.c:279]: (style) Variable 'ret' is reassigned a value before the old one has been used.
[src/Cedar/BridgeUnix.c:560] -> [src/Cedar/BridgeUnix.c:569]: (style) Variable 't' is reassigned a value before the old one has been used.
[src/Cedar/BridgeUnix.c:1528] -> [src/Cedar/BridgeUnix.c:1537]: (style) Variable 'ret' is reassigned a value before the old one has been used.
[src/Cedar/BridgeUnix.c:1278]: (style) Unused variable: c
[src/Cedar/BridgeUnix.c:1090]: (style) The function 'DlipAttachRequest' is never used.
2018-08-18 18:59:51 +05:00
Ilya Shipitsin
c4d1a10c2a src/Cedar/Command: remove dead code, null pointer dereference, unused functions, variables
found by coverity, cppcheck

[src/Cedar/Command.c:9378]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:9999]: (style) The function 'CmdEvalNetworkAndSubnetMask6' is never used.
2018-08-18 17:55:24 +05:00
Davide Beatrici
0d966755d7
Merge PR #659: resolve cosmetic coverity issues 2018-08-18 08:09:22 +02:00
Davide Beatrici
daed1ad8b3
Merge PR #594: Remove SSLv3 support 2018-08-18 07:38:05 +02:00
Ilya Shipitsin
a71589e027 src/Cedar/EtherLog: silence coverity, remove unused functions
found by coverity, cppcheck

[src/Cedar/EtherLog.c:327]: (style) The function 'EcAddLicenseKey' is never used.
[src/Cedar/EtherLog.c:385]: (style) The function 'ElCheckLicense' is never used.
2018-08-18 10:25:30 +05:00
Ilya Shipitsin
e460f26b19 src/Cedar/IPsec_PPP: remove dead code, unused fuction
found by coverity, cppcheck

[src/Cedar/IPsec_PPP.c:2655]: (style) The function 'MsChapV2Client_GenerateChallenge' is never used.
2018-08-18 00:34:42 +05:00
Ilya Shipitsin
8ca0ce3efc src/Mayaqua/TcpIp: remove dead code, unused variables and fuctions
found by coverity, cppcheck

[src/Mayaqua/TcpIp.c:578]: (style) Variable 'tcp_size' is assigned a value that is never used.
[src/Mayaqua/TcpIp.c:1034]: (style) Variable 'has_vlan_tag' is assigned a value that is never used.
[src/Mayaqua/TcpIp.c:1996]: (style) Variable 'tcp_header_size' is assigned a value that is never used.
[src/Mayaqua/TcpIp.c:127]: (style) The function 'IcmpEchoSend' is never used.
[src/Mayaqua/TcpIp.c:2194]: (style) The function 'ParsePacketL2' is never used.
[src/Mayaqua/TcpIp.c:251]: (style) The function 'IcmpEchoSendBySocket' is never used.
2018-08-18 00:27:17 +05:00
Ilya Shipitsin
8a9309bedf src/Cedar/Command: remove dead code, unused variables and functions
found by cppcheck and coverity

[src/Cedar/Command.c:523] -> [src/Cedar/Command.c:532]: (style) Variable 'ok' is reassigned a value before the old one has been used.
[src/Cedar/Command.c:776]: (style) Variable 'tick2' is assigned a value that is never used.
[src/Cedar/Command.c:2244]: (style) Variable 'halt_timeout' is assigned a value that is never used.
[src/Cedar/Command.c:2246]: (style) Variable 'check_clock_seed' is assigned a value that is never used.
[src/Cedar/Command.c:2247]: (style) Variable 'halting' is assigned a value that is never used.
[src/Cedar/Command.c:6904]: (style) Unused variable: tmp
[src/Cedar/Command.c:12217]: (style) Variable 'packet_log' is assigned a value that is never used.
[src/Cedar/Command.c:20825]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:20883]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:20927]: (style) Variable 'ret' is assigned a value that is never used.
[src/Cedar/Command.c:10022]: (style) The function 'CmdEvalIpAndMask46' is never used.
[src/Cedar/Command.c:10109]: (style) The function 'CmdEvalNetworkAndSubnetMask46' is never used.
[src/Cedar/Command.c:23025]: (style) The function 'CmdPrintRow' is never used.
[src/Cedar/Command.c:167]: (style) The function 'InRpcTtResult' is never used.
[src/Cedar/Command.c:148]: (style) The function 'OutRpcTtResult' is never used.
2018-08-15 19:04:17 +05:00
Davide Beatrici
2692bb6b8e Interop_OpenVPN: set "subnet" topology and remove workaround for "net30" topology on Win32
The workaround was required for the "net30" topology because:
"There is a problem in your selection of --ifconfig endpoints [local=192.168.30.10, remote=192.168.30.1]. The local and remote VPN endpoints must exist within the same 255.255.255.252 subnet. This is a limitation of --dev tun when used with the TAP-WIN32 driver. Try 'openvpn --show-valid-subnets' option for more info."

See https://community.openvpn.net/openvpn/wiki/Topology for detailed info.
2018-08-15 02:39:33 +02:00
Ilya Shipitsin
f96a3b3989 src/Cedar/EtherLog: remove null dereference introduced in #650
also, remove unused functions:

[src/Cedar/EtherLog.c:1377]: (style) The function 'ElFree' is never used.
[src/Cedar/EtherLog.c:1370]: (style) The function 'ElInit' is never used.
2018-08-14 02:36:28 +05:00
Davide Beatrici
fc0bd44392
Merge PR #650: resolve several issues identified by coverity 2018-08-13 22:32:28 +02:00
Andy Walsh
d6c8231ff0 Mayaqua/Encrypt.c: fix invalid features.aes for mips, ppc
* fix invalid features.aes for mips, ppc

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2018-08-13 16:23:54 +02:00
Ilya Shipitsin
eb4efe3f1b src/Cedar/Session.c: avoid unintentional integer overflow
found by coverity
2018-08-13 15:40:45 +05:00
Ilya Shipitsin
ff1470cdce src/Cedar/Nat.c: resolve possible null dereference
found by coverity
2018-08-13 15:40:17 +05:00
Ilya Shipitsin
937da4a746 src/Cedar/EtherLog.c: resolve possible null dereference
found by coverity
2018-08-13 15:39:29 +05:00
Ilya Shipitsin
fd16f73c0e src/Mayaqua/Tick64.c: reorder guards in order to silence coverity 2018-08-13 15:37:11 +05:00
Ilya Shipitsin
3ca4bc0aa9 src/Cedar/Logging: remove unused functions, redundant condition
[src/Cedar/Logging.c:679]: (style) The function 'HubLog' is never used.
[src/Cedar/Logging.c:888]: (style) The function 'IPCLog' is never used.
[src/Cedar/Logging.c:295]: (style) The function 'PrintEraseFileList' is never used.
[src/Cedar/Logging.c:1025]: (style) The function 'SecLog' is never used.
[src/Cedar/Logging.c:622]: (style) The function 'ServerLog' is never used.
[src/Cedar/Logging.c:2273]: (style) The function 'SetLogDirName' is never used.
[src/Cedar/Logging.c:2293]: (style) The function 'SetLogPrefix' is never used.
[src/Cedar/Logging.c:997]: (style) The function 'WriteMultiLineLog' is never used.
[src/Cedar/Logging.c:918]: (style) The function 'WriteSecurityLog' is never used.
[src/Cedar/Logging.c:1018] -> [src/Cedar/Logging.c:1006]:

(warning) Either the condition 'src_session!=NULL' is redundant or there is possible null
pointer dereference: src_session.
2018-08-13 07:13:56 +05:00
Ilya Shipitsin
6af1a2eb46 src/Cedar/Interop_OpenVPN: remove unused functions and variables
[src/Cedar/Interop_OpenVPN.c:2711]: (style) Variable 'now' is assigned a value that is never used.
[src/Cedar/Interop_OpenVPN.c:1053]: (style) The function 'OvsAddEntry' is never used.
[src/Cedar/Interop_OpenVPN.c:2610]: (style) The function 'OvsGetCompatibleL3IPNext' is never used.
[src/Cedar/Interop_OpenVPN.c:1047]: (style) The function 'OvsNewList' is never used.
[src/Cedar/Interop_OpenVPN.c:128]: (style) The function 'OvsSetNoOpenVpnTcp' is never used.
[src/Cedar/Interop_OpenVPN.c:140]: (style) The function 'OvsSetNoOpenVpnUdp' is never used.
2018-08-13 07:00:33 +05:00
Davide Beatrici
3a7b801ce5 CMake: change output directory from "bin" to "build" 2018-08-12 19:22:51 +02:00
Davide Beatrici
b3aba63f8e
Merge PR #644: src/BUILD_UNIX.md: Reorder commands of SE manual build with musl 2018-08-12 19:06:55 +02:00
Davide Beatrici
0a289debf3
Merge PR #643: resolve several issues found by coverity 2018-08-12 19:01:43 +02:00
Davide Beatrici
11bbf1ff62
Merge PR #642: src/Mayaqua/Str: remove unused functions 2018-08-12 18:59:37 +02:00
Ilya Shipitsin
6d389a1348 src/BUILD_UNIX.md: Reorder commands of SE manual build with musl 2018-08-12 19:17:07 +05:00
Ilya Shipitsin
b9d7e94353
Merge pull request #628 from thepyper/patch-1
Merge PR #628: unveil the mystery of building SE VPN with musl
2018-08-12 19:09:34 +05:00
Ilya Shipitsin
c398459ebf
Merge pull request #627 from thepyper/master
Merge PR #627: musl support
2018-08-12 19:08:30 +05:00
Ilya Shipitsin
a7933800d0 src/Cedar/Logging.c: remove logically dead code
found by coverity
2018-08-12 16:22:09 +05:00
Ilya Shipitsin
2103520728 src/Cedar/Server.c: remove logically dead code
found by coverity
2018-08-12 16:19:29 +05:00
Ilya Shipitsin
b8af87adc1 src/Cedar/Interop_OpenVPN.c: remove logically dead code
found by coverity
2018-08-12 16:17:56 +05:00
Ilya Shipitsin
981e8d0e77 src/Cedar/Protocol.c: remove logically dead code
found by coverity
2018-08-12 16:15:53 +05:00
Ilya Shipitsin
e302cb5f74 src/Cedar/IPsec_PPP.c: remove logically dead code
found by coverity
2018-08-12 16:12:48 +05:00
Ilya Shipitsin
595245cd45 src/Cedar/IPsec_PPP.c: remove logically dead code
found by coverity
2018-08-12 16:07:13 +05:00
Ilya Shipitsin
ad41d54b29 src/Cedar/Command.c: remove logically dead code
found by coverity
2018-08-12 16:03:10 +05:00
Ilya Shipitsin
1fd17c266a src/Mayaqua/Str: remove unused functions
[src/Mayaqua/Str.c:3019]: (style) The function 'CopyFormat' is never used.
[src/Mayaqua/Str.c:280]: (style) The function 'HexToInt64' is never used.
[src/Mayaqua/Str.c:2448]: (style) The function 'InChar' is never used.
[src/Mayaqua/Str.c:745]: (style) The function 'IniHasValue' is never used.
[src/Mayaqua/Str.c:692]: (style) The function 'IniInt64Value' is never used.
[src/Mayaqua/Str.c:726]: (style) The function 'IniUniStrValue' is never used.
[src/Mayaqua/Str.c:2138]: (style) The function 'IsPrintableAsciiStr' is never used.
[src/Mayaqua/Str.c:1045]: (style) The function 'NormalizeCrlf' is never used.
[src/Mayaqua/Str.c:2899]: (style) The function 'ReplaceFormatStringFor64' is never used.
[src/Mayaqua/Str.c:2442]: (style) The function 'SearchStri' is never used.
[src/Mayaqua/Str.c:3345]: (style) The function 'StrCheckSize' is never used.
[src/Mayaqua/Str.c:1386]: (style) The function 'StrListToStr' is never used.
[src/Mayaqua/Str.c:348]: (style) The function 'ToHex64' is never used.
[src/Mayaqua/Str.c:2803]: (style) The function 'ToStri' is never used.
[src/Mayaqua/Str.c:2797]: (style) The function 'ToStrx' is never used.
[src/Mayaqua/Str.c:2791]: (style) The function 'ToStrx8' is never used.
[src/Mayaqua/Str.c:1325]: (style) The function 'TokenListToList' is never used.
2018-08-12 15:34:51 +05:00
Davide Beatrici
d3fc90f4e0
Merge PR #641: resolve several issues found by coverity 2018-08-12 12:28:49 +02:00
Davide Beatrici
3e4a2cabd8
Merge PR #640: Protocol: remove RC4 related stuff 2018-08-12 12:20:04 +02:00
Davide Beatrici
c9b56bf590
Merge PR #639: Encrypt: support NULL message digest 2018-08-12 12:19:30 +02:00
Davide Beatrici
97a9070269
Merge PR #638: Interop_OpenVPN.c: convert the cipher name to lowercase prior to calling EVP_get_cipherbyname() 2018-08-12 12:18:50 +02:00
Ilya Shipitsin
35dc165651 src/Cedar/IPsec_PPP.c: avoid unintentional integer overflow
found by coverity
2018-08-12 15:10:44 +05:00
Ilya Shipitsin
3da4a9c5e3 src/Cedar/Hub.c: avoid unintentional integer overflow
found by coverity
2018-08-12 15:09:18 +05:00
Ilya Shipitsin
cb55ba6e7f src/Cedar/Session.c: avoid unintentional integer overflow
found by coverity
2018-08-12 15:07:34 +05:00
Ilya Shipitsin
89e3eb5ada src/Cedar/IPsec_IKE.c: avoid unintentional integer overflow
found by coverity
2018-08-12 15:05:48 +05:00
Ilya Shipitsin
2be6128e23 src/Cedar/IPsec_PPP.c: Array compared against NULL is always false
found by coverity
2018-08-12 15:00:17 +05:00
Ilya Shipitsin
b8d5a85b0e src/Cedar/Client.c: Array compared against NULL is always false
found by coverity
2018-08-12 14:59:08 +05:00
Ilya Shipitsin
4f02bafc66 src/Mayaqua/Cfg.c: Array compared against NULL is always false
found by coverity
2018-08-12 14:56:44 +05:00
Ilya Shipitsin
2e503640ab
Merge pull request #637 from SoftEtherVPN/moatazelmasry2-fix-manual-installation-doc
Merge PR #637: Change the order of commands SE manual installation docs
2018-08-12 11:37:32 +05:00
Davide Beatrici
eb03d1c54b Protocol: remove RC4 related stuff 2018-08-12 04:07:39 +02:00
Davide Beatrici
3d13f56314 Encrypt: support NULL message digest 2018-08-12 01:53:30 +02:00
Davide Beatrici
9bac21b52e Encrypt.c: add warning for when EVP_get_cipherbyname() fails 2018-08-12 01:09:10 +02:00
Davide Beatrici
3e733eac6f Interop_OpenVPN.c: convert the cipher name to lowercase prior to calling EVP_get_cipherbyname()
OpenVPN sends the cipher name in uppercase, even if it's not standard, thus we have to convert it to lowercase for EVP_get_cipherbyname().

We also have to send the cipher name as it was received from the OpenVPN client, unless it's a different cipher, to prevent a message such as:
"WARNING: 'cipher' is used inconsistently, local='cipher AES-128-GCM', remote='cipher aes-128-gcm'"
It happens because OpenVPN uses "strcmp()" to compare the local and remote parameters: a6fd48ba36/src/openvpn/options.c (L3819-L3831)

See https://github.com/openssl/openssl/issues/6921 for EVP_get_cipherbyname().
2018-08-12 01:03:56 +02:00
Ilya Shipitsin
dd2c1c0dcd src/Cedar/DDNS.c: "interval" is unsigned, so MIN can only return 0
found by coverity
2018-08-11 21:49:27 +02:00
Ilya Shipitsin
b8081e239a src/Mayaqua/Cfg.c: "sub" is not assigned any value, no need to free it
found by coverity
2018-08-11 21:49:27 +02:00
Ilya Shipitsin
5d2b977b4b src/Mayaqua/FileIO.c: guard win32_drive_char with "#ifdef OS_WIN32"
to avoid coverity warning
2018-08-11 21:49:27 +02:00
Ilya Shipitsin
c3bf75e8e0 src/Mayaqua/Network.c: refactor code to eliminate coverity issue 2018-08-11 21:49:20 +02:00
Moataz Elmasry
ed594cae6b
Change the order of commands SE manual installation docs 2018-08-11 21:03:56 +02:00
Davide Beatrici
a73fb8c4e7
Merge PR #635: Add recursive checkout to gitlab-ci, also specify g++ as build dependency 2018-08-11 14:20:36 +02:00
Ilya Shipitsin
c6fc0ccad4 BUILD_UNIX.md: add g++ as a build requirement for cpu_features 2018-08-11 15:02:50 +05:00
Davide Beatrici
1e66d3f53f
Merge PR #633: Encrypt.c: don't use deprecated OpenSSL functions 2018-08-11 07:08:23 +02:00
Davide Beatrici
4da4fbeca0 Encrypt.c: don't use deprecated OpenSSL functions
/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c: In function 'RsaCheck':
/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:2307:3: warning: 'RSA_generate_key' is deprecated [-Wdeprecated-declarations]
   rsa = RSA_generate_key(bit, RSA_F4, NULL, NULL);
   ^~~
In file included from /usr/include/openssl/rsa.h:13:0,
                 from /usr/include/openssl/x509.h:31,
                 from /usr/include/openssl/ssl.h:50,
                 from /builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:127:
/usr/include/openssl/rsa.h:193:1: note: declared here
 DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
 ^

/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c: In function 'RsaGen':
/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:2377:3: warning: 'RSA_generate_key' is deprecated [-Wdeprecated-declarations]
   rsa = RSA_generate_key(bit, RSA_F4, NULL, NULL);
   ^~~
In file included from /usr/include/openssl/rsa.h:13:0,
                 from /usr/include/openssl/x509.h:31,
                 from /usr/include/openssl/ssl.h:50,
                 from /builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:127:
/usr/include/openssl/rsa.h:193:1: note: declared here
 DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
 ^

/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c: In function 'X509ToX':
/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:3435:7: warning: 'ASN1_STRING_data' is deprecated [-Wdeprecated-declarations]
       char *uri = (char *)ASN1_STRING_data(ad->location->d.uniformResourceIdentifier);
       ^~~~
In file included from /usr/include/openssl/bn.h:31:0,
                 from /usr/include/openssl/asn1.h:24,
                 from /usr/include/openssl/objects.h:916,
                 from /usr/include/openssl/evp.h:27,
                 from /usr/include/openssl/x509.h:23,
                 from /usr/include/openssl/ssl.h:50,
                 from /builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:127:
/usr/include/openssl/asn1.h:553:1: note: declared here
 DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
 ^

/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c: In function 'FreeOpenSSLThreadState':
/builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:3643:2: warning: 'ERR_remove_state' is deprecated [-Wdeprecated-declarations]
  ERR_remove_state(0);
  ^~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from /builds/SoftEther/SoftEtherVPN/src/Mayaqua/Encrypt.c:127:
/usr/include/openssl/err.h:248:1: note: declared here
 DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
 ^
2018-08-10 22:37:05 +02:00
Davide Beatrici
84c44fbe24 Console.c: fix "implicit declaration of function 'getch'" warning
/builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c: In function 'PasswordPrompt':
/builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c:2051:8: warning: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
    c = getch();
        ^~~~~
        getc
2018-08-10 21:22:36 +02:00
Davide Beatrici
49ed8770b8 VLanUnix: fix "implicit declaration of function 'FreeTap'" warning
In file included from /builds/SoftEther/SoftEtherVPN/src/Cedar/Bridge.c:130:0:
/builds/SoftEther/SoftEtherVPN/src/Cedar/BridgeUnix.c: In function 'CloseEth':
/builds/SoftEther/SoftEtherVPN/src/Cedar/BridgeUnix.c:1568:3: warning: implicit declaration of function 'FreeTap'; did you mean 'FreeCaps'? [-Wimplicit-function-declaration]
   FreeTap(e->Tap);
   ^~~~~~~
   FreeCaps
2018-08-10 21:21:19 +02:00
Davide Beatrici
a162dec76f CMake: add support for Debian packaging with CPack 2018-08-09 23:33:45 +02:00
thepyper
6f1a2f6b71 Fixed build on non-musl systems 2018-08-09 09:00:16 +02:00
Davide Beatrici
02db806181 Remove SSLv3 support 2018-08-09 00:25:40 +02:00
thepyper
9fff64b6f3
Update BUILD_UNIX.md
fix typo
2018-08-08 15:16:26 +00:00
thepyper
e7d8d698a2
Update BUILD_UNIX.md
Added a note on building on musl-based linux.
2018-08-08 15:14:18 +00:00
thepyper
3b4e8fd9fa musl support
Internat.c: fix iconv() with musl by removing unrecognized EUCJP encoding
src/CMakeFiles.txt: recognize USE_MUSL=YES environment variable to compile with musl
2018-08-08 16:02:20 +02:00
MtCedarNet
dd24472089 Change 'Don't use TLS' to 'Use SSL 3.0' to clarify the danger.
Committer: MtCedarNet <mtcedar@hotmail.com>
2018-08-08 19:09:44 +09:00
Ilya Shipitsin
d65f292888
Merge pull request #615 from prodatakey/foreground-logging
Merge PR #615: Foreground logging
2018-08-08 08:51:41 +05:00
Davide Beatrici
46ee5b00a3 BUILD_UNIX.md: add commands to checkout the submodule(s) 2018-08-07 02:18:28 +02:00
Ilya Shipitsin
6c9a0ddbfe src/Mayaqua/FileIO: remove unused functions
[src/Mayaqua/FileIO.c:2299]: (style) The function 'ConvertPath' is never used.
[src/Mayaqua/FileIO.c:728]: (style) The function 'ConvertSafeFileNameW' is never used.
[src/Mayaqua/FileIO.c:2359]: (style) The function 'DeleteDirInner' is never used.
[src/Mayaqua/FileIO.c:2232]: (style) The function 'FileCloseAndDelete' is never used.
[src/Mayaqua/FileIO.c:2748]: (style) The function 'FileCreateInner' is never used.
[src/Mayaqua/FileIO.c:2537]: (style) The function 'FileDeleteInner' is never used.
[src/Mayaqua/FileIO.c:2858]: (style) The function 'FileOpenInner' is never used.
[src/Mayaqua/FileIO.c:2276]: (style) The function 'FileRenameInner' is never used.
[src/Mayaqua/FileIO.c:680]: (style) The function 'FileReplaceRename' is never used.
[src/Mayaqua/FileIO.c:2581]: (style) The function 'FileSizeEx' is never used.
[src/Mayaqua/FileIO.c:2812]: (style) The function 'FileWriteAll' is never used.
[src/Mayaqua/FileIO.c:1992]: (style) The function 'GetCurrentDir' is never used.
[src/Mayaqua/FileIO.c:765]: (style) The function 'GetDiskFreeW' is never used.
[src/Mayaqua/FileIO.c:1852]: (style) The function 'IsFileExistsInner' is never used.
[src/Mayaqua/FileIO.c:235]: (style) The function 'IsFileWriteLocked' is never used.
[src/Mayaqua/FileIO.c:2494]: (style) The function 'MakeDirInner' is never used.
[src/Mayaqua/FileIO.c:1568]: (style) The function 'MakeSafeFileNameW' is never used.
[src/Mayaqua/FileIO.c:1941]: (style) The function 'ParseSplitedPath' is never used.
[src/Mayaqua/FileIO.c:995]: (style) The function 'SafeFileNameW' is never used.
[src/Mayaqua/FileIO.c:2369]: (style) The function 'FileSizeExW' is never used.
[src/Mayaqua/FileIO.c:1848]: (style) The function 'GetCurrentDirW' is never used.
2018-08-06 22:57:25 +05:00
Joshua Perry
e1bc2fd055 Remove last priority flag in deference to queue size checks 2018-08-06 10:28:37 -06:00
Joshua Perry
b536cb93f4 ifdef out foreground check on windows 2018-08-06 09:44:42 -06:00
Mikhail Pridushchenko
02da8079ee UNIX services write logs to stdout
To better adopt SoftEther VPN for execution in Docker container all
services output logs to stdout if running in foreground.
2018-08-06 08:51:24 -06:00
Mikhail Pridushchenko
825931e11c Implement foreground mode for Unix services
Add '--foreground' command line parameter. When provided, it prevents
Unix service from running in daemon mode.
Update help message.
2018-08-06 08:51:13 -06:00
Davide Beatrici
b70d81b5a8
Merge PR #613: WinUi: remove unused functions 2018-08-06 14:56:49 +02:00
Davide Beatrici
21e9bb354e WinUi: remove unneeded WinUiDebugInit() and WinUiDebugFree() functions 2018-08-06 14:45:54 +02:00
Ilya Shipitsin
005b5ebeca src/Cedar/WinUi: remove unused functions
[src/Cedar/WinUi.c:7240]: (style) The function 'CbInsertStr' is never used.
[src/Cedar/WinUi.c:9271]: (style) The function 'CheckTextLen' is never used.
[src/Cedar/WinUi.c:9252]: (style) The function 'CheckTextSize' is never used.
[src/Cedar/WinUi.c:8936]: (style) The function 'DialogCreateEx' is never used.
[src/Cedar/WinUi.c:2155]: (style) The function 'EndFreeInfoDlg' is never used.
[src/Cedar/WinUi.c:2171]: (style) The function 'ExecuteHamcoreExe' is never used.
[src/Cedar/WinUi.c:9885]: (style) The function 'FormatTextA' is never used.
[src/Cedar/WinUi.c:9323]: (style) The function 'GetFontSize' is never used.
[src/Cedar/WinUi.c:9841]: (style) The function 'GetMonitorSize' is never used.
[src/Cedar/WinUi.c:9759]: (style) The function 'GetWindowClientRect' is never used.
[src/Cedar/WinUi.c:1134]: (style) The function 'GetWizardPageIndex' is never used.
[src/Cedar/WinUi.c:3964]: (style) The function 'IpClear' is never used.
[src/Cedar/WinUi.c:6851]: (style) The function 'LbAddStr' is never used.
[src/Cedar/WinUi.c:6824]: (style) The function 'LbFindStr' is never used.
[src/Cedar/WinUi.c:7064]: (style) The function 'LbGetSelect' is never used.
[src/Cedar/WinUi.c:6812]: (style) The function 'LbGetStr' is never used.
[src/Cedar/WinUi.c:6900]: (style) The function 'LbInsertStr' is never used.
[src/Cedar/WinUi.c:7012]: (style) The function 'LbSetHeight' is never used.
[src/Cedar/WinUi.c:3652]: (style) The function 'LedDrawRect' is never used.
[src/Cedar/WinUi.c:6000]: (style) The function 'LvGetMaskedNum' is never used.
[src/Cedar/WinUi.c:6037]: (style) The function 'LvSearchStr_' is never used.
[src/Cedar/WinUi.c:5703]: (style) The function 'LvSetItemImage' is never used.
[src/Cedar/WinUi.c:5831]: (style) The function 'LvShow' is never used.
[src/Cedar/WinUi.c:10155]: (style) The function 'NoTop' is never used.
[src/Cedar/WinUi.c:10047]: (style) The function 'NoticeSettingChange' is never used.
[src/Cedar/WinUi.c:7854]: (style) The function 'PkcsUtil' is never used.
[src/Cedar/WinUi.c:8968]: (style) The function 'SetBitmap' is never used.
[src/Cedar/WinUi.c:4539]: (style) The function 'SetMenuItemEnable' is never used.
[src/Cedar/WinUi.c:9918]: (style) The function 'SetTextEx' is never used.
[src/Cedar/WinUi.c:9940]: (style) The function 'SetTextExA' is never used.
[src/Cedar/WinUi.c:11272]: (style) The function 'SetWinUiTitle' is never used.
[src/Cedar/WinUi.c:2132]: (style) The function 'StartFreeInfoDlg' is never used.
[src/Cedar/WinUi.c:3920]: (style) The function 'UiTest' is never used.
[src/Cedar/WinUi.c:1558]: (style) The function 'WinConnectEx2' is never used.
[src/Cedar/WinUi.c:10803]: (style) The function 'WinUiDebug' is never used.
[src/Cedar/WinUi.c:6908]: (style) The function 'CbInsertStr9xA' is never used.
[src/Cedar/WinUi.c:2096]: (style) The function 'FreeInfoThread' is never used.
[src/Cedar/WinUi.c:9644]: (style) The function 'GetTextSize' is never used.
[src/Cedar/WinUi.c:2833]: (style) The function 'GetWindowAndControlSizeResizeScale' is never used.
[src/Cedar/WinUi.c:2001]: (style) The function 'IsRegistedToDontShowFreeEditionDialog' is never used.
[src/Cedar/WinUi.c:6606]: (style) The function 'LbAddStrA' is never used.
[src/Cedar/WinUi.c:6739]: (style) The function 'LbGetSelectIndex' is never used.
[src/Cedar/WinUi.c:6627]: (style) The function 'LbInsertStrA' is never used.
[src/Cedar/WinUi.c:7593]: (style) The function 'PkcsUtilProc' is never used.
[src/Cedar/WinUi.c:6598]: (style) The function 'LbSelect' is never used.
[src/Cedar/WinUi.c:7421]: (style) The function 'PkcsUtilErase' is never used.
[src/Cedar/WinUi.c:7349]: (style) The function 'PkcsUtilWrite' is never used.
[src/Cedar/WinUi.c:2059]: (style) The function 'ShowFreeInfoDialog' is never used.
[src/Cedar/WinUi.c:2013]: (style) The function 'FreeInfoDialogProc' is never used.
[src/Cedar/WinUi.c:6558]: (style) The function 'LbFindData' is never used.
[src/Cedar/WinUi.c:6534]: (style) The function 'LbSelectIndex' is never used.
[src/Cedar/WinUi.c:6488]: (style) The function 'LbGetData' is never used.
[src/Cedar/WinUi.c:6464]: (style) The function 'LbNum' is never used.
[src/Cedar/WinUi.c:2001]: (style) The function 'RegistToDontShowFreeEditionDialog' is never used.
2018-08-06 13:43:23 +05:00
Ilya Shipitsin
e969749bc1 initialize variables (it makes coverity a bit happier) 2018-08-06 12:40:06 +05:00
Davide Beatrici
59000e04cc Merge PR #335: Retry connection on untrusted server certificate 2018-08-05 21:15:52 +02:00
Joshua Perry
28e8d4bcce Retry connection on untrusted server certificate
With server certificate validation enabled, vpnclient unconditionally
stopped connection on untrusted server certificate. Added account
configuration parameter to retry connection if server certivicate failed
validation.
2018-08-05 20:48:16 +02:00
Davide Beatrici
d4d17549c4
Merge PR #337: Put TUN down on client disconnect. 2018-08-05 20:16:50 +02:00
Davide Beatrici
190ad01eb7 Memory: restore CloneList() function which was removed in #608 2018-08-05 20:08:37 +02:00
Ilya Shipitsin
191c680ff7 src/Cedar/Admin.c: remove unused condition, make coverity scan cleaner
HubName == NULL  always evaluated as "false", so we can remove it
2018-08-05 22:33:16 +05:00
Joshua Perry
59e1483dbf Put TUN down on client disconnect.
On startup client creates TUN interface in UP state and kept it UP even
if connection to the server was lost. Creating interface in DOWN state,
turning it UP on successful (re-)connection to server and DOWN on either
disconnect or connection loss would enable DHCP client (say dhclient5)
to detect necessity for lease renewal.

Added a client configuration parameter to create TUN interface in DOWN
state and commands to enable, disable, and query the configuration
parameter.
Enabling the parameter causes client to put all unused TUN interfaces
DOWN, create new TUN interfaces in DOWN state, and turn TUN interfaces
corresponding to active sessions DOWN on connection loss or
disconnecting from server.
Disabling the parameter forces client to turn all TUN interfaces UP and
create new TUN interfaces in UP state.
Default value is 'Disable'.
2018-08-05 17:36:05 +02:00
Davide Beatrici
564a3df4fc
Merge PR #607: resolve several trivial issues found by Coverity 2018-08-05 16:54:45 +02:00
Ilya Shipitsin
b859b76008 remove unused variable "g_zero" 2018-08-05 19:33:44 +05:00
Davide Beatrici
30a554c190
Merge PR #593: Unix.c: don't use hardcoded path to call "ethtool" 2018-08-05 16:00:25 +02:00
Ilya Shipitsin
e795b5014d resolve string format issue found by coverity 2018-08-05 15:56:03 +05:00
Ilya Shipitsin
f778405164 src/Mayaqua/Memory: remove unused functions
[src/Mayaqua/Memory.c:2605]: (style) The function 'ClearFifo' is never used.
[src/Mayaqua/Memory.c:1380]: (style) The function 'CloneList' is never used.
[src/Mayaqua/Memory.c:4267]: (style) The function 'CloneTail' is never used.
[src/Mayaqua/Memory.c:1972]: (style) The function 'DelAllInt' is never used.
[src/Mayaqua/Memory.c:2068]: (style) The function 'DelInt64' is never used.
[src/Mayaqua/Memory.c:1789]: (style) The function 'DeleteKey' is never used.
[src/Mayaqua/Memory.c:2934]: (style) The function 'DumpData' is never used.
[src/Mayaqua/Memory.c:835]: (style) The function 'FillBytes' is never used.
[src/Mayaqua/Memory.c:2759]: (style) The function 'GetFifoCurrentReallocMemSize' is never used.
[src/Mayaqua/Memory.c:1475]: (style) The function 'InsertDistinct' is never used.
[src/Mayaqua/Memory.c:2274]: (style) The function 'InsertInt64Distinct' is never used.
[src/Mayaqua/Memory.c:1612]: (style) The function 'IsInListUniStr' is never used.
[src/Mayaqua/Memory.c:2647]: (style) The function 'LockFifo' is never used.
[src/Mayaqua/Memory.c:1120]: (style) The function 'PeekQueue' is never used.
[src/Mayaqua/Memory.c:2158]: (style) The function 'RandomizeList' is never used.
[src/Mayaqua/Memory.c:1364]: (style) The function 'SetCmp' is never used.
[src/Mayaqua/Memory.c:1570]: (style) The function 'SetSortFlag' is never used.
[src/Mayaqua/Memory.c:1596]: (style) The function 'SortEx' is never used.
[src/Mayaqua/Memory.c:3718]: (style) The function 'Swap' is never used.
[src/Mayaqua/Memory.c:2659]: (style) The function 'UnlockFifo' is never used.
[src/Mayaqua/Memory.c:2532]: (style) The function 'WriteFifoFront' is never used.
[src/Mayaqua/Memory.c:1981]: (style) The function 'InsertInt64' is never used.
[src/Mayaqua/Memory.c:2317]: (style) The function 'PadFifoFront' is never used.
[src/Mayaqua/Memory.c:2155]: (style) The function 'PeekFifo' is never used.
2018-08-05 15:10:29 +05:00
Ilya Shipitsin
4b08ce9172 resolve trivial coverity finding:
Assigning value 3000U to info->OsType here, but that stored value is overwritten before it can be used.
2018-08-05 12:08:56 +05:00
Ilya Shipitsin
1c0b961aa5 remove DoNothing function (improves coverity reports) 2018-08-05 12:00:39 +05:00
Davide Beatrici
73371087ef
Merge PR #605: Mayaqua: use "cpu_features" to check whether AES-NI is supported 2018-08-03 19:05:23 +02:00
Davide Beatrici
632e86d1e5 src: remove unused VGate project 2018-08-03 16:19:33 +02:00
Davide Beatrici
d3af4d6f26 Mayaqua: use "cpu_features" to check whether AES-NI is supported 2018-08-03 14:17:26 +02:00
Davide Beatrici
2a37d6aa7b Mayaqua: add "cpu_features" submodule 2018-08-03 12:32:16 +02:00
Davide Beatrici
c2b9fb3b10
Merge PR #602: Encrypt: remove unused functions detected by Cppcheck 2018-08-03 10:31:32 +02:00
James Brink
d78474a1a6 Fixed typo 2018-08-02 15:23:30 -07:00
Davide Beatrici
8b244ce660 Encrypt: remove unused functions detected by Cppcheck 2018-08-02 23:44:39 +02:00
Davide Beatrici
517fed85a1 Str: remove unused IsStrInStrTokenList() function 2018-08-02 18:14:57 +02:00
Davide Beatrici
0d096961b7 Interop_OpenVPN: remove lists of supported encryption and hash algorithms
They are not required as OvsGetCipher() checks if the cipher is available and fallbacks to the default one in case it's not.
2018-08-02 16:18:41 +02:00
Davide Beatrici
4061cfe665
Merge PR #584: Mayaqua: use included zlib headers only on Windows 2018-07-31 19:56:36 +02:00
Andy Walsh
0bbf08fea7 cmake: lib cleanup and use cmake package_find
* use OPENSSL_ROOT_DIR
* add special .configure handling for osx
* move readline, curses to cedar

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2018-07-31 18:11:13 +02:00
Davide Beatrici
66b2d7234d Mayaqua: use included zlib headers only on Windows
zlib doesn't have a dedicated directory on Unix systems, because it has a single header, meaning that the header from the repository was being used instead.

This commit moves the header to the Windows includes directory, so that we can use the proper include path on all systems.
2018-07-31 07:56:52 +02:00
Davide Beatrici
ce5ee2b070
Merge PR #589: src: remove unused Ham project 2018-07-31 07:41:58 +02:00
Davide Beatrici
43dfd0032b
Merge PR #587: src: remove obsolete VPN Branding Kit 2018-07-31 07:41:33 +02:00
Davide Beatrici
a99a9351e3
Merge PR #590: Fix compilation with Visual Studio 2017's toolchain 2018-07-30 21:21:20 +02:00
Davide Beatrici
097369849b Unix.c: don't use hardcoded path to call "ethtool" 2018-07-30 06:35:02 +02:00
Davide Beatrici
8904a9c4cd CopyBuildUtil.cmd: fix copy failure when the path contains whitespaces 2018-07-30 06:05:24 +02:00
Davide Beatrici
ee383994f0 Internat.c: use correct wcstok() signature (3 arguments)
The wcstok() function uses the standard signature since Visual Studio 2015.
2018-07-29 09:56:47 +02:00
Davide Beatrici
e720cf657b CM.c: add missing <security.h> header 2018-07-29 09:44:59 +02:00
Shadus Black
d00d9dfdf1 BUILD_WINDOWS.md: add more info regarding the software and provide download links 2018-07-29 05:47:55 +02:00
Davide Beatrici
f0d0b5a89c BUILD_WINDOWS.md: convert CRLF to LF 2018-07-29 05:46:26 +02:00
Davide Beatrici
24d23feacf src: remove unused Ham project 2018-07-29 03:39:27 +02:00
Davide Beatrici
0b77ebdbaa src: remove obsolete VPN Branding Kit 2018-07-29 03:10:23 +02:00
Davide Beatrici
110f2291a2
Merge PR #582: Encrypt.c: check whether OpenSSL compression and FIPS features are available 2018-07-27 08:40:15 +02:00
Davide Beatrici
14eb17e6ad
Merge PR #581: src: split CMakeLists.txt for each subdirectory 2018-07-27 04:47:26 +02:00
Andy Walsh
1b3f969fb0 add OPENSSL_NO_COMP feature check
Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2018-07-26 13:21:10 +02:00
Andy Walsh
ed5ae4a8fe fix missing openssl feature checks
* add OPENSSL_FIPS feature check

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2018-07-26 13:18:47 +02:00
Davide Beatrici
be0e3cfb61
Merge PR #438: Solaris: use DLPI style 1 attachment and check for /dev/net used by Illumos and Solaris 10+. 2018-07-26 09:06:54 +02:00
Davide Beatrici
8f3a4cc3b3
Merge PR #481: Encrypt: set default RSA key size to 1024 everywhere, using the RSA_KEY_SIZE macro 2018-07-26 07:29:28 +02:00
Davide Beatrici
0a839bcc0b
Merge PR #559: Windows: suppress detailed build output 2018-07-26 06:51:10 +02:00
Davide Beatrici
07ed7e1626 src: split CMakeLists.txt for each subdirectory 2018-07-26 06:44:19 +02:00
William Welliver
e3e38873d1 Solaris: use DLPI style 1 attachment and check for /dev/net used by Illumos and Solaris 10+. 2018-07-26 03:21:05 +02:00
Ilya Shipitsin
65bda6a44d
Merge pull request #484 from davidebeatrici/openssl
Encrypt: improve FreeOpenSSLThreadState() and FreeCryptLibrary(), in order to clean up the library correctly
2018-07-26 02:50:55 +05:00
Ilya Shipitsin
6d7ab487b4 improve unix build documentation as discussed in PR#558 2018-07-26 00:41:21 +05:00
Ilya Shipitsin
a0c2b5891c
Merge pull request #558 from scegg/patch-1
change ./configure to cmake .
2018-07-26 00:21:46 +05:00
Andy Walsh
4f6bedf6d9 cmake fix pthread detection
* dont treat pthreads like a normal lib

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2018-07-25 12:50:17 +02:00
Olimjon
c3a06d637e
Partial translation into Russian 2018-07-22 14:33:13 +05:00
Olimjon
bc43913881
Add Russian language to translate.txt 2018-07-22 13:59:55 +05:00
Davide Beatrici
879dc8f6b8 Mayaqua.c: fix code style broken by #560 2018-07-21 10:27:21 +02:00
Ilya Shipitsin
1b4cc1fb8d
Merge pull request #560 from jbwdevries/certificate_date_fixes
Certificate date fixes
2018-07-21 10:45:09 +05:00
Davide Beatrici
412a5aea71
Merge PR #485: Encrypt: use OpenSSL's EVP interface, which supports AES-NI without the need of another library 2018-07-21 05:31:09 +02:00
Davide Beatrici
23fd1fc94e
Merge PR #473: IPC: use hostname as client identifier, if available 2018-07-21 05:19:14 +02:00
Davide Beatrici
360273b912
Merge PR #472: OpenVPN: hostname support 2018-07-21 05:15:14 +02:00
Davide Beatrici
4b58f3f2e4
Merge PR #566: HubName has to be set after Copy 2018-07-21 05:11:05 +02:00
hoppler
b0a2a95540
HubName has to be set after Copy
Hubname has to be set after copy or it will be an empty string. To get the real hubname (correct casing) we use it directly from the hub instead of the given parameter
2018-06-30 10:51:49 +02:00
Johan de Vries
41f9cdadc4 src/Mayaqua/Kernel.c: Fix for times before 1970
Before, it would end up far in the future. Now it gets clamped
to 1970. This should be fine since dates before 1970 are not
actively used. If they are, then the UINT64 should be replaced
by the time64t in quite a few places.
2018-06-21 10:03:58 +02:00
Johan de Vries
3d0e87cf57 src/Mayaqua/Encrypt.c: Add support for certificates with full year 2018-06-21 10:03:23 +02:00
Ilya Shipitsin
c84d7e4a27 supress even more detailed messages 2018-06-17 13:02:58 +05:00
Ilya Shipitsin
16a1d1f7a0 suppress detailed output 2018-06-17 12:42:33 +05:00
Ilya Shipitsin
6a1876ad06 src/Mayaqua/Network: remove unused functions
[src/Mayaqua/Network.c:7831]: (style) The function 'CheckSubnetLength6' is never used.
[src/Mayaqua/Network.c:14663]: (style) The function 'CheckTCPPortThread' is never used.
[src/Mayaqua/Network.c:6876]: (style) The function 'CheckUnicastAddress' is never used.
[src/Mayaqua/Network.c:8220]: (style) The function 'CompareTcpTable' is never used.
[src/Mayaqua/Network.c:7825]: (style) The function 'CopyIP' is never used.
[src/Mayaqua/Network.c:18436]: (style) The function 'DelSockList' is never used.
[src/Mayaqua/Network.c:549]: (style) The function 'DisableRUDPRegisterGlobally' is never used.
[src/Mayaqua/Network.c:12161]: (style) The function 'DisableUDPChecksum' is never used.
[src/Mayaqua/Network.c:6679]: (style) The function 'GenerateEui64GlobalAddress' is never used.
[src/Mayaqua/Network.c:6953]: (style) The function 'GenerateMulticastMacAddress6' is never used.
[src/Mayaqua/Network.c:7055]: (style) The function 'GetAllFilledAddress6' is never used.
[src/Mayaqua/Network.c:11415]: (style) The function 'GetBestRouteEntryFromRouteTable' is never used.
[src/Mayaqua/Network.c:16738]: (style) The function 'GetIP46Any4' is never used.
[src/Mayaqua/Network.c:16771]: (style) The function 'GetIP46Any6' is never used.
[src/Mayaqua/Network.c:16250]: (style) The function 'GetMachineIp' is never used.
[src/Mayaqua/Network.c:12192]: (style) The function 'GetNewAvailableUdpPortRand' is never used.
[src/Mayaqua/Network.c:11073]: (style) The function 'GetNumWaitThread' is never used.
[src/Mayaqua/Network.c:561]: (style) The function 'GetSimpleHostname' is never used.
[src/Mayaqua/Network.c:22688]: (style) The function 'GetSniNameFromPreSslConnection' is never used.
[src/Mayaqua/Network.c:15761]: (style) The function 'GetSocketBufferSize' is never used.
[src/Mayaqua/Network.c:6924]: (style) The function 'GetSoliciationMulticastAddr6' is never used.
[src/Mayaqua/Network.c:7842]: (style) The function 'GetTcpProcessIdFromSocket' is never used.
[src/Mayaqua/Network.c:7871]: (style) The function 'GetTcpProcessIdFromSocketReverse' is never used.
[src/Mayaqua/Network.c:20709]: (style) The function 'GetUdpListenerPortList' is never used.
[src/Mayaqua/Network.c:21971]: (style) The function 'HttpSendServerError' is never used.
[src/Mayaqua/Network.c:7119]: (style) The function 'IPNot4' is never used.
[src/Mayaqua/Network.c:7134]: (style) The function 'IPOr4' is never used.
[src/Mayaqua/Network.c:17392]: (style) The function 'IPToStr128' is never used.
[src/Mayaqua/Network.c:12182]: (style) The function 'InitAsyncSocket' is never used.
[src/Mayaqua/Network.c:18091]: (style) The function 'IsIPLocalOrPrivate' is never used.
[src/Mayaqua/Network.c:6813]: (style) The function 'IsInSameLocalNetworkToMe4' is never used.
[src/Mayaqua/Network.c:467]: (style) The function 'IsInStrByStrList' is never used.
[src/Mayaqua/Network.c:504]: (style) The function 'IsIpInStrList' is never used.
[src/Mayaqua/Network.c:18793]: (style) The function 'IsIpStr46' is never used.
[src/Mayaqua/Network.c:738]: (style) The function 'IsMacAddressLocal' is never used.
[src/Mayaqua/Network.c:8495]: (style) The function 'IsNetworkAddress' is never used.
[src/Mayaqua/Network.c:7803]: (style) The function 'IsSameIPVer' is never used.
[src/Mayaqua/Network.c:14140]: (style) The function 'Listen6' is never used.
[src/Mayaqua/Network.c:5792]: (style) The function 'ListenAnyPortEx' is never used.
[src/Mayaqua/Network.c:11938]: (style) The function 'LockOpenSSL' is never used.
[src/Mayaqua/Network.c:12266]: (style) The function 'NewRandPortByMachineAndExePath' is never used.
[src/Mayaqua/Network.c:8191]: (style) The function 'PrintTcpTableList' is never used.
[src/Mayaqua/Network.c:4773]: (style) The function 'RUDPGetRandPortNumber' is never used.
[src/Mayaqua/Network.c:1637]: (style) The function 'RUDPSetSourceIpValidationForceDisable' is never used.
[src/Mayaqua/Network.c:11157]: (style) The function 'RenewDhcp' is never used.
[src/Mayaqua/Network.c:12057]: (style) The function 'SendTo6' is never used.
[src/Mayaqua/Network.c:8691]: (style) The function 'SetNetworkReleaseMode' is never used.
[src/Mayaqua/Network.c:18903]: (style) The function 'StrToMask46' is never used.
[src/Mayaqua/Network.c:20013]: (style) The function 'UdpListenerGetPublicPortList' is never used.
[src/Mayaqua/Network.c:20608]: (style) The function 'UdpListenerSendPacket' is never used.
[src/Mayaqua/Network.c:17545]: (style) The function 'UniStrToIP' is never used.
[src/Mayaqua/Network.c:8746]: (style) The function 'UnixCompareRouteEntryByMetric' is never used.
[src/Mayaqua/Network.c:8736]: (style) The function 'UnixIpForwardRowToRouteEntry' is never used.
[src/Mayaqua/Network.c:8741]: (style) The function 'UnixRouteEntryToIpForwardRow' is never used.
[src/Mayaqua/Network.c:11944]: (style) The function 'UnlockOpenSSL' is never used.
[src/Mayaqua/Network.c:7787]: (style) The function 'FreeTcpTableList' is never used.
[src/Mayaqua/Network.c:16024]: (style) The function 'GetIP46' is never used.
[src/Mayaqua/Network.c:7488]: (style) The function 'GetTcpTableFromEndPoint' is never used.
[src/Mayaqua/Network.c:7777]: (style) The function 'GetTcpTableList' is never used.
[src/Mayaqua/Network.c:6865]: (style) The function 'IPOr6' is never used.
[src/Mayaqua/Network.c:6642]: (style) The function 'IsNetworkAddress6' is never used.
[src/Mayaqua/Network.c:17942]: (style) The function 'StrToMask4' is never used.
[src/Mayaqua/Network.c:8296]: (style) The function 'UnixRenewDhcp' is never used.
[src/Mayaqua/Network.c:9337]: (style) The function 'Win32RenewDhcp' is never used.
2018-06-10 23:16:53 +05:00
Davide Beatrici
4029f3ae8d Rename IsIntelAesNiSupported() to IsAesNiSupported() 2018-06-09 20:31:27 +02:00
Davide Beatrici
420e575ab1 Remove Intel AES-NI library 2018-06-09 19:57:45 +02:00
Davide Beatrici
a7be140f85 Encrypt: use OpenSSL's EVP interface, which supports AES-NI without the need of another library 2018-06-09 19:57:45 +02:00
Davide Beatrici
2da755135a Encrypt: improve FreeOpenSSLThreadState() and FreeCryptLibrary(), in order to clean up the library correctly
https://wiki.openssl.org/index.php/Library_Initialization#Cleanup
2018-06-09 19:57:18 +02:00
Davide Beatrici
1fad008e1a Encrypt: set default RSA key size to 1024 everywhere, using the RSA_KEY_SIZE macro
This commit also fixes the problem described in #31, which was caused by the test key generated in RsaCheck() being too small for newer OpenSSL versions.
2018-06-09 19:56:51 +02:00
Davide Beatrici
ba75a32a9f IPC: use hostname as client identifier, if available
This allows a DHCP server to use the client ID as unique identifier, in order to correctly assign a static lease.

Previously this wasn't possible, as the client identifier was set to its MAC address, which is randomly generated.
2018-06-09 19:56:16 +02:00
Davide Beatrici
a5bd4b33da Hamcore: add "push-peer-info" and "UV_HOSTNAME" to the OpenVPN sample configuration 2018-06-09 19:55:03 +02:00
Davide Beatrici
970e217380 OpenVPN: merge OvsParseOptions() and OvsParsePeerInfo() into a single function 2018-06-09 19:55:03 +02:00