mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-06 07:44:57 +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:
@ -824,6 +824,10 @@ void OvsProcessRecvControlPacket(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN
|
||||
}
|
||||
|
||||
c->SslPipe = NewSslPipeEx(true, s->Cedar->ServerX, s->Cedar->ServerK, s->Dh, true, &c->ClientCert);
|
||||
if (c->SslPipe == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
Unlock(s->Cedar->lock);
|
||||
|
||||
|
@ -3635,6 +3635,11 @@ bool PPPProcessEAPTlsResponse(PPP_SESSION *p, PPP_EAP *eap_packet, UINT eapSize)
|
||||
{
|
||||
p->Eap_TlsCtx.Dh = DhNewFromBits(DH_PARAM_BITS_DEFAULT);
|
||||
p->Eap_TlsCtx.SslPipe = NewSslPipeEx3(true, p->Cedar->ServerX, p->Cedar->ServerK, p->Cedar->ServerChain, p->Eap_TlsCtx.Dh, true, &(p->Eap_TlsCtx.ClientCert), p->Eap_TlsCtx.Tls13SessionTicketsCount, p->Eap_TlsCtx.DisableTls13);
|
||||
if (p->Eap_TlsCtx.SslPipe == NULL)
|
||||
{
|
||||
Debug("EAP-TLS: NewSslPipeEx3 failed\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If the current frame is fragmented, or it is a possible last of a fragmented series, bufferize it
|
||||
|
@ -417,6 +417,11 @@ bool StartPeapSslClient(EAP_CLIENT *e)
|
||||
}
|
||||
|
||||
e->SslPipe = NewSslPipe(false, NULL, NULL, NULL);
|
||||
if (e->SslPipe == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
send_fifo = e->SslPipe->RawOut->RecvFifo;
|
||||
recv_fifo = e->SslPipe->RawIn->SendFifo;
|
||||
|
||||
|
Reference in New Issue
Block a user