Restore SEBPatch

This commit is contained in:
2025-06-01 11:56:28 +02:00
parent 8c656e3137
commit 00707825b4
1009 changed files with 5005 additions and 6502 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
* Copyright (c) 2025 ETH Zürich, IT Services
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -10,13 +10,20 @@ using System;
using System.Collections.Generic;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Client.Responsibilities;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Integrity;
using SafeExamBrowser.Core.Contracts.ResponsibilityModel;
using SafeExamBrowser.Proctoring.Contracts;
using SafeExamBrowser.Server.Contracts;
using SafeExamBrowser.Settings;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client
{
@@ -50,16 +57,41 @@ namespace SafeExamBrowser.Client
/// </summary>
internal IClientHost ClientHost { get; set; }
/// <summary>
/// The hash algorithm.
/// </summary>
internal IHashAlgorithm HashAlgorithm { get; set; }
/// <summary>
/// The integrity module.
/// </summary>
internal IIntegrityModule IntegrityModule { get; set; }
/// <summary>
/// The currently active lock screen, or <c>default</c> if no lock screen is active.
/// </summary>
internal ILockScreen LockScreen { get; set; }
/// <summary>
/// The message box.
/// </summary>
internal IMessageBox MessageBox { get; set; }
/// <summary>
/// The proctoring controller to be used if the current session has proctoring enabled.
/// </summary>
internal IProctoringController Proctoring { get; set; }
/// <summary>
/// The client responsibilities.
/// </summary>
internal IResponsibilityCollection<ClientTask> Responsibilities { get; set; }
/// <summary>
/// The runtime communication proxy.
/// </summary>
internal IRuntimeProxy Runtime { get; set; }
/// <summary>
/// The server proxy to be used if the current session mode is <see cref="SessionMode.Server"/>.
/// </summary>
@@ -75,6 +107,11 @@ namespace SafeExamBrowser.Client
/// </summary>
internal AppSettings Settings { get; set; }
/// <summary>
/// The user interface factory.
/// </summary>
internal IUserInterfaceFactory UserInterfaceFactory { get; set; }
internal ClientContext()
{
Activators = new List<IActivator>();