Changeset 106164 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Sep 26, 2024 10:42:10 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
r106061 r106164 279 279 * Klaus, some settings saving input required here! 280 280 */ 281 mData->mapProperties["Security/Method"] = Utf8Str("TLS"); 281 if (!mData->mapProperties["Security/Method"].equalsIgnoreCase("NEGOTIATE")) 282 mData->mapProperties["Security/Method"] = Utf8Str("TLS"); 282 283 mData->mapProperties["Security/ServerCertificate"] = strServerCertificate; 283 284 mData->mapProperties["Security/ServerPrivateKey"] = strServerPrivateKey; … … 297 298 HRESULT VRDEServer::i_certificateRepair(BOOL &certificateGenerated) 298 299 { 299 if (mData->mapProperties["Security/Method"] != "RDP" || mData->mapProperties["Security/Method"] != "None") 300 if ( !mData->mapProperties["Security/Method"].equalsIgnoreCase("RDP") 301 && !mData->mapProperties["Security/Method"].equalsIgnoreCase("None")) 300 302 { 301 303 Utf8Str strServerCertificate(VRDE_AUTO_GENENERATED_CERT_FILENAME); … … 347 349 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 348 350 mData.backup(); 349 mData->mapProperties["Security/Method"] = Utf8Str("TLS"); 351 if (!mData->mapProperties["Security/Method"].equalsIgnoreCase("NEGOTIATE")) 352 mData->mapProperties["Security/Method"] = Utf8Str("TLS"); 350 353 mData->mapProperties["Security/ServerCertificate"] = strServerCertificate; 351 354 mData->mapProperties["Security/ServerPrivateKey"] = strServerPrivateKey; … … 368 371 vrc = i_generateServerCertificate(); 369 372 if (RT_FAILURE(vrc)) 370 {371 i_rollback();372 373 return setError(VBOX_E_IPRT_ERROR, tr("Failed to auto generate server key and certificate: (%Rrc)\n"), vrc); 373 }374 374 certificateGenerated = true; 375 375 } … … 385 385 vrc = i_generateServerCertificate(); 386 386 if (RT_FAILURE(vrc)) 387 {388 i_rollback();389 387 return setError(VBOX_E_IPRT_ERROR, tr("Failed to auto generate server key and certificate: (%Rrc)\n"), vrc); 390 }391 388 certificateGenerated = true; 392 389 } … … 398 395 vrc = i_generateServerCertificate(); 399 396 if (RT_FAILURE(vrc)) 400 {401 i_rollback();402 397 return setError(VBOX_E_IPRT_ERROR, tr("Failed to auto generate server key and certificate: (%Rrc)\n"), vrc); 403 }404 398 certificateGenerated = true; 405 399 } … … 418 412 vrc = i_generateServerCertificate(); 419 413 if (RT_FAILURE(vrc)) 420 {421 i_rollback();422 414 return setError(VBOX_E_IPRT_ERROR, tr("Failed to auto generate server key and certificate: (%Rrc)\n"), vrc); 423 }424 415 certificateGenerated = true; 425 416 }
Note:
See TracChangeset
for help on using the changeset viewer.