Fixed const correctness of settings pointers

This commit is contained in:
Armin Novak 2022-04-27 18:56:21 +02:00 committed by akallabeth
parent 2dc98adb62
commit a005472337

View File

@ -2135,18 +2135,20 @@ static BOOL nla_encode_ts_credentials(rdpNla* nla)
{
TSSmartCardCreds_t smartcardCreds = { 0 };
TSCspDataDetail_t cspData = { 0 };
char* Password = freerdp_settings_get_string_writable(settings, FreeRDP_Password);
smartcardCreds.pin = settings->Password ? settings->Password : "";
smartcardCreds.pin = Password ? Password : "";
/*smartcardCreds.userHint = settings->UserHint;
smartcardCreds.domainHint = settings->DomainHint;*/
smartcardCreds.cspData = &cspData;
cspData.keySpec = freerdp_settings_get_uint32(settings, FreeRDP_KeySpec);
cspData.cspName = freerdp_settings_get_string(settings, FreeRDP_CspName);
cspData.readerName = freerdp_settings_get_string(settings, FreeRDP_ReaderName);
cspData.cardName = freerdp_settings_get_string(settings, FreeRDP_CardName);
cspData.containerName = freerdp_settings_get_string(settings, FreeRDP_ContainerName);
cspData.cspName = freerdp_settings_get_string_writable(settings, FreeRDP_CspName);
cspData.readerName = freerdp_settings_get_string_writable(settings, FreeRDP_ReaderName);
cspData.cardName = freerdp_settings_get_string_writable(settings, FreeRDP_CardName);
cspData.containerName =
freerdp_settings_get_string_writable(settings, FreeRDP_ContainerName);
length = ber_sizeof_nla_TSSmartCardCreds(&smartcardCreds);
credsContentStream = Stream_New(NULL, length);