0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 06:50:44 -05:00
modules/project/Aki.Core/Patches/SslCertificatePatch.cs
2023-03-03 18:52:31 +00:00

26 lines
607 B
C#

using System.Linq;
using System.Reflection;
using UnityEngine.Networking;
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using Aki.Core.Utils;
namespace Aki.Core.Patches
{
public class SslCertificatePatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return PatchConstants.EftTypes.Single(x => x.BaseType == typeof(CertificateHandler))
.GetMethod("ValidateCertificate", PatchConstants.PrivateFlags);
}
[PatchPrefix]
private static bool PatchPrefix(ref bool __result)
{
__result = ValidationUtil.Validate();
return false; // Skip origial
}
}
}