Exemplo n.º 1
0
        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");
                }
            }
        }
Exemplo n.º 2
0
        public TestSuite(TestSetup setup_in)
        {
            mgr   = new PasswordManagerCore();
            setup = setup_in;
            if (setup.getSGXSupport())
            {
                mgr.set_sgx_support();
            }

            output = setup.getOutputCallback();
        }