Commit Graph
100 Commits
Author SHA1 Message Date
Davide Beatrici 50d96aae81 Merge PR #698: Clean up Solaris device name parsing code to eliminate Coverity errors 2018-09-13 19:49:24 +02:00
Davide Beatrici 64b68c15f4 Merge PR #694: Proto_IkePacket.c: fix MD5, SHA-256, SHA-384 and SHA-512 implementation 2018-09-11 16:08:17 +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 bd81c17522 Merge PR #691: Cedar: replace "Interop_" and "IPsec_" with "Proto_" in the protocol-specific source/header files' names 2018-09-10 00:59:24 +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 553aaf9bad Travis CI: install to check if the files are copied correctly 2018-09-07 22:12:13 +02:00
Davide Beatrici afde7fb981 CMake: install systemd configuration files 2018-09-07 21:45:33 +02:00
Davide Beatrici ecfde04182 Merge PR #686: src/Cedar/Server: resolve possible null reference exception, remove unused functions, variable, duplicate assignment and conditional 2018-09-01 19:29:25 +02:00
Davide Beatrici e20bc8b162 Merge PR #685: src/Cedar/BridgeUnix.c: resolve possible null pointer dereference 2018-09-01 12:29:30 +02:00
Davide Beatrici e0c5cf9433 Merge PR #684: src/Mayaqua/Kernel: remove unused variable, functions 2018-09-01 11:44:55 +02:00
Davide Beatrici 0871c0b5d2 Merge PR #683: resolve several issues found by coverity 2018-08-30 22:26:43 +02:00
Davide Beatrici 3fcd8bc4a1 Merge PR #682: src/Cedar/Session: resolve coverity "issue", remove unused functions 2018-08-29 09:47:47 +02: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 e14893bbdf Merge PR #678: src/Mayaqua/Unix: remove unused code, improve readability of "ifdef" 2018-08-28 09:39:54 +02:00
Davide Beatrici 3f394d23c1 Merge PR #672: Unix.c: remove macOS-specific UnixGetTick64() implementation 2018-08-28 01:27:57 +02:00
Davide Beatrici 8f53bf23e7 Merge PR #676: Divide version in multiple macros and set build info in CMake 2018-08-27 07:24:53 +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 1c1aa5751e Merge PR #675: Cedar: fix segmentation fault during local bridge creation on FreeBSD 2018-08-27 00:59:56 +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
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
Davide Beatrici e530932df6 Merge PR #669: src/Mayaqua/Network.c: silence coverity on "Unchecked return value" 2018-08-23 10:50:30 +02: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
Davide Beatrici 2c9093b8eb Merge PR #666: Added Try+Except block for ProbeForRead 2018-08-23 04:16:05 +02:00
Davide Beatrici 2b855c8db7 Merge PR #665: src/Cedar/Client.c: remove redundant "if" statement, unused variable 2018-08-22 20:53:29 +02:00
Davide Beatrici 1b493cbf20 Merge PR #664: silence several coverity "issues" 2018-08-22 10:44:48 +02:00
Davide Beatrici 4b49540750 Merge PR #663: src/Mayaqua/Network: silence coverity, remove unused functions, variables 2018-08-21 23:53:16 +02: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
Davide Beatrici dbd4b9e7c2 Merge PR #661: resolve several coverity issues 2018-08-21 10:21:57 +02:00
Davide Beatrici 45d2a3ef02 Merge PR #660: resolve several coverity issues 2018-08-19 21:01:46 +02: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
Davide Beatrici 5f120e3c5e Merge PR #658: resolve several issues found by coverity 2018-08-17 22:11:27 +02:00
Davide Beatrici 088ed37d47 Merge PR #657: gitlab-ci: refactoring 2018-08-17 21:56:59 +02:00
Davide Beatrici b029676b67 Merge PR #648: CMake: add support for RPM packaging with CPack 2018-08-15 21:15:45 +02:00
Davide Beatrici a10df6d63f Merge PR #656: src/Cedar/Command: remove dead code, unused variables and functions 2018-08-15 21:14:37 +02:00
Davide Beatrici 3ec2e5174e Merge PR #649: Interop_OpenVPN: set "subnet" topology and remove workaround for "net30" topology on Win32 2018-08-15 06:16:11 +02:00
Davide Beatrici 60a421a781 Merge PR #655: GitLab: install "wget" 2018-08-15 06:00:24 +02: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
Davide Beatrici a109f28f1d GitLab: install "wget" 2018-08-14 23:43:44 +02:00
Davide Beatrici 88424e2522 Merge PR #653: GitLab: compile and install latest version of CMake 2018-08-14 23:34:18 +02:00
Davide Beatrici 79e2de6e25 Merge PR #654: src/Cedar/EtherLog: remove null dereference introduced in #650 2018-08-13 23:54:14 +02:00
Davide Beatrici 782e02a389 GitLab: compile and install latest version of CMake 2018-08-13 22:53:26 +02:00
Davide Beatrici fc0bd44392 Merge PR #650: resolve several issues identified by coverity 2018-08-13 22:32:28 +02:00
Davide Beatrici 0174f956e1 Merge PR #652: Mayaqua/Encrypt.c: fix invalid features.aes for mips, ppc 2018-08-13 19:41:52 +02:00
Davide Beatrici 7c72e008eb Merge PR #647: remove unused functions, variables 2018-08-13 06:37:43 +02:00
Davide Beatrici 8237fc329f Remove "centos" directory 2018-08-13 06:02:32 +02:00
Davide Beatrici de656ba1a7 CMake: add support for RPM packaging with CPack 2018-08-13 05:48:45 +02:00
Davide Beatrici 4ed7c559f1 Merge PR #646: travis-ci: small coverity fixes 2018-08-12 22:29:19 +02:00
Davide Beatrici 3a7b801ce5 CMake: change output directory from "bin" to "build" 2018-08-12 19:22:51 +02:00
Davide Beatrici cb8e2308a3 Merge PR #645: add coverity scan to travis-ci matrix 2018-08-12 19:08:19 +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
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
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: https://github.com/OpenVPN/openvpn/blob/a6fd48ba36ede465b0905a95568c3ec0d425ca71/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
Davide Beatrici 6764e24f20 Merge PR #636: fix several issues found by coverity 2018-08-11 22:07:01 +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
Davide Beatrici 580a870f31 Merge PR #634: configure: stop on any error 2018-08-11 14:17:49 +02: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 8a2901f48e Merge PR #632: Cedar: fix implicit function declaration warnings 2018-08-11 07:07:40 +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 e00a09b129 Merge PR #631: CMake: add support for Debian packaging with CPack 2018-08-10 17:31:21 +02:00
Davide Beatrici 005487c623 GitLab: create package with CMake 2018-08-10 17:06:14 +02:00
Davide Beatrici 8a064164c9 Travis: create package with CMake 2018-08-09 23:59:43 +02:00
Davide Beatrici 2d1d382678 Remove "debian" directory 2018-08-09 23:33:51 +02:00
Davide Beatrici a162dec76f CMake: add support for Debian packaging with CPack 2018-08-09 23:33:45 +02:00
Davide Beatrici 0d07ba30f2 Add project description in a dedicated file 2018-08-09 23:03:32 +02:00
Davide Beatrici 02db806181 Remove SSLv3 support 2018-08-09 00:25:40 +02:00
Davide Beatrici 19a917adc1 Merge PR #629: debian: try to initialize submodules on very early stage 2018-08-08 19:46:29 +02:00
Davide Beatrici b0101cba28 Merge PR #626: debian: switch packaging format from "quilt" to "native" 2018-08-08 16:51:43 +02:00
Davide Beatrici 70e1e844e9 Merge PR #624: Change 'Don't use TLS' to 'Use SSL 3.0' to clarify the danger. 2018-08-08 16:45:01 +02:00
Davide Beatrici d72836d6ac Merge PR #623: launchpad builds: add "git" as a build dependency 2018-08-07 18:53:01 +02:00
Davide Beatrici 920bc889e7 Merge PR #621: ignore temp cmake files, check whether cloned recursively 2018-08-07 17:52:58 +02:00
Davide Beatrici fc17a10c60 Merge PR #620: BUILD_UNIX.md: add commands to checkout the submodule(s) 2018-08-07 16:28:03 +02:00
Davide Beatrici 5b164610c0 Merge PR #622: add debian package builds to gitlab-ci.yml 2018-08-07 16:27:35 +02:00
Davide Beatrici 46ee5b00a3 BUILD_UNIX.md: add commands to checkout the submodule(s) 2018-08-07 02:18:28 +02:00
Davide Beatrici 93db70656d Merge PR #617: src/Mayaqua/FileIO: remove unused functions 2018-08-06 20:43:26 +02:00
Davide Beatrici 0b9bdc44f8 Merge PR #614: README.md: add GitLab repository 2018-08-06 15:37:44 +02:00
Davide Beatrici b3691d4481 README.md: add GitLab repository 2018-08-06 15:25:00 +02: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
Davide Beatrici 91bf0afb14 Merge PR #612: initialize variables (it makes coverity a bit happier) 2018-08-06 13:49:48 +02:00
Davide Beatrici 59000e04cc Merge PR #335: Retry connection on untrusted server certificate 2018-08-05 21:15:52 +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