Apply "authentication level" RDP property only to non-RDG connections (as mstsc does).

This commit is contained in:
Pavel Pautov 2018-04-12 13:05:04 -07:00
parent 3a8d721bb9
commit 32505fda13
2 changed files with 4 additions and 2 deletions

3
client/common/file.c Normal file → Executable file
View File

@ -855,8 +855,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
* 2: If server authentication fails, show a warning and allow me to connect or refuse the connection (Warn me).
* 3: No authentication requirement is specified.
*/
freerdp_set_param_bool(settings, FreeRDP_IgnoreCertificate,
(file->AuthenticationLevel == 0) ? TRUE : FALSE);
settings->AuthenticationLevel = file->AuthenticationLevel;
}
if (~file->ConnectionType)

View File

@ -1245,6 +1245,9 @@ int tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname,
if (tls->settings->IgnoreCertificate)
return 1; /* success! */
if (!tls->isGatewayTransport && tls->settings->AuthenticationLevel == 0)
return 1; /* success! */
/* if user explicitly specified a certificate name, use it instead of the hostname */
if (!tls->isGatewayTransport && tls->settings->CertificateName)
hostname = tls->settings->CertificateName;