Apply "authentication level" RDP property only to non-RDG connections (as mstsc does).
authorPavel Pautov <37922380+p-pautov@users.noreply.github.com>
Thu, 12 Apr 2018 20:05:04 +0000 (13:05 -0700)
committerPavel Pautov <37922380+p-pautov@users.noreply.github.com>
Thu, 26 Apr 2018 01:12:23 +0000 (18:12 -0700)
client/common/file.c [changed mode: 0644->0755]
libfreerdp/crypto/tls.c

old mode 100644 (file)
new mode 100755 (executable)
index ed43264..3ff7277
@@ -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)
index 8e2c68c..6e75f44 100644 (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;