1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-27 20:09:52 +03:00

Compare commits

...

7 Commits

Author SHA1 Message Date
siddharth-narayan
48ed25957b
Merge a470fb5fa9 into 31fed5a28f 2024-08-15 02:05:35 +00:00
siddharth-narayan
a470fb5fa9
Merge branch 'SoftEtherVPN:master' into nt-fix 2024-08-14 22:05:32 -04:00
Ilya Shipitsin
31fed5a28f
Merge pull request #2036 from icy17/null-check3
Fix potential NULL pointer dereference
2024-08-14 22:08:43 +02:00
Ilya Shipitsin
a8ce56b28b
Merge pull request #2041 from e-kud/update-cmake
Update minimal cmake version to 3.15
2024-08-13 00:25:22 +02:00
Evgeny Kudryashov
08e24917b8 Update minimal cmake version to 3.15
* 3.12 is required for add_compile_definitions
* 3.15 is required for CMP0091 policy
2024-08-12 22:26:51 +02:00
icy17
e2017772c7 Fix potential NULL pointer dereference 2024-08-01 15:43:34 +08:00
Siddharth
3a25c6bf73 Fix incorrect "Not on NT" error messages 2024-07-17 15:16:11 -07:00
5 changed files with 24 additions and 3 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.15)
set(BUILD_NUMBER CACHE STRING "The number of the current build.")

View File

@ -351,6 +351,11 @@ MD *NewMdEx(char *name, bool hmac)
#else
m->Ctx = EVP_MD_CTX_create();
#endif
if (m->Ctx == NULL)
{
return NULL;
}
if (EVP_DigestInit_ex(m->Ctx, m->Md, NULL) == false)
{
Debug("NewMdEx(): EVP_DigestInit_ex() failed with error: %s\n", OpenSSL_Error());
@ -4604,6 +4609,11 @@ DH_CTX *DhNew(char *prime, UINT g)
dh = ZeroMalloc(sizeof(DH_CTX));
dh->dh = DH_new();
if (dh->dh == NULL)
{
return NULL;
}
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
dhp = BinToBigNum(buf->Buf, buf->Size);
dhg = BN_new();

View File

@ -4259,7 +4259,7 @@ UINT MsService(char *name, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT
if ((mode == SVC_MODE_INSTALL || mode == SVC_MODE_UNINSTALL || mode == SVC_MODE_START ||
mode == SVC_MODE_STOP || mode == SVC_MODE_SERVICE) &&
(ms->IsNt == false))
(IsNt() == false))
{
// Tried to use the command for the NT in non-WindowsNT system
MsgBox(NULL, MB_ICONSTOP, _UU("SVC_NT_ONLY"));

View File

@ -170,7 +170,6 @@ typedef struct MS
{
HINSTANCE hInst;
HINSTANCE hKernel32;
bool IsNt;
bool IsAdmin;
HANDLE hCurrentProcess;
UINT CurrentProcessId;

View File

@ -11860,6 +11860,12 @@ bool StartSSLEx3(SOCK *sock, X *x, K *priv, LIST *chain, UINT ssl_timeout, char
#endif
sock->ssl = SSL_new(ssl_ctx);
if (sock->ssl == NULL)
{
return false;
}
SSL_set_fd(sock->ssl, (int)sock->socket);
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
@ -16250,6 +16256,12 @@ UINT GetOSSecurityLevel()
UINT security_level_new = 0, security_level_set_ssl_version = 0;
struct ssl_ctx_st *ctx = SSL_CTX_new(SSLv23_method());
if (ctx == NULL)
{
return security_level_new;
}
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
security_level_new = SSL_CTX_get_security_level(ctx);
#endif