public MainWindow() { var sgxfeature = new FeatureSupport(); InitializeComponent(); // In the SGX branch, the lock timeout is also stored in our password vault. _mgr.set_lock_timeout((ushort)_prefs.LockDelay); // Detect SGX support if (sgxfeature.is_supported() == 1) { // We support SGX, but are we enabled or is further action required? if (sgxfeature.is_enabled() == 1) { _mgr.set_sgx_support(); } else if (sgxfeature.reboot_required() == 1) { MessageBox.Show("Intel® SGX is supported on this system, but a reboot is required to enable it. This application will run without Intel® SGX support for now.", "Intel® SGX not enabled"); } else if (sgxfeature.bios_enable_required() == 1) { MessageBox.Show("Intel® SGX is supported on this system, but it needs to be manually enabled in the BIOS. This application will run without Intel® SGX for now.", "Intel® SGX not enabled"); } } }
static void Main(string[] args) { TestSetup setup = new TestSetup(); FeatureSupport sgxfeature = new FeatureSupport(); TestSuite tests; setup.setSGXSupport(sgxfeature.is_enabled() == 1); tests = new TestSuite(setup); Exit(tests.RunAll() ? 0 : 1); }
public formMain() { sgxfeature = new FeatureSupport(); setup = new TestSetup(); InitializeComponent(); if (sgxfeature.is_enabled() == 1) { sGXCodeBranchMenuItem.Checked = true; sGXCodeBranchMenuItem.Enabled = true; } setup.setOutputCallback(outputResults); }