base vs future configurable patches, add amplitude redirect and signalr handshake patches, galvanic corrosion support,
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches
|
||||
{
|
||||
[HarmonyPatch]
|
||||
public class TLSPatch
|
||||
{
|
||||
static string TargetTypeName = "Org.BouncyCastle.Crypto.Tls.LegacyTlsAuthentication";
|
||||
static string TargetMethodName = "NotifyServerCertificate";
|
||||
static string Description = "Certificate patch";
|
||||
static Type targetType = AccessTools.TypeByName(TargetTypeName);
|
||||
static MethodInfo targetMethod = AccessTools.Method(targetType, TargetMethodName);
|
||||
|
||||
static bool Prepare()
|
||||
{
|
||||
if (targetMethod == null)
|
||||
{
|
||||
Plugin.Log.LogWarning($"'{Description}' disabled. The type for this patch was not found.");
|
||||
return false;
|
||||
}
|
||||
if (targetMethod == null)
|
||||
{
|
||||
Plugin.Log.LogWarning($"'{Description}' disabled. The method for this patch was not found.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Plugin.Log.LogInfo($"'{Description}' succeeded validation.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static MethodBase TargetMethod() => targetMethod;
|
||||
|
||||
static bool Prefix()
|
||||
{
|
||||
return !(GenericConfig.CertificatePatch.Value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user