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

44 Commits

Author SHA1 Message Date
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
d3af4d6f26 Mayaqua: use "cpu_features" to check whether AES-NI is supported 2018-08-03 14:17:26 +02:00
Davide Beatrici
8b244ce660 Encrypt: remove unused functions detected by Cppcheck 2018-08-02 23:44:39 +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
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
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
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
Johan de Vries
3d0e87cf57 src/Mayaqua/Encrypt.c: Add support for certificates with full year 2018-06-21 10:03:23 +02:00
Davide Beatrici
4029f3ae8d Rename IsIntelAesNiSupported() to IsAesNiSupported() 2018-06-09 20:31:27 +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
Ilya Shipitsin
13cadf6492 src/Mayaqua/Encrypt.c: remove unused functions (#506)
[src/Mayaqua/Encrypt.c:1524]: (style) The function 'ByteToStr' is never used.
[src/Mayaqua/Encrypt.c:2762]: (style) The function 'CheckX' is never used.
[src/Mayaqua/Encrypt.c:4346]: (style) The function 'Des3Decrypt' is never used.
[src/Mayaqua/Encrypt.c:4290]: (style) The function 'Des3Encrypt' is never used.
[src/Mayaqua/Encrypt.c:4434]: (style) The function 'Des3RandKey' is never used.
[src/Mayaqua/Encrypt.c:4474]: (style) The function 'DesFreeKey' is never used.
[src/Mayaqua/Encrypt.c:4499]: (style) The function 'DesNewKey' is never used.
[src/Mayaqua/Encrypt.c:4446]: (style) The function 'DesRandKey' is never used.
[src/Mayaqua/Encrypt.c:4892]: (style) The function 'DhToBuf' is never used.
[src/Mayaqua/Encrypt.c:293]: (style) The function 'EasyDecrypt' is never used.
[src/Mayaqua/Encrypt.c:259]: (style) The function 'EasyEncrypt' is never used.
[src/Mayaqua/Encrypt.c:3144]: (style) The function 'FileToK' is never used.
[src/Mayaqua/Encrypt.c:1358]: (style) The function 'FileToP12' is never used.
[src/Mayaqua/Encrypt.c:1061]: (style) The function 'GetAllNameFromA' is never used.
[src/Mayaqua/Encrypt.c:973]: (style) The function 'GetAllNameFromXExA' is never used.
[src/Mayaqua/Encrypt.c:4182]: (style) The function 'HashSha256' is never used.
[src/Mayaqua/Encrypt.c:3192]: (style) The function 'KToFile' is never used.
[src/Mayaqua/Encrypt.c:4721]: (style) The function 'MacSha196' is never used.
[src/Mayaqua/Encrypt.c:1324]: (style) The function 'P12ToFile' is never used.
[src/Mayaqua/Encrypt.c:3983]: (style) The function 'Rand128' is never used.
[src/Mayaqua/Encrypt.c:670]: (style) The function 'RsaBinToPublic' is never used.
[src/Mayaqua/Encrypt.c:2556]: (style) The function 'RsaPrivateDecrypt' is never used.
[src/Mayaqua/Encrypt.c:2525]: (style) The function 'RsaPrivateEncrypt' is never used.
[src/Mayaqua/Encrypt.c:2494]: (style) The function 'RsaPublicDecrypt' is never used.
[src/Mayaqua/Encrypt.c:2584]: (style) The function 'RsaPublicEncrypt' is never used.
[src/Mayaqua/Encrypt.c:771]: (style) The function 'RsaPublicToBin' is never used.
[src/Mayaqua/Encrypt.c:4263]: (style) The function 'Sha1__' is never used.
[src/Mayaqua/Encrypt.c:3672]: (style) The function 'SkipBufBeforeString' is never used.
2018-05-02 23:48:47 +02:00
Moataz Elmasry
478270efba Revert "Cleanup ssl library. No memory leaks. (#143)". Build failing using OpenSSL 1.1.0f
This reverts commit 227842f89c.
2018-04-11 23:25:21 +02:00
Moataz Elmasry
227842f89c
Cleanup ssl library. No memory leaks. (#143) 2018-04-11 23:18:16 +02:00
Alexey Kryuchkov
83295bb736 OpenVPN client certificate authentication (Individual Certificate Authentication) (#327)
* Implement OpenVPN certificate authentication, fixes #55

* fixup! Implement OpenVPN certificate authentication, fixes #55
2018-04-05 23:04:58 +02:00
Daiyuu Nobori
8c0c4396b7 Add the Alternative subject name field on the new X.509 certificate creation. 2018-02-12 23:56:14 +01:00
Ilya Shipitsin
79c06146a4 remove unused functions (identified by cppcheck)
[src/Cedar/Account.c:854]: (style) The function 'AddGroupTraffic' is never used.
[src/Mayaqua/Secure.c:1455]: (style) The function 'AddSecObjToEnumCache' is never used.
[src/Mayaqua/Network.c:18445]: (style) The function 'AddSockList' is never used.
[src/Cedar/Account.c:870]: (style) The function 'AddUserTraffic' is never used.
[src/Cedar/Server.c:1045]: (style) The function 'AdjoinEnumLogFile' is never used.
[src/Cedar/Admin.c:13780]: (style) The function 'AdminConnect' is never used.
[src/Mayaqua/Encrypt.c:855]: (style) The function 'BigNumToStr' is never used.
[src/Mayaqua/Str.c:2113]: (style) The function 'Bit128ToStr' is never used.
[src/Mayaqua/Encrypt.c:898]: (style) The function 'BufToBigNum' is never used.
[src/Mayaqua/Internat.c:1874]: (style) The function 'CalcStrToUtf8' is never used.
[src/Cedar/Hub.c:6689]: (style) The function 'CalcTrafficDiff' is never used.
[src/Mayaqua/Internat.c:1819]: (style) The function 'CalcUtf8ToStr' is never used.
[src/Mayaqua/Network.c:6495]: (style) The function 'CanGetTcpProcessId' is never used.
[src/Cedar/WinUi.c:7226]: (style) The function 'CbInsertStrA' is never used.
[src/Cedar/Client.c:3035]: (style) The function 'CcEnumObjectInSecure' is never used.
[src/Cedar/Client.c:2826]: (style) The function 'CcGetCommonProxySetting' is never used.
[src/Cedar/Client.c:2857]: (style) The function 'CcSetCommonProxySetting' is never used.
[src/Cedar/Cedar.c:575]: (style) The function 'CedarLog' is never used.
[src/Cedar/WinUi.c:9841]: (style) The function 'Center2' is never used.
[src/Mayaqua/Encrypt.c:814]: (style) The function 'CertTest' is never used.
[src/Mayaqua/Encrypt.c:809]: (style) The function 'CertTest2' is never used.
[src/Mayaqua/Encrypt.c:819]: (style) The function 'CertTest_' is never used.
[src/Mayaqua/Cfg.c:1705]: (style) The function 'CfgIsFolder' is never used.
2018-02-08 00:20:07 +01:00
Moataz Elmasry
a5fa265811
Merge pull request #275 from chipitsine/master
cppcheck findings
2018-02-01 00:06:08 +01:00
Moataz Elmasry
93d9ade990 Merge PR #129 into master. 2018-01-25 02:55:11 +01:00
Daiyuu Nobori
1f2c052dfb Fixed the bug on the OpenVPN Server function. 2017-10-23 02:54:51 +09:00
Daiyuu Nobori
9f9dc459a7 Preparing the development branch 2017-10-19 15:00:41 +09:00
dnobori
faee11ff09 v4.23-9647-beta 2017-10-18 18:24:21 +09:00
Daiyuu Nobori
acf49ad536 Merge pull request #344 from quantum5/openssl1.1
OpenSSL 1.1 Port
2017-10-18 16:58:46 +09:00
Daiyuu Nobori
f9436daa6f Merge pull request #313 from zulzardi/patch-2
Fixed RSA key bits wrong calculation for certain x509 certificate
2017-10-18 16:58:09 +09:00
Quantum
0746be43a2 OpenSSL 1.1 Port.
Some potential problems with Ssl_Init_Async_SendAlert.
2017-07-29 22:31:25 -04:00
Zulyandri Zardi
a3db7b2e3d Update Encrypt.c
Fixed RSA bits wrong calculation for certain x509 certificate
2017-03-10 12:04:17 +08:00
Moataz Elmasry
071004477f Fix errors while adding SHA2 support to HMAC 2017-01-23 02:03:37 +01:00
Moataz Elmasry
29234b7f9a Add HMAC SHA2 to IKE 2017-01-23 00:50:48 +01:00
Moataz Elmasry
342d602f5d Add support for HMAC SHA2-256, HMAC SHA2-384, HMAC SHA2-512 2017-01-22 16:09:30 +01:00
Ilya Shipitsin
334765ffd7 resolved several cppcheck findings:
[src/Cedar/Admin.c:418]: (error) Possible null pointer dereference: cedar
[src/Cedar/Admin.c:616]: (error) Possible null pointer dereference: cedar
[src/Cedar/WebUI.c:369]: (error) Uninitialized variable: retcode
[src/Mayaqua/Encrypt.c:4485]: (error) Uninitialized variable: key
[src/Mayaqua/Network.c:13548]: (error) Uninitialized variable: e
2016-11-28 17:27:29 +05:00
dnobori
4df2eb4f9c v4.22-9634-beta 2016-11-27 17:43:14 +09:00
dnobori
17e624ac26 v4.19-9605-beta 2016-03-06 23:16:01 +09:00
dnobori
860f743dd7 v4.17-9566-beta 2015-07-17 00:31:57 +09:00
dnobori
06a72040a3 v4.13-9522-beta 2015-01-30 22:30:34 +09:00
NV
ad58da4179 Add DhParamBits configuration to set Diffie-Hellman parameters 2015-01-27 03:32:29 +09:00
dnobori
10d4b2c43d v4.10-9505-beta 2014-10-04 00:09:23 +09:00
dnobori
9f7d8578a7 v4.10-9472-beta 2014-07-12 02:06:20 +09:00
dnobori
719ee999d6 v4.07-9448-rtm 2014-06-06 06:53:20 +09:00
dnobori
cf2a6a42bc v4.06-9430-beta 2014-03-20 05:45:05 +09:00
dnobori
001fd910fe v4.04-9412-rtm 2014-01-15 18:01:42 +09:00
dnobori
749497dde0 v4.03-9408-rtm 2014-01-04 22:00:08 +09:00