0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Core/Patches/SslCertificatePatch.cs

24 lines
579 B
C#
Raw Normal View History

2023-03-03 18:52:31 +00:00
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
2023-03-03 18:52:31 +00:00
using Aki.Reflection.Patching;
using Aki.Core.Utils;
using HarmonyLib;
2023-03-03 18:52:31 +00:00
namespace Aki.Core.Patches
{
public class SslCertificatePatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(SslCertPatchClass), nameof(SslCertPatchClass.ValidateCertificate), new[] { typeof(X509Certificate) });
2023-03-03 18:52:31 +00:00
}
[PatchPrefix]
private static bool PatchPrefix(ref bool __result)
{
__result = true;
return false; // Skip original
2023-03-03 18:52:31 +00:00
}
}
}