using System; using System.Collections; using System.Runtime.InteropServices; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms { // Token: 0x02001961 RID: 6497 [Token(Token = "0x2001961")] [StructLayout(3)] public class SignedData : Asn1Encodable { // Token: 0x0600AE6F RID: 44655 RVA: 0x0028CEB0 File Offset: 0x0028B0B0 [Token(Token = "0x600AE6F")] [Address(RVA = "0x2900680", Offset = "0x28FF080", VA = "0x182900680")] public static SignedData GetInstance(object obj) { /* An exception occurred when decompiling this method (0600AE6F) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.SignedData BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.SignedData::GetInstance(System.Object) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_22: stloc:string(var_6_28, call:string(Platform::GetTypeName, ldloc:object(obj))) stloc:ArgumentException(var_7_40, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Unknown object in factory: "), ldloc:string(var_6_28)), ldstr:string("obj"))) } 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: 0x0600AE70 RID: 44656 RVA: 0x0028CF00 File Offset: 0x0028B100 [Token(Token = "0x600AE70")] [Address(RVA = "0x2901180", Offset = "0x28FFB80", VA = "0x182901180")] public SignedData(Asn1Set digestAlgorithms, ContentInfo contentInfo, Asn1Set certificates, Asn1Set crls, Asn1Set signerInfos) { this.signerInfos = 0; DerInteger derInteger; this.version = derInteger; this.digestAlgorithms = digestAlgorithms; this.contentInfo = contentInfo; this.certificates = certificates; this.crls = 0; bool flag; this.crlsBer = flag; if (certificates != 0) { } bool flag2 = certificates != 0; this.certsBer = flag2; } // Token: 0x0600AE71 RID: 44657 RVA: 0x0028CF68 File Offset: 0x0028B168 [Token(Token = "0x600AE71")] [Address(RVA = "0x28FFFF0", Offset = "0x28FE9F0", VA = "0x1828FFFF0")] private DerInteger CalculateVersion(DerObjectIdentifier contentOid, Asn1Set certs, Asn1Set crls, Asn1Set signerInfs) { for (;;) { int num = 0; if (certs == 0) { goto IL_44; } IEnumerator enumerator = certs.GetEnumerator(); if (enumerator != 0) { while (enumerator == 0) { } while (enumerator == 0) { } if (enumerator == 0) { goto IL_92; } if (enumerator != (ulong)1L && enumerator != (ulong)2L) { while (enumerator != (ulong)3L) { } } } if (enumerator != 0) { } if (num != -1) { if ((ulong)1L == 0UL) { goto IL_44; } goto IL_8C; } IL_5A: if (num != 0) { continue; } if ((uint)(-1) != 0U) { } if ((ulong)((uint)(-1)) != (ulong)(-1L)) { } if (num == 0) { break; } continue; IL_44: if (crls == 0) { break; } IEnumerator enumerator2 = crls.GetEnumerator(); if (enumerator2 != 0) { while (enumerator2 == 0) { } goto IL_5A; } goto IL_5A; } DerObjectIdentifier data = CmsObjectIdentifiers.Data; bool flag; if (!flag) { return SignedData.Version1; } return SignedData.Version3; IL_8C: return SignedData.Version5; IL_92: throw new NullReferenceException(); } // Token: 0x0600AE72 RID: 44658 RVA: 0x0028D014 File Offset: 0x0028B214 [Token(Token = "0x600AE72")] [Address(RVA = "0x29004C0", Offset = "0x28FEEC0", VA = "0x1829004C0")] private bool CheckForVersion3(Asn1Set signerInfs) { for (;;) { int num = 0; int intValue; if (signerInfs.GetEnumerator() != 0) { SignerInfo signerInfo; intValue = signerInfo.version.Value.IntValue; while (intValue != 3) { } } if (intValue != 0) { } if (num != -1) { if (typeof(IDisposable).TypeHandle == (ulong)71L) { break; } if (typeof(IDisposable).TypeHandle == (ulong)69L) { goto IL_44; } } if (num == 0) { goto IL_44; } } return true; IL_44: throw new NullReferenceException(); } // Token: 0x0600AE73 RID: 44659 RVA: 0x0028D084 File Offset: 0x0028B284 [Token(Token = "0x600AE73")] [Address(RVA = "0x2900DF0", Offset = "0x28FF7F0", VA = "0x182900DF0")] private SignedData(Asn1Sequence seq) { ContentInfo contentInfo; for (;;) { base..ctor(); IEnumerator enumerator = seq.GetEnumerator(); if (enumerator == 0 || enumerator != 0) { this.version = enumerator; if (enumerator == 0 || enumerator != 0) { this.digestAlgorithms = enumerator; this.contentInfo = contentInfo; if (contentInfo == 0) { return; } if (contentInfo == 0) { } if (contentInfo != 0) { if (contentInfo == 0) { this.signerInfos = contentInfo; } if (contentInfo != 0) { break; } } } } } DerObjectIdentifier contentType = contentInfo.contentType; Asn1Set asn1Set; if (contentType == 0) { bool flag = contentType != 0; this.certsBer = flag; this.certificates = asn1Set; } bool flag2 = asn1Set != 0; this.crlsBer = flag2; Asn1Set asn1Set2; this.crls = asn1Set2; } // Token: 0x17001BFA RID: 7162 // (get) Token: 0x0600AE74 RID: 44660 RVA: 0x0028D148 File Offset: 0x0028B348 [Token(Token = "0x17001BFA")] public DerInteger Version { [Token(Token = "0x600AE74")] [Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")] get { return this.version; } } // Token: 0x17001BFB RID: 7163 // (get) Token: 0x0600AE75 RID: 44661 RVA: 0x0028D15C File Offset: 0x0028B35C [Token(Token = "0x17001BFB")] public Asn1Set DigestAlgorithms { [Token(Token = "0x600AE75")] [Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")] get { return this.digestAlgorithms; } } // Token: 0x17001BFC RID: 7164 // (get) Token: 0x0600AE76 RID: 44662 RVA: 0x0028D170 File Offset: 0x0028B370 [Token(Token = "0x17001BFC")] public ContentInfo EncapContentInfo { [Token(Token = "0x600AE76")] [Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")] get { return this.contentInfo; } } // Token: 0x17001BFD RID: 7165 // (get) Token: 0x0600AE77 RID: 44663 RVA: 0x0028D184 File Offset: 0x0028B384 [Token(Token = "0x17001BFD")] public Asn1Set Certificates { [Token(Token = "0x600AE77")] [Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")] get { return this.certificates; } } // Token: 0x17001BFE RID: 7166 // (get) Token: 0x0600AE78 RID: 44664 RVA: 0x0028D198 File Offset: 0x0028B398 [Token(Token = "0x17001BFE")] public Asn1Set CRLs { [Token(Token = "0x600AE78")] [Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")] get { return this.crls; } } // Token: 0x17001BFF RID: 7167 // (get) Token: 0x0600AE79 RID: 44665 RVA: 0x0028D1AC File Offset: 0x0028B3AC [Token(Token = "0x17001BFF")] public Asn1Set SignerInfos { [Token(Token = "0x600AE79")] [Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")] get { return this.signerInfos; } } // Token: 0x0600AE7A RID: 44666 RVA: 0x0028D1C0 File Offset: 0x0028B3C0 [Token(Token = "0x600AE7A")] [Address(RVA = "0x2900870", Offset = "0x28FF270", VA = "0x182900870", Slot = "5")] public override Asn1Object ToAsn1Object() { Asn1Encodable[] array = new Asn1Encodable[3]; DerInteger derInteger = this.version; if (derInteger != 0) { } array[0] = derInteger; Asn1Set asn1Set = this.digestAlgorithms; if (asn1Set != 0) { } array[1] = asn1Set; ContentInfo contentInfo = this.contentInfo; if (contentInfo != 0) { } array[2] = contentInfo; Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array); int num = 0; if (this.certificates != num) { if ((this.certsBer ? 1 : 0) == num) { Asn1Encodable[] array2 = new Asn1Encodable[0]; Asn1Set asn1Set2 = this.certificates; int num2; int num3; DerTaggedObject derTaggedObject = new DerTaggedObject(num2 != 0, num3, asn1Set2); num3 = 0; num2 = 0; if (derTaggedObject != 0) { } } Asn1Set asn1Set3 = this.certificates; int num4; int num5; BerTaggedObject berTaggedObject = new BerTaggedObject(num4 != 0, num5, asn1Set3); num5 = 0; num4 = 0; if (berTaggedObject != 0) { } } if (this.crls != num) { if ((this.crlsBer ? 1 : 0) == num) { Asn1Encodable[] array3 = new Asn1Encodable[1]; Asn1Set asn1Set4 = this.crls; int num6; DerTaggedObject derTaggedObject2 = new DerTaggedObject(num6 != 0, 1, asn1Set4); num6 = 0; if (derTaggedObject2 != 0) { } } Asn1Set asn1Set5 = this.crls; int num7; BerTaggedObject berTaggedObject2 = new BerTaggedObject(num7 != 0, 1, asn1Set5); num7 = 0; if (berTaggedObject2 != 0) { } } Asn1Encodable[] array4 = new Asn1Encodable[1]; Asn1Set asn1Set6 = this.signerInfos; if (asn1Set6 != 0) { } array4[0] = asn1Set6; asn1EncodableVector.Add(array4); BerSequence berSequence = new BerSequence(asn1EncodableVector); throw new NullReferenceException(); } // Token: 0x04007286 RID: 29318 [Token(Token = "0x4007286")] private static readonly DerInteger Version1 = new DerInteger(1); // Token: 0x04007287 RID: 29319 [Token(Token = "0x4007287")] private static readonly DerInteger Version3 = new DerInteger(3); // Token: 0x04007288 RID: 29320 [Token(Token = "0x4007288")] private static readonly DerInteger Version4 = new DerInteger(4); // Token: 0x04007289 RID: 29321 [Token(Token = "0x4007289")] private static readonly DerInteger Version5 = new DerInteger(5); // Token: 0x0400728A RID: 29322 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x400728A")] private readonly DerInteger version; // Token: 0x0400728B RID: 29323 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x400728B")] private readonly Asn1Set digestAlgorithms; // Token: 0x0400728C RID: 29324 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x400728C")] private readonly ContentInfo contentInfo; // Token: 0x0400728D RID: 29325 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x400728D")] private readonly Asn1Set certificates; // Token: 0x0400728E RID: 29326 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x400728E")] private readonly Asn1Set crls; // Token: 0x0400728F RID: 29327 [global::Cpp2IlInjected.FieldOffset(Offset = "0x38")] [Token(Token = "0x400728F")] private readonly Asn1Set signerInfos; // Token: 0x04007290 RID: 29328 [global::Cpp2IlInjected.FieldOffset(Offset = "0x40")] [Token(Token = "0x4007290")] private readonly bool certsBer; // Token: 0x04007291 RID: 29329 [global::Cpp2IlInjected.FieldOffset(Offset = "0x41")] [Token(Token = "0x4007291")] private readonly bool crlsBer; } }