Changeset 96799 in vbox
- Timestamp:
- Sep 20, 2022 8:46:08 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r96794 r96799 997 997 } 998 998 /* Save whether secure boot is enabled: */ 999 if ( fSuccess && isMachineOffline() && newSystemData.m_fEnabledEFI 1000 && newSystemData.m_fEnabledSecureBoot != oldSystemData.m_fEnabledSecureBoot) 999 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledSecureBoot != oldSystemData.m_fEnabledSecureBoot) 1001 1000 { 1002 1001 CNvramStore comStoreLvl1 = m_machine.GetNonVolatileStore(); 1003 1002 CUefiVariableStore comStoreLvl2 = comStoreLvl1.GetUefiVariableStore(); 1003 1004 /* Enabling secure boot? */ 1004 1005 if ( newSystemData.m_fEnabledSecureBoot 1005 && !newSystemData.m_fAvailableSecureBoot)1006 && newSystemData.m_fEnabledEFI) 1006 1007 { 1007 comStoreLvl1.InitUefiVariableStore(0); 1008 comStoreLvl2 = comStoreLvl1.GetUefiVariableStore(); 1009 comStoreLvl2.EnrollOraclePlatformKey(); 1010 comStoreLvl2.EnrollDefaultMsSignatures(); 1008 /* Secure boot was NOT available? */ 1009 if (!newSystemData.m_fAvailableSecureBoot) 1010 { 1011 /* Init and enroll everything: */ 1012 comStoreLvl1.InitUefiVariableStore(0); 1013 comStoreLvl2 = comStoreLvl1.GetUefiVariableStore(); 1014 comStoreLvl2.EnrollOraclePlatformKey(); 1015 comStoreLvl2.EnrollDefaultMsSignatures(); 1016 } 1017 comStoreLvl2.SetSecureBootEnabled(true); 1018 fSuccess = comStoreLvl2.isOk(); 1019 /// @todo convey error info .. 1011 1020 } 1012 comStoreLvl2.SetSecureBootEnabled(newSystemData.m_fEnabledSecureBoot); 1013 fSuccess = comStoreLvl2.isOk(); 1014 /// @todo convey error info .. 1021 /* Disabling secure boot? */ 1022 else if (!newSystemData.m_fEnabledSecureBoot) 1023 { 1024 comStoreLvl2.SetSecureBootEnabled(false); 1025 fSuccess = comStoreLvl2.isOk(); 1026 /// @todo convey error info .. 1027 } 1015 1028 } 1016 1029
Note:
See TracChangeset
for help on using the changeset viewer.