using System; using System.Collections; using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Threading; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Utilities; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators; using BestHTTP.SecureProtocol.Org.BouncyCastle.Math; using BestHTTP.SecureProtocol.Org.BouncyCastle.Security; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509 { // Token: 0x02001325 RID: 4901 [Token(Token = "0x2001325")] [StructLayout(3)] public class X509Certificate : X509ExtensionBase { // Token: 0x06007AD2 RID: 31442 RVA: 0x001987A8 File Offset: 0x001969A8 [Token(Token = "0x6007AD2")] [Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")] protected X509Certificate() { } // Token: 0x06007AD3 RID: 31443 RVA: 0x001987BC File Offset: 0x001969BC [Token(Token = "0x6007AD3")] [Address(RVA = "0x5324B0", Offset = "0x530EB0", VA = "0x1805324B0")] public X509Certificate(X509CertificateStructure c) { this.c = c; DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier("2.5.29.19"); if (this.GetCriticalExtensionOids() != 0) { Asn1Object asn1Object; BasicConstraints instance = BasicConstraints.GetInstance(asn1Object); this.basicConstraints = instance; } DerObjectIdentifier derObjectIdentifier2 = new DerObjectIdentifier("2.5.29.15"); if (this.GetCriticalExtensionOids() == 0) { int num = 0; this.keyUsage = num; } Asn1Object asn1Object2; DerBitString instance2 = DerBitString.GetInstance(asn1Object2); byte[] octets = instance2.GetOctets(); byte[] bytes = instance2.GetBytes(); int num2 = octets.Length; num2 -= bytes; bool[] array = new bool[9]; this.keyUsage = array; int num3 = 0; while (num3 == num2) { } bool[] array2 = this.keyUsage; uint num4; num3 += (int)num4; num3 -= (int)num4; num3++; } // Token: 0x17001400 RID: 5120 // (get) Token: 0x06007AD4 RID: 31444 RVA: 0x001988AC File Offset: 0x00196AAC [Token(Token = "0x17001400")] public virtual X509CertificateStructure CertificateStructure { [Token(Token = "0x6007AD4")] [Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "13")] get { return this.c; } } // Token: 0x17001401 RID: 5121 // (get) Token: 0x06007AD5 RID: 31445 RVA: 0x001988C0 File Offset: 0x00196AC0 [Token(Token = "0x17001401")] public virtual bool IsValidNow { [Token(Token = "0x6007AD5")] [Address(RVA = "0x532790", Offset = "0x531190", VA = "0x180532790", Slot = "14")] get { /* An exception occurred when decompiling this method (06007AD5) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::get_IsValidNow() ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:DateTime(var_1_07, callgetter:DateTime(DateTime::get_UtcNow)) stloc:ISet(var_2_0E, call:ISet(IX509Extension::GetCriticalExtensionOids, ldloc:X509Certificate[exp:IX509Extension](this))) } 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: 0x06007AD6 RID: 31446 RVA: 0x001988DC File Offset: 0x00196ADC [Token(Token = "0x6007AD6")] [Address(RVA = "0x531760", Offset = "0x530160", VA = "0x180531760", Slot = "15")] public virtual bool IsValid(DateTime time) { X509Name subjectDN = this.SubjectDN; return this.NotBefore <= 0; } // Token: 0x06007AD7 RID: 31447 RVA: 0x00198900 File Offset: 0x00196B00 [Token(Token = "0x6007AD7")] [Address(RVA = "0x530A20", Offset = "0x52F420", VA = "0x180530A20", Slot = "16")] public virtual void CheckValidity() { DateTime utcNow = DateTime.UtcNow; ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids(); } // Token: 0x06007AD8 RID: 31448 RVA: 0x0019891C File Offset: 0x00196B1C [Token(Token = "0x6007AD8")] [Address(RVA = "0x530A90", Offset = "0x52F490", VA = "0x180530A90", Slot = "17")] public virtual void CheckValidity(DateTime time) { DateTime notBefore = this.NotBefore; X509Name subjectDN = this.SubjectDN; } // Token: 0x17001402 RID: 5122 // (get) Token: 0x06007AD9 RID: 31449 RVA: 0x00198958 File Offset: 0x00196B58 [Token(Token = "0x17001402")] public virtual int Version { [Token(Token = "0x6007AD9")] [Address(RVA = "0x5329F0", Offset = "0x5313F0", VA = "0x1805329F0", Slot = "18")] get { return this.c.Version; } } // Token: 0x17001403 RID: 5123 // (get) Token: 0x06007ADA RID: 31450 RVA: 0x00198978 File Offset: 0x00196B78 [Token(Token = "0x17001403")] public virtual BigInteger SerialNumber { [Token(Token = "0x6007ADA")] [Address(RVA = "0x5328B0", Offset = "0x5312B0", VA = "0x1805328B0", Slot = "19")] get { return this.c.SerialNumber.Value; } } // Token: 0x17001404 RID: 5124 // (get) Token: 0x06007ADB RID: 31451 RVA: 0x0019899C File Offset: 0x00196B9C [Token(Token = "0x17001404")] public virtual X509Name IssuerDN { [Token(Token = "0x6007ADB")] [Address(RVA = "0x532800", Offset = "0x531200", VA = "0x180532800", Slot = "20")] get { return this.c.Issuer; } } // Token: 0x17001405 RID: 5125 // (get) Token: 0x06007ADC RID: 31452 RVA: 0x001989BC File Offset: 0x00196BBC [Token(Token = "0x17001405")] public virtual X509Name SubjectDN { [Token(Token = "0x6007ADC")] [Address(RVA = "0x5329A0", Offset = "0x5313A0", VA = "0x1805329A0", Slot = "21")] get { return this.c.Subject; } } // Token: 0x17001406 RID: 5126 // (get) Token: 0x06007ADD RID: 31453 RVA: 0x001989DC File Offset: 0x00196BDC [Token(Token = "0x17001406")] public virtual DateTime NotBefore { [Token(Token = "0x6007ADD")] [Address(RVA = "0x532880", Offset = "0x531280", VA = "0x180532880", Slot = "22")] get { return this.c.StartDate.ToDateTime(); } } // Token: 0x17001407 RID: 5127 // (get) Token: 0x06007ADE RID: 31454 RVA: 0x00198A00 File Offset: 0x00196C00 [Token(Token = "0x17001407")] public virtual DateTime NotAfter { [Token(Token = "0x6007ADE")] [Address(RVA = "0x532850", Offset = "0x531250", VA = "0x180532850", Slot = "23")] get { return this.c.EndDate.ToDateTime(); } } // Token: 0x06007ADF RID: 31455 RVA: 0x00198A24 File Offset: 0x00196C24 [Token(Token = "0x6007ADF")] [Address(RVA = "0x531580", Offset = "0x52FF80", VA = "0x180531580", Slot = "24")] public virtual byte[] GetTbsCertificate() { return this.c.tbsCert.GetDerEncoded(); } // Token: 0x06007AE0 RID: 31456 RVA: 0x00198A48 File Offset: 0x00196C48 [Token(Token = "0x6007AE0")] [Address(RVA = "0x531510", Offset = "0x52FF10", VA = "0x180531510", Slot = "25")] public virtual byte[] GetSignature() { return this.c.GetSignatureOctets(); } // Token: 0x17001408 RID: 5128 // (get) Token: 0x06007AE1 RID: 31457 RVA: 0x00198A68 File Offset: 0x00196C68 [Token(Token = "0x17001408")] public virtual string SigAlgName { [Token(Token = "0x6007AE1")] [Address(RVA = "0x5328E0", Offset = "0x5312E0", VA = "0x1805328E0", Slot = "26")] get { Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object(); string text; return text; } } // Token: 0x17001409 RID: 5129 // (get) Token: 0x06007AE2 RID: 31458 RVA: 0x00198A90 File Offset: 0x00196C90 [Token(Token = "0x17001409")] public virtual string SigAlgOid { [Token(Token = "0x6007AE2")] [Address(RVA = "0x532960", Offset = "0x531360", VA = "0x180532960", Slot = "27")] get { Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object(); throw new NullReferenceException(); } } // Token: 0x06007AE3 RID: 31459 RVA: 0x00198AB4 File Offset: 0x00196CB4 [Token(Token = "0x6007AE3")] [Address(RVA = "0x531490", Offset = "0x52FE90", VA = "0x180531490", Slot = "28")] public virtual byte[] GetSigAlgParams() { if (this.c.sigAlgID.ObjectID == 0) { } return this.c.sigAlgID.ObjectID.GetDerEncoded(); } // Token: 0x1700140A RID: 5130 // (get) Token: 0x06007AE4 RID: 31460 RVA: 0x00198AF0 File Offset: 0x00196CF0 [Token(Token = "0x1700140A")] public virtual DerBitString IssuerUniqueID { [Token(Token = "0x6007AE4")] [Address(RVA = "0x532820", Offset = "0x531220", VA = "0x180532820", Slot = "29")] get { return this.c.tbsCert.issuerUniqueID; } } // Token: 0x1700140B RID: 5131 // (get) Token: 0x06007AE5 RID: 31461 RVA: 0x00198B14 File Offset: 0x00196D14 [Token(Token = "0x1700140B")] public virtual DerBitString SubjectUniqueID { [Token(Token = "0x6007AE5")] [Address(RVA = "0x5329C0", Offset = "0x5313C0", VA = "0x1805329C0", Slot = "30")] get { return this.c.tbsCert.subjectUniqueID; } } // Token: 0x06007AE6 RID: 31462 RVA: 0x00198B38 File Offset: 0x00196D38 [Token(Token = "0x6007AE6")] [Address(RVA = "0x5313E0", Offset = "0x52FDE0", VA = "0x1805313E0", Slot = "31")] public virtual bool[] GetKeyUsage() { while (this.keyUsage != 0) { } } // Token: 0x06007AE7 RID: 31463 RVA: 0x00198B50 File Offset: 0x00196D50 [Token(Token = "0x6007AE7")] [Address(RVA = "0x530F50", Offset = "0x52F950", VA = "0x180530F50", Slot = "32")] public virtual IList GetExtendedKeyUsage() { int num = 0; DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier("2.5.29.37"); if (this.GetCriticalExtensionOids() == 0) { throw new NullReferenceException(); } Asn1Object asn1Object; Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object); IList list = Platform.CreateArrayList(); IEnumerator enumerator = instance.GetEnumerator(); if (enumerator != 0) { if (num < enumerator) { num += num; num++; } if (enumerator == 0) { throw new NullReferenceException(); } if (num < enumerator) { num += num; num++; } num += 2; num += 19; } if (num != 0) { } if (num != -1) { } if (num == 0) { return list; } throw new NullReferenceException(); } // Token: 0x06007AE8 RID: 31464 RVA: 0x00198BE4 File Offset: 0x00196DE4 [Token(Token = "0x6007AE8")] [Address(RVA = "0x530ED0", Offset = "0x52F8D0", VA = "0x180530ED0", Slot = "33")] public virtual int GetBasicConstraints() { BasicConstraints basicConstraints = this.basicConstraints; if (basicConstraints == 0 || !basicConstraints.IsCA()) { return -1; } if (this.basicConstraints.PathLenConstraint != 0) { return this.basicConstraints.PathLenConstraint.IntValue; } return int.MaxValue; } // Token: 0x06007AE9 RID: 31465 RVA: 0x00198C34 File Offset: 0x00196E34 [Token(Token = "0x6007AE9")] [Address(RVA = "0x531530", Offset = "0x52FF30", VA = "0x180531530", Slot = "34")] public virtual ICollection GetSubjectAlternativeNames() { /* An exception occurred when decompiling this method (06007AE9) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.ICollection BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::GetSubjectAlternativeNames() ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:ISet(var_0_06, call:ISet(IX509Extension::GetCriticalExtensionOids, ldloc:X509Certificate[exp:IX509Extension](this))) } 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: 0x06007AEA RID: 31466 RVA: 0x00198C48 File Offset: 0x00196E48 [Token(Token = "0x6007AEA")] [Address(RVA = "0x531390", Offset = "0x52FD90", VA = "0x180531390", Slot = "35")] public virtual ICollection GetIssuerAlternativeNames() { /* An exception occurred when decompiling this method (06007AEA) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.ICollection BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::GetIssuerAlternativeNames() ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:ISet(var_0_06, call:ISet(IX509Extension::GetCriticalExtensionOids, ldloc:X509Certificate[exp:IX509Extension](this))) } 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: 0x06007AEB RID: 31467 RVA: 0x00198C5C File Offset: 0x00196E5C [Token(Token = "0x6007AEB")] [Address(RVA = "0x530CC0", Offset = "0x52F6C0", VA = "0x180530CC0", Slot = "36")] protected virtual ICollection GetAlternativeNames(string oid) { DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid); if (this.GetCriticalExtensionOids() != 0) { Asn1Object asn1Object; GeneralNames instance = GeneralNames.GetInstance(asn1Object); IList list = Platform.CreateArrayList(); GeneralName[] names = instance.GetNames(); int num = 0; int length = names.Length; if (num < length) { GeneralName generalName = names[num]; IList list2 = Platform.CreateArrayList(); int tag = generalName.tag; int hashCode = generalName.obj.GetHashCode(); num++; } } throw new NullReferenceException(); } // Token: 0x06007AEC RID: 31468 RVA: 0x00198CDC File Offset: 0x00196EDC [Token(Token = "0x6007AEC")] [Address(RVA = "0x5315B0", Offset = "0x52FFB0", VA = "0x1805315B0", Slot = "8")] protected override X509Extensions GetX509Extensions() { int version = this.c.Version; return this.c.tbsCert.extensions; } // Token: 0x06007AED RID: 31469 RVA: 0x00198D10 File Offset: 0x00196F10 [Token(Token = "0x6007AED")] [Address(RVA = "0x531460", Offset = "0x52FE60", VA = "0x180531460", Slot = "37")] public virtual AsymmetricKeyParameter GetPublicKey() { return PublicKeyFactory.CreateKey(this.c.SubjectPublicKeyInfo); } // Token: 0x06007AEE RID: 31470 RVA: 0x00198D34 File Offset: 0x00196F34 [Token(Token = "0x6007AEE")] [Address(RVA = "0x4DE0B0", Offset = "0x4DCAB0", VA = "0x1804DE0B0", Slot = "38")] public virtual byte[] GetEncoded() { return this.c.GetDerEncoded(); } // Token: 0x06007AEF RID: 31471 RVA: 0x00198D54 File Offset: 0x00196F54 [Token(Token = "0x6007AEF")] [Address(RVA = "0x530C00", Offset = "0x52F600", VA = "0x180530C00", Slot = "0")] public override bool Equals(object obj) { if (obj != this) { if (obj != 0 && obj != 0) { Asn1Object asn1Object = this.c.ToAsn1Object(); } } return true; } // Token: 0x06007AF0 RID: 31472 RVA: 0x00198D84 File Offset: 0x00196F84 [Token(Token = "0x6007AF0")] [Address(RVA = "0x5312B0", Offset = "0x52FCB0", VA = "0x1805312B0", Slot = "2")] public override int GetHashCode() { int num = 0; if ((this.hashValueSet ? 1 : 0) == num) { this.c.Finalize(); this.hashValueSet = true; } Monitor.Exit(this); if (num != -1) { } if (num == 0) { return this.hashValue; } throw new NullReferenceException(); } // Token: 0x06007AF1 RID: 31473 RVA: 0x00198DC8 File Offset: 0x00196FC8 [Token(Token = "0x6007AF1")] [Address(RVA = "0x5317D0", Offset = "0x5301D0", VA = "0x1805317D0", Slot = "3")] public override string ToString() { StringBuilder stringBuilder; X509Extensions extensions; int num6; do { stringBuilder = new StringBuilder(); string newLine = Platform.NewLine; StringBuilder stringBuilder2 = stringBuilder.Append(" [0] Version: "); StringBuilder stringBuilder4; StringBuilder stringBuilder3 = stringBuilder4.Append(newLine); StringBuilder stringBuilder5 = stringBuilder.Append(" SerialNumber: "); int version = this.Version; StringBuilder stringBuilder6 = stringBuilder5.Append(version).Append(newLine); StringBuilder stringBuilder7 = stringBuilder.Append(" IssuerDN: "); BigInteger serialNumber = this.SerialNumber; StringBuilder stringBuilder8 = stringBuilder7.Append(serialNumber).Append(newLine); StringBuilder stringBuilder9 = stringBuilder.Append(" Start Date: "); X509Name subjectDN = this.SubjectDN; StringBuilder stringBuilder10 = stringBuilder9.Append(subjectDN).Append(newLine); StringBuilder stringBuilder11 = stringBuilder.Append(" Final Date: "); DateTime notBefore = this.NotBefore; StringBuilder stringBuilder12 = stringBuilder11.Append(notBefore).Append(newLine); StringBuilder stringBuilder13 = stringBuilder.Append(" SubjectDN: "); X509Name issuerDN = this.IssuerDN; StringBuilder stringBuilder14 = stringBuilder13.Append(issuerDN).Append(newLine); StringBuilder stringBuilder15 = stringBuilder.Append(" Public Key: "); StringBuilder stringBuilder17; StringBuilder stringBuilder16 = stringBuilder17.Append(newLine); StringBuilder stringBuilder18 = stringBuilder.Append(" Signature Algorithm: "); byte[] signature = this.GetSignature(); StringBuilder stringBuilder20; StringBuilder stringBuilder19 = stringBuilder20.Append(newLine); byte[] tbsCertificate = this.GetTbsCertificate(); StringBuilder stringBuilder21 = stringBuilder.Append(" Signature: "); int num = 0; string text = Hex.ToHexString(tbsCertificate, num, 20); StringBuilder stringBuilder22 = stringBuilder21.Append(text).Append(newLine); int length = tbsCertificate.Length; uint num2; if (num2 < (uint)length) { int num3 = tbsCertificate.Length; num3 -= (int)num2; int num4 = Math.Min(20, num3); StringBuilder stringBuilder23 = stringBuilder.Append(" "); string text2 = Hex.ToHexString(tbsCertificate, (int)num2, num4); StringBuilder stringBuilder24 = stringBuilder23.Append(text2).Append(newLine); num2 += (uint)20; } extensions = this.c.tbsCert.extensions; if (extensions == 0) { goto IL_30B; } int num5; if (extensions.ExtensionOids != 0) { num5 = 0; StringBuilder stringBuilder25 = stringBuilder.Append(" Extensions: \n"); } num6 = 0; if (num6 < num5) { num6 += num6; num6++; } if (num6 == 0) { num6++; num6 += 19; } } while (num6 == 0); X509Extension extension = extensions.GetExtension(num6); Asn1OctetString value = extension.value; int num7; if (value != 0) { Stream octetStream = value.GetOctetStream(); StringBuilder stringBuilder26 = stringBuilder.Append(" critical("); bool critical = extension.critical; StringBuilder stringBuilder27 = stringBuilder26.Append(critical).Append(") "); StringBuilder stringBuilder28 = stringBuilder.Append(" value = "); Asn1Object asn1Object; string text3 = Asn1Dump.DumpAsString(asn1Object); StringBuilder stringBuilder29 = stringBuilder28.Append(text3); VerisignCzagExtension verisignCzagExtension = new VerisignCzagExtension(verisignCzagExtension); StringBuilder stringBuilder30 = stringBuilder.Append(verisignCzagExtension); NetscapeRevocationUrl netscapeRevocationUrl = new NetscapeRevocationUrl(netscapeRevocationUrl); StringBuilder stringBuilder31 = stringBuilder.Append(netscapeRevocationUrl); NetscapeCertType netscapeCertType = new NetscapeCertType(netscapeCertType); StringBuilder stringBuilder32 = stringBuilder.Append(netscapeCertType); KeyUsage instance = KeyUsage.GetInstance(asn1Object); StringBuilder stringBuilder33 = stringBuilder.Append(instance); BasicConstraints instance2 = BasicConstraints.GetInstance(asn1Object); StringBuilder stringBuilder34 = stringBuilder.Append(instance2); StringBuilder stringBuilder35 = stringBuilder.Append(" value = ").Append("*****"); num7 = 0; } num7 += num7; num7++; while (num7 != 0) { } IL_30B: int num8 = stringBuilder.GetHashCode(); num8 += 19; throw new NullReferenceException(); } // Token: 0x06007AF2 RID: 31474 RVA: 0x001990F4 File Offset: 0x001972F4 [Token(Token = "0x6007AF2")] [Address(RVA = "0x532410", Offset = "0x530E10", VA = "0x180532410", Slot = "39")] public virtual void Verify(AsymmetricKeyParameter key) { Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.c.sigAlgID, key); ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids(); } // Token: 0x06007AF3 RID: 31475 RVA: 0x00199120 File Offset: 0x00197320 [Token(Token = "0x6007AF3")] [Address(RVA = "0x532390", Offset = "0x530D90", VA = "0x180532390", Slot = "40")] public virtual void Verify(IVerifierFactoryProvider verifierProvider) { X509CertificateStructure x509CertificateStructure = this.c; ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids(); } // Token: 0x06007AF4 RID: 31476 RVA: 0x00199144 File Offset: 0x00197344 [Token(Token = "0x6007AF4")] [Address(RVA = "0x5306A0", Offset = "0x52F0A0", VA = "0x1805306A0", Slot = "41")] protected virtual void CheckSignature(IVerifierFactory verifier) { /* An exception occurred when decompiling this method (06007AF4) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::CheckSignature(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IVerifierFactory) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_AB: stloc:CertificateException(var_14_B5, newobj:CertificateException(CertificateException::.ctor, ldstr:string("signature algorithm in TBS cert not same as outer cert"))) } 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: 0x06007AF5 RID: 31477 RVA: 0x00199208 File Offset: 0x00197408 [Token(Token = "0x6007AF5")] [Address(RVA = "0x531600", Offset = "0x530000", VA = "0x180531600")] private static bool IsAlgIDEqual(AlgorithmIdentifier id1, AlgorithmIdentifier id2) { Asn1Object asn1Object = id1.ToAsn1Object(); if (id2.ToAsn1Object() == 0) { throw new NullReferenceException(); } DerObjectIdentifier objectID = id1.ObjectID; DerObjectIdentifier objectID2 = id2.ObjectID; bool flag = objectID2 == 0; if (objectID == 0 != flag) { if (objectID == 0) { } return objectID.ToAsn1Object() != 0; } return object.Equals(objectID, objectID2); } // Token: 0x0400583F RID: 22591 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x400583F")] private readonly X509CertificateStructure c; // Token: 0x04005840 RID: 22592 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x4005840")] private readonly BasicConstraints basicConstraints; // Token: 0x04005841 RID: 22593 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x4005841")] private readonly bool[] keyUsage; // Token: 0x04005842 RID: 22594 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x4005842")] private bool hashValueSet; // Token: 0x04005843 RID: 22595 [global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")] [Token(Token = "0x4005843")] private int hashValue; } }