mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 08:14:58 +03:00
additional error handling if SSL_CTX_new failed
this is a folloup to https://github.com/SoftEtherVPN/SoftEtherVPN/pull/1873
This commit is contained in:
@ -5724,6 +5724,10 @@ SSL_PIPE *NewSslPipeEx3(bool server_mode, X *x, K *k, LIST *chain, DH_CTX *dh, b
|
||||
SSL_PIPE *s;
|
||||
SSL *ssl;
|
||||
SSL_CTX *ssl_ctx = NewSSLCtx(server_mode);
|
||||
if (ssl_ctx == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Lock(openssl_lock);
|
||||
{
|
||||
@ -11727,6 +11731,10 @@ bool StartSSLEx3(SOCK *sock, X *x, K *priv, LIST *chain, UINT ssl_timeout, char
|
||||
}
|
||||
|
||||
ssl_ctx = NewSSLCtx(sock->ServerMode);
|
||||
if (ssl_ctx == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Lock(openssl_lock);
|
||||
{
|
||||
|
Reference in New Issue
Block a user