case insesitive config file and moving reverse to ssl_calls

ulab-original
jsorg71 19 years ago
parent 2380919d0b
commit e56bec1a7d

@ -69,16 +69,20 @@ xrdp_rdp_read_config(struct xrdp_client_info* client_info)
{
item = (char*)list_get_item(items, index);
value = (char*)list_get_item(values, index);
if (g_strcmp(item, "bitmap_cache") == 0)
if (g_strncasecmp(item, "bitmap_cache", 255) == 0)
{
if (g_strcmp(value, "yes") == 0)
if (g_strncasecmp(value, "yes", 255) == 0 ||
g_strncasecmp(value, "true", 255) == 0 ||
g_strncasecmp(value, "1", 255) == 0)
{
client_info->use_bitmap_cache = 1;
}
}
else if (g_strcmp(item, "bitmap_compression") == 0)
else if (g_strncasecmp(item, "bitmap_compression", 255) == 0)
{
if (g_strcmp(value, "yes") == 0)
if (g_strncasecmp(value, "yes", 255) == 0 ||
g_strncasecmp(value, "true", 255) == 0 ||
g_strncasecmp(value, "1", 255) == 0)
{
client_info->use_bitmap_comp = 1;
}

@ -309,46 +309,11 @@ xrdp_sec_send_lic_response(struct xrdp_sec* self)
return 0;
}
/*****************************************************************************/
static void APP_CC
xrdp_sec_reverse(char* p, int len)
{
int i;
int j;
char temp;
i = 0;
j = len - 1;
while (i < j)
{
temp = p[i];
p[i] = p[j];
p[j] = temp;
i++;
j--;
}
}
/*****************************************************************************/
static void APP_CC
xrdp_sec_rsa_op(char* out, char* in, char* mod, char* exp)
{
char lexp[64];
char lmod[64];
char lin[64];
char lout[64];
int len;
g_memcpy(lexp, exp, 64);
g_memcpy(lmod, mod, 64);
g_memcpy(lin, in, 64);
xrdp_sec_reverse(lexp, 64);
xrdp_sec_reverse(lmod, 64);
xrdp_sec_reverse(lin, 64);
g_memset(lout, 0, 64);
len = g_mod_exp(lout, lin, lmod, lexp);
xrdp_sec_reverse(lout, len);
g_memcpy(out, lout, 64);
g_mod_exp(out, 64, in, 64, mod, 64, exp, 64);
}
/*****************************************************************************/

Loading…
Cancel
Save