mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
remove msvc compiling errors (#499)
This commit is contained in:
parent
b29ca0be8b
commit
12a30cbbe2
@ -7298,6 +7298,8 @@ PACK *PackLoginWithPlainPassword(char *hubname, char *username, void *plain_pass
|
|||||||
PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x)
|
PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x)
|
||||||
{
|
{
|
||||||
PACK *p;
|
PACK *p;
|
||||||
|
char cn_username[128];
|
||||||
|
BUF *cert_buf = NULL;
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (hubname == NULL || username == NULL || x == NULL)
|
if (hubname == NULL || username == NULL || x == NULL)
|
||||||
{
|
{
|
||||||
@ -7308,7 +7310,6 @@ PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x)
|
|||||||
PackAddStr(p, "method", "login");
|
PackAddStr(p, "method", "login");
|
||||||
PackAddStr(p, "hubname", hubname);
|
PackAddStr(p, "hubname", hubname);
|
||||||
|
|
||||||
char cn_username[128];
|
|
||||||
if (IsEmptyStr(username))
|
if (IsEmptyStr(username))
|
||||||
{
|
{
|
||||||
if (x->subject_name == NULL)
|
if (x->subject_name == NULL)
|
||||||
@ -7326,7 +7327,7 @@ PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x)
|
|||||||
|
|
||||||
PackAddInt(p, "authtype", AUTHTYPE_OPENVPN_CERT);
|
PackAddInt(p, "authtype", AUTHTYPE_OPENVPN_CERT);
|
||||||
|
|
||||||
BUF *cert_buf = XToBuf(x, false);
|
cert_buf = XToBuf(x, false);
|
||||||
PackAddBuf(p, "cert", cert_buf);
|
PackAddBuf(p, "cert", cert_buf);
|
||||||
FreeBuf(cert_buf);
|
FreeBuf(cert_buf);
|
||||||
|
|
||||||
|
@ -18365,6 +18365,7 @@ void SmServerDlgInit(HWND hWnd, SM_SERVER *p)
|
|||||||
void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
||||||
{
|
{
|
||||||
RPC_ENUM_HUB t;
|
RPC_ENUM_HUB t;
|
||||||
|
RPC_LISTENER_LIST t2;
|
||||||
DDNS_CLIENT_STATUS st;
|
DDNS_CLIENT_STATUS st;
|
||||||
RPC_AZURE_STATUS sta;
|
RPC_AZURE_STATUS sta;
|
||||||
UINT i;
|
UINT i;
|
||||||
@ -18452,35 +18453,34 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Listener list update
|
// Listener list update
|
||||||
RPC_LISTENER_LIST t;
|
Zero(&t2, sizeof(RPC_LISTENER_LIST));
|
||||||
Zero(&t, sizeof(RPC_LISTENER_LIST));
|
if (CALL(hWnd, ScEnumListener(p->Rpc, &t2)))
|
||||||
if (CALL(hWnd, ScEnumListener(p->Rpc, &t)))
|
|
||||||
{
|
{
|
||||||
LVB *b = LvInsertStart();
|
LVB *b = LvInsertStart();
|
||||||
for (i = 0;i < t.NumPort;i++)
|
for (i = 0;i < t2.NumPort;i++)
|
||||||
{
|
{
|
||||||
wchar_t tmp[MAX_SIZE];
|
wchar_t tmp[MAX_SIZE];
|
||||||
wchar_t *status;
|
wchar_t *status;
|
||||||
UINT icon;
|
UINT icon;
|
||||||
UniFormat(tmp, sizeof(tmp), _UU("CM_LISTENER_TCP_PORT"), t.Ports[i]);
|
UniFormat(tmp, sizeof(tmp), _UU("CM_LISTENER_TCP_PORT"), t2.Ports[i]);
|
||||||
|
|
||||||
status = _UU("CM_LISTENER_ONLINE");
|
status = _UU("CM_LISTENER_ONLINE");
|
||||||
icon = ICO_PROTOCOL;
|
icon = ICO_PROTOCOL;
|
||||||
if (t.Errors[i])
|
if (t2.Errors[i])
|
||||||
{
|
{
|
||||||
status = _UU("CM_LISTENER_ERROR");
|
status = _UU("CM_LISTENER_ERROR");
|
||||||
icon = ICO_PROTOCOL_X;
|
icon = ICO_PROTOCOL_X;
|
||||||
}
|
}
|
||||||
else if (t.Enables[i] == false)
|
else if (t2.Enables[i] == false)
|
||||||
{
|
{
|
||||||
status = _UU("CM_LISTENER_OFFLINE");
|
status = _UU("CM_LISTENER_OFFLINE");
|
||||||
icon = ICO_PROTOCOL_OFFLINE;
|
icon = ICO_PROTOCOL_OFFLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
LvInsertAdd(b, icon, (void *)t.Ports[i], 2, tmp, status);
|
LvInsertAdd(b, icon, (void *)t2.Ports[i], 2, tmp, status);
|
||||||
}
|
}
|
||||||
LvInsertEnd(b, hWnd, L_LISTENER);
|
LvInsertEnd(b, hWnd, L_LISTENER);
|
||||||
FreeRpcListenerList(&t);
|
FreeRpcListenerList(&t2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the DDNS client state
|
// Get the DDNS client state
|
||||||
|
@ -5828,11 +5828,10 @@ int SslCertVerifyCallback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
|
|
||||||
if (clientcert != NULL)
|
if (clientcert != NULL)
|
||||||
{
|
{
|
||||||
clientcert->PreverifyErr = 0;
|
clientcert->PreverifyErr = X509_STORE_CTX_get_error(ctx);
|
||||||
clientcert->PreverifyErrMessage[0] = '\0';
|
clientcert->PreverifyErrMessage[0] = '\0';
|
||||||
if (!preverify_ok)
|
if (!preverify_ok)
|
||||||
{
|
{
|
||||||
clientcert->PreverifyErr = X509_STORE_CTX_get_error(ctx);
|
|
||||||
const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr);
|
const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr);
|
||||||
StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg);
|
StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg);
|
||||||
Debug("SslCertVerifyCallback preverify error: '%s'\n", msg);
|
Debug("SslCertVerifyCallback preverify error: '%s'\n", msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user