[gateway,settings] add GatewayAutoConsent option

with this option the client automatically accepts consent messages of
the gateway server.
This commit is contained in:
Armin Novak 2023-02-01 09:48:39 +01:00 committed by akallabeth
parent 05c8a96fff
commit cd48e17740
5 changed files with 15 additions and 1 deletions

View File

@ -876,6 +876,9 @@ BOOL client_cli_present_gateway_message(freerdp* instance, UINT32 type, BOOL isD
}
#endif
if (freerdp_settings_get_bool(instance->context->settings, FreeRDP_GatewayAutoConsent))
return TRUE;
while (isConsentMandatory)
{
printf("I understand and agree to the terms of this policy (Y/N) \n");

View File

@ -791,6 +791,7 @@ typedef struct
#define FreeRDP_GatewayAcceptedCertLength (1999)
#define FreeRDP_GatewayHttpUseWebsockets (2000)
#define FreeRDP_GatewayHttpExtAuthSspiNtlm (2001)
#define FreeRDP_GatewayAutoConsent (2002)
#define FreeRDP_ProxyType (2015)
#define FreeRDP_ProxyHostname (2016)
#define FreeRDP_ProxyPort (2017)
@ -1366,7 +1367,8 @@ struct rdp_settings
ALIGN64 UINT32 GatewayAcceptedCertLength; /* 1999 */
ALIGN64 BOOL GatewayHttpUseWebsockets; /* 2000 */
ALIGN64 BOOL GatewayHttpExtAuthSspiNtlm; /* 2001 */
UINT64 padding2015[2015 - 2002]; /* 2002 */
ALIGN64 BOOL GatewayAutoConsent; /* 2002 */
UINT64 padding2015[2015 - 2003]; /* 2003 */
/* Proxy */
ALIGN64 UINT32 ProxyType; /* 2015 */

View File

@ -231,6 +231,9 @@ BOOL freerdp_settings_get_bool(const rdpSettings* settings, size_t id)
case FreeRDP_Fullscreen:
return settings->Fullscreen;
case FreeRDP_GatewayAutoConsent:
return settings->GatewayAutoConsent;
case FreeRDP_GatewayBypassLocal:
return settings->GatewayBypassLocal;
@ -846,6 +849,10 @@ BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val)
settings->Fullscreen = cnv.c;
break;
case FreeRDP_GatewayAutoConsent:
settings->GatewayAutoConsent = cnv.c;
break;
case FreeRDP_GatewayBypassLocal:
settings->GatewayBypassLocal = cnv.c;
break;

View File

@ -103,6 +103,7 @@ static const struct settings_str_entry settings_map[] = {
{ FreeRDP_FrameMarkerCommandEnabled, FREERDP_SETTINGS_TYPE_BOOL,
"FreeRDP_FrameMarkerCommandEnabled" },
{ FreeRDP_Fullscreen, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_Fullscreen" },
{ FreeRDP_GatewayAutoConsent, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_GatewayAutoConsent" },
{ FreeRDP_GatewayBypassLocal, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_GatewayBypassLocal" },
{ FreeRDP_GatewayEnabled, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_GatewayEnabled" },
{ FreeRDP_GatewayHttpExtAuthSspiNtlm, FREERDP_SETTINGS_TYPE_BOOL,

View File

@ -61,6 +61,7 @@ static const size_t bool_list_indices[] = {
FreeRDP_ForceMultimon,
FreeRDP_FrameMarkerCommandEnabled,
FreeRDP_Fullscreen,
FreeRDP_GatewayAutoConsent,
FreeRDP_GatewayBypassLocal,
FreeRDP_GatewayEnabled,
FreeRDP_GatewayHttpExtAuthSspiNtlm,