m
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x0200195F RID: 6495
|
||||
[Token(Token = "0x200195F")]
|
||||
public class AlwaysValidVerifyer : ICertificateVerifyer
|
||||
{
|
||||
// Token: 0x06009659 RID: 38489 RVA: 0x001E98FC File Offset: 0x001E7AFC
|
||||
[Token(Token = "0x6009659")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "4")]
|
||||
public bool IsValid(Uri targetUri, X509CertificateStructure[] certs)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x0600965A RID: 38490 RVA: 0x001E990C File Offset: 0x001E7B0C
|
||||
[Token(Token = "0x600965A")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public AlwaysValidVerifyer()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001960 RID: 6496
|
||||
[Token(Token = "0x2001960")]
|
||||
public interface ICertificateVerifyer
|
||||
{
|
||||
// Token: 0x0600965B RID: 38491
|
||||
[Token(Token = "0x600965B")]
|
||||
[Address(Slot = "0")]
|
||||
bool IsValid(Uri targetUri, X509CertificateStructure[] certs);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001961 RID: 6497
|
||||
[Token(Token = "0x2001961")]
|
||||
public interface IClientCredentialsProvider
|
||||
{
|
||||
// Token: 0x0600965C RID: 38492
|
||||
[Token(Token = "0x600965C")]
|
||||
[Address(Slot = "0")]
|
||||
TlsCredentials GetClientCredentials(TlsContext context, CertificateRequest certificateRequest);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001962 RID: 6498
|
||||
[Token(Token = "0x2001962")]
|
||||
public class LegacyTlsAuthentication : TlsAuthentication
|
||||
{
|
||||
// Token: 0x0600965D RID: 38493 RVA: 0x001E9920 File Offset: 0x001E7B20
|
||||
[Token(Token = "0x600965D")]
|
||||
[Address(RVA = "0x151B120", Offset = "0x151A120", VA = "0x18151B120")]
|
||||
public LegacyTlsAuthentication(Uri targetUri, ICertificateVerifyer verifyer, IClientCredentialsProvider prov)
|
||||
{
|
||||
this.TargetUri = targetUri;
|
||||
this.verifyer = verifyer;
|
||||
this.credProvider = prov;
|
||||
}
|
||||
|
||||
// Token: 0x0600965E RID: 38494 RVA: 0x001E9948 File Offset: 0x001E7B48
|
||||
[Token(Token = "0x600965E")]
|
||||
[Address(RVA = "0x151B000", Offset = "0x151A000", VA = "0x18151B000", Slot = "6")]
|
||||
public virtual void NotifyServerCertificate(Certificate serverCertificate)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600965E)
|
||||
|
||||
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: 0x0600965F RID: 38495 RVA: 0x001E9988 File Offset: 0x001E7B88
|
||||
[Token(Token = "0x600965F")]
|
||||
[Address(RVA = "0x151AF30", Offset = "0x1519F30", VA = "0x18151AF30", 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: 0x0400660E RID: 26126
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400660E")]
|
||||
protected ICertificateVerifyer verifyer;
|
||||
|
||||
// Token: 0x0400660F RID: 26127
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400660F")]
|
||||
protected IClientCredentialsProvider credProvider;
|
||||
|
||||
// Token: 0x04006610 RID: 26128
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006610")]
|
||||
protected Uri TargetUri;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001963 RID: 6499
|
||||
[Token(Token = "0x2001963")]
|
||||
public sealed class LegacyTlsClient : DefaultTlsClient
|
||||
{
|
||||
// Token: 0x06009660 RID: 38496 RVA: 0x001E99B8 File Offset: 0x001E7BB8
|
||||
[Token(Token = "0x6009660")]
|
||||
[Address(RVA = "0x151B1F0", Offset = "0x151A1F0", VA = "0x18151B1F0")]
|
||||
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: 0x06009661 RID: 38497 RVA: 0x001E99E8 File Offset: 0x001E7BE8
|
||||
[Token(Token = "0x6009661")]
|
||||
[Address(RVA = "0x151B170", Offset = "0x151A170", VA = "0x18151B170", Slot = "58")]
|
||||
public override TlsAuthentication GetAuthentication()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009661)
|
||||
|
||||
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: 0x04006611 RID: 26129
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4006611")]
|
||||
private readonly Uri TargetUri;
|
||||
|
||||
// Token: 0x04006612 RID: 26130
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4006612")]
|
||||
private readonly ICertificateVerifyer verifyer;
|
||||
|
||||
// Token: 0x04006613 RID: 26131
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4006613")]
|
||||
private readonly IClientCredentialsProvider credProvider;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user