scripts
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x0200128E RID: 4750
|
||||
[Token(Token = "0x200128E")]
|
||||
[StructLayout(3)]
|
||||
public class AlwaysValidVerifyer : ICertificateVerifyer
|
||||
{
|
||||
// Token: 0x0600760A RID: 30218 RVA: 0x001863F0 File Offset: 0x001845F0
|
||||
[Token(Token = "0x600760A")]
|
||||
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "4")]
|
||||
public bool IsValid(Uri targetUri, X509CertificateStructure[] certs)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x0600760B RID: 30219 RVA: 0x00186400 File Offset: 0x00184600
|
||||
[Token(Token = "0x600760B")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public AlwaysValidVerifyer()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x0200128F RID: 4751
|
||||
[Token(Token = "0x200128F")]
|
||||
[StructLayout(3)]
|
||||
public interface ICertificateVerifyer
|
||||
{
|
||||
// Token: 0x0600760C RID: 30220
|
||||
[Token(Token = "0x600760C")]
|
||||
[Address(Slot = "0")]
|
||||
bool IsValid(Uri targetUri, X509CertificateStructure[] certs);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001290 RID: 4752
|
||||
[Token(Token = "0x2001290")]
|
||||
[StructLayout(3)]
|
||||
public interface IClientCredentialsProvider
|
||||
{
|
||||
// Token: 0x0600760D RID: 30221
|
||||
[Token(Token = "0x600760D")]
|
||||
[Address(Slot = "0")]
|
||||
TlsCredentials GetClientCredentials(TlsContext context, CertificateRequest certificateRequest);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001291 RID: 4753
|
||||
[Token(Token = "0x2001291")]
|
||||
[StructLayout(3)]
|
||||
public class LegacyTlsAuthentication : TlsAuthentication
|
||||
{
|
||||
// Token: 0x0600760E RID: 30222 RVA: 0x00186414 File Offset: 0x00184614
|
||||
[Token(Token = "0x600760E")]
|
||||
[Address(RVA = "0x17CEC00", Offset = "0x17CD600", VA = "0x1817CEC00")]
|
||||
public LegacyTlsAuthentication(Uri targetUri, ICertificateVerifyer verifyer, IClientCredentialsProvider prov)
|
||||
{
|
||||
this.TargetUri = targetUri;
|
||||
this.verifyer = verifyer;
|
||||
this.credProvider = prov;
|
||||
}
|
||||
|
||||
// Token: 0x0600760F RID: 30223 RVA: 0x0018643C File Offset: 0x0018463C
|
||||
[Token(Token = "0x600760F")]
|
||||
[Address(RVA = "0x17CEAE0", Offset = "0x17CD4E0", VA = "0x1817CEAE0", Slot = "6")]
|
||||
public virtual void NotifyServerCertificate(Certificate serverCertificate)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600760F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Org.BouncyCastle.Crypto.Tls.LegacyTlsAuthentication::NotifyServerCertificate(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.Certificate)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_28:
|
||||
stloc:TlsFatalAlert(var_4_2F, newobj:TlsFatalAlert(TlsFatalAlert::.ctor, ldloc:uint64[exp:uint8](var_5)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007610 RID: 30224 RVA: 0x0018647C File Offset: 0x0018467C
|
||||
[Token(Token = "0x6007610")]
|
||||
[Address(RVA = "0x17CEA10", Offset = "0x17CD410", VA = "0x1817CEA10", Slot = "7")]
|
||||
public virtual TlsCredentials GetClientCredentials(TlsContext context, CertificateRequest certificateRequest)
|
||||
{
|
||||
IClientCredentialsProvider clientCredentialsProvider = this.credProvider;
|
||||
if (clientCredentialsProvider == 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
if (num < certificateRequest)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
return clientCredentialsProvider.GetClientCredentials(context, certificateRequest);
|
||||
}
|
||||
|
||||
// Token: 0x040055BB RID: 21947
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40055BB")]
|
||||
protected ICertificateVerifyer verifyer;
|
||||
|
||||
// Token: 0x040055BC RID: 21948
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40055BC")]
|
||||
protected IClientCredentialsProvider credProvider;
|
||||
|
||||
// Token: 0x040055BD RID: 21949
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40055BD")]
|
||||
protected Uri TargetUri;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001292 RID: 4754
|
||||
[Token(Token = "0x2001292")]
|
||||
[StructLayout(3)]
|
||||
public sealed class LegacyTlsClient : DefaultTlsClient
|
||||
{
|
||||
// Token: 0x06007611 RID: 30225 RVA: 0x001864AC File Offset: 0x001846AC
|
||||
[Token(Token = "0x6007611")]
|
||||
[Address(RVA = "0x17CECD0", Offset = "0x17CD6D0", VA = "0x1817CECD0")]
|
||||
public LegacyTlsClient(Uri targetUri, ICertificateVerifyer verifyer, IClientCredentialsProvider prov, List<string> hostNames)
|
||||
{
|
||||
this.TargetUri = targetUri;
|
||||
this.credProvider = prov;
|
||||
this.<HostNames>k__BackingField = 0;
|
||||
this.verifyer = verifyer;
|
||||
}
|
||||
|
||||
// Token: 0x06007612 RID: 30226 RVA: 0x001864DC File Offset: 0x001846DC
|
||||
[Token(Token = "0x6007612")]
|
||||
[Address(RVA = "0x17CEC50", Offset = "0x17CD650", VA = "0x1817CEC50", Slot = "58")]
|
||||
public override TlsAuthentication GetAuthentication()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007612)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsAuthentication Org.BouncyCastle.Crypto.Tls.LegacyTlsClient::GetAuthentication()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:Uri(var_0_06, ldfld:Uri(LegacyTlsClient::TargetUri, ldloc:LegacyTlsClient(this)))
|
||||
stloc:ICertificateVerifyer(var_1_0D, ldfld:ICertificateVerifyer(LegacyTlsClient::verifyer, ldloc:LegacyTlsClient(this)))
|
||||
stloc:IClientCredentialsProvider(var_2_14, ldfld:IClientCredentialsProvider(LegacyTlsClient::credProvider, ldloc:LegacyTlsClient(this)))
|
||||
stfld:ICertificateVerifyer(LegacyTlsAuthentication::verifyer, ldloc:LegacyTlsAuthentication(var_3), ldloc:ICertificateVerifyer(var_1_0D))
|
||||
stfld:IClientCredentialsProvider(LegacyTlsAuthentication::credProvider, ldloc:LegacyTlsAuthentication(var_3), ldloc:IClientCredentialsProvider(var_2_14))
|
||||
stfld:Uri(LegacyTlsAuthentication::TargetUri, ldloc:LegacyTlsAuthentication(var_3), ldloc:Uri(var_0_06))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x040055BE RID: 21950
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40055BE")]
|
||||
private readonly Uri TargetUri;
|
||||
|
||||
// Token: 0x040055BF RID: 21951
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40055BF")]
|
||||
private readonly ICertificateVerifyer verifyer;
|
||||
|
||||
// Token: 0x040055C0 RID: 21952
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40055C0")]
|
||||
private readonly IClientCredentialsProvider credProvider;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user