SEB-Patcher/SEBPatcher.Configuration/patch_IntegrityModule.cs
2024-10-16 08:11:06 +02:00

32 lines
1.4 KiB
C#

using System;
using MonoMod;
using SEBPatcherUtils;
namespace SafeExamBrowser.Configuration.Integrity
{
public class patch_IntegrityModule : IntegrityModule
{
public PatchLogger patchlogger;
[MonoModIgnore] public patch_IntegrityModule(Configuration.Contracts.AppConfig appConfig, SafeExamBrowser.Logging.Contracts.ILogger logger) : base(appConfig, logger) { }
[MonoModOriginal] public extern void orig_IntegityModule(Configuration.Contracts.AppConfig appConfig, SafeExamBrowser.Logging.Contracts.ILogger logger);
[MonoModConstructor] public void IntegrityModule(Configuration.Contracts.AppConfig appConfig, SafeExamBrowser.Logging.Contracts.ILogger logger)
{
orig_IntegityModule(appConfig, logger);
patchlogger = new PatchLogger("Configuration.Integrity");
}
[MonoModOriginal] public extern bool orig_TryVerifyCodeSignature(out bool isValid);
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public bool TryVerifyCodeSignature(out bool isValid)
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{
bool result = orig_TryVerifyCodeSignature(out isValid);
patchlogger.Info($"SEB integrity check result: {result}");
isValid = true;
return true;
}
}
}