1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-09-25 20:59:20 +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

@ -17018,24 +17018,34 @@ void SmSslDlgInit(HWND hWnd, SM_SSL *s)
return;
}
// Set the encryption algorithm list
cipher_list = GetCipherList();
SetFont(hWnd, C_CIPHER, GetFont("Tahoma", 8, false, false, false, false));
CbSetHeight(hWnd, C_CIPHER, 18);
for (i = 0;i < cipher_list->NumTokens;i++)
{
wchar_t tmp[MAX_SIZE];
char *name = cipher_list->Token[i];
StrToUni(tmp, sizeof(tmp), name);
CbAddStr(hWnd, C_CIPHER, tmp, 0);
}
FreeToken(cipher_list);
if (s->p != NULL)
{
// Get the encryption algorithm name from the server
RPC_STR t;
Zero(&t, sizeof(t));
SetFont(hWnd, C_CIPHER, GetFont("Tahoma", 8, false, false, false, false));
CbSetHeight(hWnd, C_CIPHER, 18);
// Get the list of available encryption algorithms from the server
if (ScGetServerCipherList(s->p->Rpc, &t) == ERR_NO_ERROR)
{
cipher_list = ParseToken(t.String, ";");
FreeRpcStr(&t);
Zero(&t, sizeof(t));
for (i = 0; i < cipher_list->NumTokens; i++)
{
wchar_t tmp[MAX_SIZE];
char *name = cipher_list->Token[i];
StrToUni(tmp, sizeof(tmp), name);
CbAddStr(hWnd, C_CIPHER, tmp, 0);
}
FreeToken(cipher_list);
}
// Get the current encryption algorithm's name from the server
if (CALL(hWnd, ScGetServerCipher(s->p->Rpc, &t)))
{
wchar_t tmp[MAX_SIZE];