1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00

Cedar/Proto.c: support secure sockets

This is required for SSTP, because the connection is established through TLS/SSL.
This commit is contained in:
Davide Beatrici 2020-07-12 03:16:02 +02:00
parent 19dbdf46be
commit 3090688506

View File

@ -383,7 +383,7 @@ bool ProtoHandleConnection(PROTO *proto, SOCK *sock, const char *protocol)
while (true) while (true)
{ {
const UINT ret = Recv(sock, buf, PROTO_TCP_BUFFER_SIZE, false); const UINT ret = Recv(sock, buf, PROTO_TCP_BUFFER_SIZE, sock->SecureMode);
if (ret == SOCK_LATER) if (ret == SOCK_LATER)
{ {
@ -411,7 +411,7 @@ bool ProtoHandleConnection(PROTO *proto, SOCK *sock, const char *protocol)
// Send data to the TCP socket // Send data to the TCP socket
while (FifoSize(send_fifo) >= 1) while (FifoSize(send_fifo) >= 1)
{ {
const UINT ret = Send(sock, FifoPtr(send_fifo), FifoSize(send_fifo), false); const UINT ret = Send(sock, FifoPtr(send_fifo), FifoSize(send_fifo), sock->SecureMode);
if (ret == SOCK_LATER) if (ret == SOCK_LATER)
{ {