using System; using System.Runtime.InteropServices; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto; using BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509 { // Token: 0x02001326 RID: 4902 [Token(Token = "0x2001326")] [StructLayout(3)] public class X509CertificatePair { // Token: 0x06007AF6 RID: 31478 RVA: 0x00199260 File Offset: 0x00197460 [Token(Token = "0x6007AF6")] [Address(RVA = "0x3C39C0", Offset = "0x3C23C0", VA = "0x1803C39C0")] public X509CertificatePair(X509Certificate forward, X509Certificate reverse) { this.forward = forward; this.reverse = reverse; } // Token: 0x06007AF7 RID: 31479 RVA: 0x00199284 File Offset: 0x00197484 [Token(Token = "0x6007AF7")] [Address(RVA = "0x52FB70", Offset = "0x52E570", VA = "0x18052FB70")] public X509CertificatePair(CertificatePair pair) { X509CertificateStructure x509CertificateStructure = pair.forward; if (x509CertificateStructure != 0) { X509Certificate x509Certificate = new X509Certificate(x509CertificateStructure); this.forward = x509Certificate; } X509CertificateStructure x509CertificateStructure2 = pair.reverse; if (x509CertificateStructure2 != 0) { X509Certificate x509Certificate2 = new X509Certificate(x509CertificateStructure2); this.reverse = x509Certificate2; } } // Token: 0x06007AF8 RID: 31480 RVA: 0x001992D0 File Offset: 0x001974D0 [Token(Token = "0x6007AF8")] [Address(RVA = "0x52F940", Offset = "0x52E340", VA = "0x18052F940")] public byte[] GetEncoded() { int num = 0; X509Certificate x509Certificate = this.forward; if (x509Certificate != 0) { AsymmetricKeyParameter publicKey = x509Certificate.GetPublicKey(); Asn1Object asn1Object; if (X509CertificateStructure.GetInstance(asn1Object) == 0) { CertificateEncodingException ex = new CertificateEncodingException("unable to get encoding for forward"); goto IL_61; } } X509Certificate x509Certificate2 = this.reverse; X509CertificateStructure instance; if (x509Certificate2 != 0) { AsymmetricKeyParameter publicKey2 = x509Certificate2.GetPublicKey(); Asn1Object asn1Object2; instance = X509CertificateStructure.GetInstance(asn1Object2); if (instance == 0) { goto IL_61; } } return new CertificatePair(num, instance).GetDerEncoded(); IL_61: CertificateEncodingException ex2 = new CertificateEncodingException("unable to get encoding for reverse"); throw new NullReferenceException(); } // Token: 0x1700140C RID: 5132 // (get) Token: 0x06007AF9 RID: 31481 RVA: 0x00199350 File Offset: 0x00197550 [Token(Token = "0x1700140C")] public X509Certificate Forward { [Token(Token = "0x6007AF9")] [Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")] get { return this.forward; } } // Token: 0x1700140D RID: 5133 // (get) Token: 0x06007AFA RID: 31482 RVA: 0x00199364 File Offset: 0x00197564 [Token(Token = "0x1700140D")] public X509Certificate Reverse { [Token(Token = "0x6007AFA")] [Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")] get { return this.reverse; } } // Token: 0x06007AFB RID: 31483 RVA: 0x00199378 File Offset: 0x00197578 [Token(Token = "0x6007AFB")] [Address(RVA = "0x52F870", Offset = "0x52E270", VA = "0x18052F870", Slot = "0")] public override bool Equals(object obj) { if (obj != this) { if (obj != 0 && obj != 0) { X509Certificate x509Certificate = this.forward; bool flag; if (flag) { X509Certificate x509Certificate2 = this.reverse; bool flag2; return flag2; } } } return true; } // Token: 0x06007AFC RID: 31484 RVA: 0x001993AC File Offset: 0x001975AC [Token(Token = "0x6007AFC")] [Address(RVA = "0x52FB00", Offset = "0x52E500", VA = "0x18052FB00", Slot = "2")] public override int GetHashCode() { /* An exception occurred when decompiling this method (06007AFC) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509CertificatePair::GetHashCode() ---> System.Exception: Basic block has to end with unconditional control flow. { Block_1: callvirt:void(object::Finalize, ldloc:X509Certificate[exp:object](var_1_17)) stloc:int64(var_2_28, mul:uint32[exp:int64](conv.u4:uint32(ldc.i4:int32[exp:uint32](-1)), conv.u4:uint32(ldc.i4:int32[exp:uint32](17)))) } 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: 0x04005844 RID: 22596 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x4005844")] private readonly X509Certificate forward; // Token: 0x04005845 RID: 22597 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x4005845")] private readonly X509Certificate reverse; } }