mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 06:50:44 -05:00
23 lines
557 B
C#
23 lines
557 B
C#
using System.Reflection;
|
|
using System.Security.Cryptography.X509Certificates;
|
|
using SPT.Reflection.Patching;
|
|
using HarmonyLib;
|
|
|
|
namespace SPT.Core.Patches
|
|
{
|
|
public class SslCertificatePatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return AccessTools.Method(typeof(SslCertPatchClass), nameof(SslCertPatchClass.ValidateCertificate), new[] { typeof(X509Certificate) });
|
|
}
|
|
|
|
[PatchPrefix]
|
|
private static bool PatchPrefix(ref bool __result)
|
|
{
|
|
__result = true;
|
|
return false; // Skip original
|
|
}
|
|
}
|
|
}
|