@@ -129,40 +129,25 @@ xrdp_iso_negotiate_security(struct xrdp_iso *self)
129
129
protostr );
130
130
security_type_mask &= self -> requestedProtocol ;
131
131
132
- /* In VMConnect mode, we support everything. */
133
- if (client_info -> vmconnect && (self -> requestedProtocol > PROTOCOL_RDP ))
132
+ if (security_type_mask & PROTOCOL_HYBRID_EX )
134
133
{
135
- if (security_type_mask & PROTOCOL_HYBRID_EX )
136
- {
137
- LOG (LOG_LEVEL_INFO , "Selected HYBRID_EX security" );
138
- self -> selectedProtocol = PROTOCOL_HYBRID_EX ;
139
- got_protocol = 1 ;
140
- }
141
- else if (security_type_mask & PROTOCOL_HYBRID )
142
- {
143
- LOG (LOG_LEVEL_INFO , "Selected HYBRID security" );
144
- self -> selectedProtocol = PROTOCOL_HYBRID ;
145
- got_protocol = 1 ;
146
- }
147
- else if (security_type_mask & PROTOCOL_SSL )
148
- {
149
- LOG (LOG_LEVEL_INFO , "Selected TLS security" );
150
- self -> selectedProtocol = PROTOCOL_SSL ;
151
- got_protocol = 1 ;
152
- }
153
- else
154
- {
155
- /* Impossible */
156
- LOG (LOG_LEVEL_ERROR , "Impossible case." );
157
- rv = 1 ;
158
- }
134
+ /* Currently supported by VMConnect mode only */
135
+ LOG (LOG_LEVEL_INFO , "Selected HYBRID_EX security" );
136
+ self -> selectedProtocol = PROTOCOL_HYBRID_EX ;
137
+ got_protocol = 1 ;
138
+ }
139
+ else if (security_type_mask & PROTOCOL_HYBRID )
140
+ {
141
+ /* Currently supported by VMConnect mode only */
142
+ LOG (LOG_LEVEL_INFO , "Selected HYBRID security" );
143
+ self -> selectedProtocol = PROTOCOL_HYBRID ;
144
+ got_protocol = 1 ;
159
145
}
160
- /* Is there a match on SSL/TLS? */
161
146
else if ((security_type_mask & PROTOCOL_SSL ) != 0 )
162
147
{
163
- /* Can we do TLS? (basic check) */
164
- if (g_file_readable (client_info -> certificate ) &&
165
- g_file_readable (client_info -> key_file ))
148
+ /* Can we do TLS? (basic check). VMConnect is exempt. */
149
+ if (( g_file_readable (client_info -> certificate ) &&
150
+ g_file_readable (client_info -> key_file )) || client_info -> vmconnect )
166
151
{
167
152
LOG (LOG_LEVEL_INFO , "Selected TLS security" );
168
153
self -> selectedProtocol = PROTOCOL_SSL ;
0 commit comments