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

272 Commits

Author SHA1 Message Date
Davide Beatrici
53e0a2e5e2 Add support for SOCKS5 proxy protocol 2018-10-30 15:11:16 +01:00
Davide Beatrici
c1f522c10e CMake: add support for Windows (Visual C++ 2017 toolset) 2018-10-24 21:25:57 +02: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
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
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
Daiyuu Nobori
8df347c093 Added OpenSSL 1.1.1 .lib files for Visual Studio 2008. 2018-10-09 20:30:03 +09:00
Davide Beatrici
03d78693a3
Merge PR #735: Debug flag and test mode improvements 2018-10-08 21:00:44 +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
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
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
9970d6f657 Mayaqua/Memory: move and adapt entry list functions from Cedar/Proto_OpenVPN 2018-10-06 22:41:35 +02:00
Davide Beatrici
34f443c0c7
Merge PR #718: src/Cedar/BridgeUnix.c: resolve null pointer dereference 2018-09-29 23:30:28 +02: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
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
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
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
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
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
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
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
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
Davide Beatrici
3f8fa9d5d9
Merge PR #673: Cedar: custom TAP interface name support for FreeBSD, function refactor 2018-08-28 14:08:03 +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
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