mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
26 lines
607 B
C#
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
|
|
}
|
|
}
|
|
}
|