1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-12 10:44:58 +03:00

Cedar: retrieve the list of available encryption algorithms from the server

This commit is contained in:
Davide Beatrici
2019-01-01 20:31:13 +01:00
parent 422076d6c9
commit d62421adcb
5 changed files with 86 additions and 27 deletions

View File

@ -8834,26 +8834,33 @@ UINT PsServerCipherGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
return ret;
}
ciphers = GetCipherList();
UniFormat(tmp, sizeof(tmp), L" %S", t.String);
FreeRpcStr(&t);
Zero(&t, sizeof(RPC_STR));
c->Write(c, _UU("CMD_ServerCipherGet_SERVER"));
UniFormat(tmp, sizeof(tmp), L" %S", t.String);
c->Write(c, tmp);
c->Write(c, L"");
c->Write(c, _UU("CMD_ServerCipherGet_CIPHERS"));
ret = ScGetServerCipherList(ps->Rpc, &t);
for (i = 0;i < ciphers->NumTokens;i++)
if (ret == ERR_NO_ERROR)
{
UniFormat(tmp, sizeof(tmp), L" %S", ciphers->Token[i]);
c->Write(c, tmp);
ciphers = ParseToken(t.String, ";");
FreeRpcStr(&t);
c->Write(c, L"");
c->Write(c, _UU("CMD_ServerCipherGet_CIPHERS"));
for (i = 0; i < ciphers->NumTokens; i++)
{
UniFormat(tmp, sizeof(tmp), L" %S", ciphers->Token[i]);
c->Write(c, tmp);
}
FreeToken(ciphers);
}
FreeToken(ciphers);
FreeRpcStr(&t);
FreeParamValueList(o);
return 0;