using System; using System.Runtime.InteropServices; using System.Text; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities; using BestHTTP.SecureProtocol.Org.BouncyCastle.X509; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix { // Token: 0x020013AB RID: 5035 [Token(Token = "0x20013AB")] [StructLayout(3)] public class TrustAnchor { // Token: 0x0600802D RID: 32813 RVA: 0x001B0478 File Offset: 0x001AE678 [Token(Token = "0x600802D")] [Address(RVA = "0xCFB260", Offset = "0xCF9C60", VA = "0x180CFB260")] public TrustAnchor(X509Certificate trustedCert, byte[] nameConstraints) { /* An exception occurred when decompiling this method (0600802D) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.TrustAnchor::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate,System.Byte[]) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_30: stloc:ArgumentNullException(var_1_3A, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("trustedCert"))) } 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: 0x0600802E RID: 32814 RVA: 0x001B04C0 File Offset: 0x001AE6C0 [Token(Token = "0x600802E")] [Address(RVA = "0xCFB310", Offset = "0xCF9D10", VA = "0x180CFB310")] public TrustAnchor(X509Name caPrincipal, AsymmetricKeyParameter pubKey, byte[] nameConstraints) { /* An exception occurred when decompiling this method (0600802E) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.TrustAnchor::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.X509Name,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter,System.Byte[]) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_46: stloc:ArgumentNullException(var_2_50, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("pubKey"))) } 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: 0x0600802F RID: 32815 RVA: 0x001B0520 File Offset: 0x001AE720 [Token(Token = "0x600802F")] [Address(RVA = "0xCFB410", Offset = "0xCF9E10", VA = "0x180CFB410")] public TrustAnchor(string caName, AsymmetricKeyParameter pubKey, byte[] nameConstraints) { /* An exception occurred when decompiling this method (0600802F) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.TrustAnchor::.ctor(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter,System.Byte[]) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_4F: stloc:ArgumentNullException(var_2_59, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("pubKey"))) } 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: 0x170014F0 RID: 5360 // (get) Token: 0x06008030 RID: 32816 RVA: 0x001B0588 File Offset: 0x001AE788 [Token(Token = "0x170014F0")] public X509Certificate TrustedCert { [Token(Token = "0x6008030")] [Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")] get { return this.trustedCert; } } // Token: 0x170014F1 RID: 5361 // (get) Token: 0x06008031 RID: 32817 RVA: 0x001B059C File Offset: 0x001AE79C [Token(Token = "0x170014F1")] public X509Name CA { [Token(Token = "0x6008031")] [Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")] get { return this.caPrincipal; } } // Token: 0x170014F2 RID: 5362 // (get) Token: 0x06008032 RID: 32818 RVA: 0x001B05B0 File Offset: 0x001AE7B0 [Token(Token = "0x170014F2")] public string CAName { [Token(Token = "0x6008032")] [Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")] get { return this.caName; } } // Token: 0x170014F3 RID: 5363 // (get) Token: 0x06008033 RID: 32819 RVA: 0x001B05C4 File Offset: 0x001AE7C4 [Token(Token = "0x170014F3")] public AsymmetricKeyParameter CAPublicKey { [Token(Token = "0x6008033")] [Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")] get { return this.pubKey; } } // Token: 0x06008034 RID: 32820 RVA: 0x001B05D8 File Offset: 0x001AE7D8 [Token(Token = "0x6008034")] [Address(RVA = "0xCFB5C0", Offset = "0xCF9FC0", VA = "0x180CFB5C0")] private void setNameConstraints(byte[] bytes) { if (bytes != 0) { NameConstraints instance = NameConstraints.GetInstance(Asn1Object.FromByteArray(bytes)); this.nc = instance; return; } int num = 0; this.ncBytes = num; this.nc = num; } // Token: 0x170014F4 RID: 5364 // (get) Token: 0x06008035 RID: 32821 RVA: 0x001B0610 File Offset: 0x001AE810 [Token(Token = "0x170014F4")] public byte[] GetNameConstraints { [Token(Token = "0x6008035")] [Address(RVA = "0xCFB560", Offset = "0xCF9F60", VA = "0x180CFB560")] get { return Arrays.Clone(this.ncBytes); } } // Token: 0x06008036 RID: 32822 RVA: 0x001B0628 File Offset: 0x001AE828 [Token(Token = "0x6008036")] [Address(RVA = "0xCFB0A0", Offset = "0xCF9AA0", VA = "0x180CFB0A0", Slot = "3")] public override string ToString() { string newLine = Platform.NewLine; StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = stringBuilder.Append("["); StringBuilder stringBuilder3 = stringBuilder.Append(newLine); int num = 0; if (this.pubKey == num) { StringBuilder stringBuilder4 = stringBuilder.Append(" Trusted CA cert: "); X509Certificate x509Certificate = this.trustedCert; StringBuilder stringBuilder5 = stringBuilder4.Append(x509Certificate); } StringBuilder stringBuilder6 = stringBuilder.Append(" Trusted CA Public Key: "); AsymmetricKeyParameter asymmetricKeyParameter = this.pubKey; StringBuilder stringBuilder7 = stringBuilder6.Append(asymmetricKeyParameter).Append(newLine); StringBuilder stringBuilder8 = stringBuilder.Append(" Trusted CA Issuer Name: "); string text = this.caName; StringBuilder stringBuilder9 = stringBuilder8.Append(text).Append(newLine); if (this.nc != (ulong)0L) { StringBuilder stringBuilder10 = stringBuilder.Append(" Name Constraints: "); NameConstraints nameConstraints = this.nc; StringBuilder stringBuilder11 = stringBuilder10.Append(nameConstraints).Append(newLine); } throw new NullReferenceException(); } // Token: 0x04005AD5 RID: 23253 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x4005AD5")] private readonly AsymmetricKeyParameter pubKey; // Token: 0x04005AD6 RID: 23254 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x4005AD6")] private readonly string caName; // Token: 0x04005AD7 RID: 23255 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x4005AD7")] private readonly X509Name caPrincipal; // Token: 0x04005AD8 RID: 23256 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x4005AD8")] private readonly X509Certificate trustedCert; // Token: 0x04005AD9 RID: 23257 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x4005AD9")] private byte[] ncBytes; // Token: 0x04005ADA RID: 23258 [global::Cpp2IlInjected.FieldOffset(Offset = "0x38")] [Token(Token = "0x4005ADA")] private NameConstraints nc; } }