using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp { // Token: 0x0200203E RID: 8254 [Token(Token = "0x200203E")] public class PkiHeaderBuilder { // Token: 0x0600CEF8 RID: 52984 RVA: 0x002F1324 File Offset: 0x002EF524 [Token(Token = "0x600CEF8")] [Address(RVA = "0x2FECF80", Offset = "0x2FEBF80", VA = "0x182FECF80")] public PkiHeaderBuilder(int pvno, GeneralName sender, GeneralName recipient) { DerInteger derInteger = new DerInteger(pvno); int num = 0; int num2 = 0; base.FieldGetter(num2, num, recipient); this.pvno = derInteger; this.sender = sender; this.recipient = recipient; } // Token: 0x0600CEF9 RID: 52985 RVA: 0x002F135C File Offset: 0x002EF55C [Token(Token = "0x600CEF9")] [Address(RVA = "0x466000", Offset = "0x465000", VA = "0x180466000")] private PkiHeaderBuilder(DerInteger pvno, GeneralName sender, GeneralName recipient) { this.pvno = pvno; this.sender = sender; this.recipient = recipient; } // Token: 0x0600CEFA RID: 52986 RVA: 0x002F1384 File Offset: 0x002EF584 [Token(Token = "0x600CEFA")] [Address(RVA = "0x493860", Offset = "0x492860", VA = "0x180493860", Slot = "4")] public virtual PkiHeaderBuilder SetMessageTime(DerGeneralizedTime time) { this.messageTime = time; return this; } // Token: 0x0600CEFB RID: 52987 RVA: 0x002F139C File Offset: 0x002EF59C [Token(Token = "0x600CEFB")] [Address(RVA = "0x493910", Offset = "0x492910", VA = "0x180493910", Slot = "5")] public virtual PkiHeaderBuilder SetProtectionAlg(AlgorithmIdentifier aid) { this.protectionAlg = aid; return this; } // Token: 0x0600CEFC RID: 52988 RVA: 0x002F13B4 File Offset: 0x002EF5B4 [Token(Token = "0x600CEFC")] [Address(RVA = "0x2FECDD0", Offset = "0x2FEBDD0", VA = "0x182FECDD0", Slot = "6")] public virtual PkiHeaderBuilder SetSenderKID(byte[] kid) { if (kid == 0) { } DerOctetString derOctetString = new DerOctetString(kid); throw new NullReferenceException(); } // Token: 0x0600CEFD RID: 52989 RVA: 0x002F13D4 File Offset: 0x002EF5D4 [Token(Token = "0x600CEFD")] [Address(RVA = "0x12A77C0", Offset = "0x12A67C0", VA = "0x1812A77C0", Slot = "7")] public virtual PkiHeaderBuilder SetSenderKID(Asn1OctetString kid) { this.senderKID = kid; return this; } // Token: 0x0600CEFE RID: 52990 RVA: 0x002F13EC File Offset: 0x002EF5EC [Token(Token = "0x600CEFE")] [Address(RVA = "0x2FECCB0", Offset = "0x2FEBCB0", VA = "0x182FECCB0", Slot = "8")] public virtual PkiHeaderBuilder SetRecipKID(byte[] kid) { if (kid == 0) { } DerOctetString derOctetString = new DerOctetString(kid); throw new NullReferenceException(); } // Token: 0x0600CEFF RID: 52991 RVA: 0x002F140C File Offset: 0x002EF60C [Token(Token = "0x600CEFF")] [Address(RVA = "0x23A3780", Offset = "0x23A2780", VA = "0x1823A3780", Slot = "9")] public virtual PkiHeaderBuilder SetRecipKID(DerOctetString kid) { this.recipKID = kid; return this; } // Token: 0x0600CF00 RID: 52992 RVA: 0x002F1424 File Offset: 0x002EF624 [Token(Token = "0x600CF00")] [Address(RVA = "0x2FECEF0", Offset = "0x2FEBEF0", VA = "0x182FECEF0", Slot = "10")] public virtual PkiHeaderBuilder SetTransactionID(byte[] tid) { if (tid == 0) { } DerOctetString derOctetString = new DerOctetString(tid); throw new NullReferenceException(); } // Token: 0x0600CF01 RID: 52993 RVA: 0x002F1444 File Offset: 0x002EF644 [Token(Token = "0x600CF01")] [Address(RVA = "0x23A3770", Offset = "0x23A2770", VA = "0x1823A3770", Slot = "11")] public virtual PkiHeaderBuilder SetTransactionID(Asn1OctetString tid) { this.transactionID = tid; return this; } // Token: 0x0600CF02 RID: 52994 RVA: 0x002F145C File Offset: 0x002EF65C [Token(Token = "0x600CF02")] [Address(RVA = "0x2FECE60", Offset = "0x2FEBE60", VA = "0x182FECE60", Slot = "12")] public virtual PkiHeaderBuilder SetSenderNonce(byte[] nonce) { if (nonce == 0) { } DerOctetString derOctetString = new DerOctetString(nonce); throw new NullReferenceException(); } // Token: 0x0600CF03 RID: 52995 RVA: 0x002F147C File Offset: 0x002EF67C [Token(Token = "0x600CF03")] [Address(RVA = "0x23A3790", Offset = "0x23A2790", VA = "0x1823A3790", Slot = "13")] public virtual PkiHeaderBuilder SetSenderNonce(Asn1OctetString nonce) { this.senderNonce = nonce; return this; } // Token: 0x0600CF04 RID: 52996 RVA: 0x002F1494 File Offset: 0x002EF694 [Token(Token = "0x600CF04")] [Address(RVA = "0x2FECD40", Offset = "0x2FEBD40", VA = "0x182FECD40", Slot = "14")] public virtual PkiHeaderBuilder SetRecipNonce(byte[] nonce) { if (nonce == 0) { } DerOctetString derOctetString = new DerOctetString(nonce); throw new NullReferenceException(); } // Token: 0x0600CF05 RID: 52997 RVA: 0x002F14B4 File Offset: 0x002EF6B4 [Token(Token = "0x600CF05")] [Address(RVA = "0x23A3760", Offset = "0x23A2760", VA = "0x1823A3760", Slot = "15")] public virtual PkiHeaderBuilder SetRecipNonce(Asn1OctetString nonce) { this.recipNonce = nonce; return this; } // Token: 0x0600CF06 RID: 52998 RVA: 0x002F14CC File Offset: 0x002EF6CC [Token(Token = "0x600CF06")] [Address(RVA = "0x2FECAB0", Offset = "0x2FEBAB0", VA = "0x182FECAB0", Slot = "16")] public virtual PkiHeaderBuilder SetFreeText(PkiFreeText text) { this.freeText = text; return this; } // Token: 0x0600CF07 RID: 52999 RVA: 0x002F14E4 File Offset: 0x002EF6E4 [Token(Token = "0x600CF07")] [Address(RVA = "0x2FECAC0", Offset = "0x2FEBAC0", VA = "0x182FECAC0", Slot = "17")] public virtual PkiHeaderBuilder SetGeneralInfo(InfoTypeAndValue genInfo) { /* An exception occurred when decompiling this method (0600CF07) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.PkiHeaderBuilder BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.PkiHeaderBuilder::SetGeneralInfo(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.InfoTypeAndValue) ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:DerSequence(var_0_06, newobj:DerSequence(DerSequence::.ctor, ldloc:InfoTypeAndValue[exp:Asn1Encodable](genInfo))) } 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: 0x0600CF08 RID: 53000 RVA: 0x002F14F8 File Offset: 0x002EF6F8 [Token(Token = "0x600CF08")] [Address(RVA = "0x2FECB40", Offset = "0x2FEBB40", VA = "0x182FECB40", Slot = "18")] public virtual PkiHeaderBuilder SetGeneralInfo(InfoTypeAndValue[] genInfos) { int num = 0; if (genInfos != 0) { Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(genInfos); if (num < genInfos.Length) { Asn1Encodable[] array = new Asn1Encodable[1]; InfoTypeAndValue infoTypeAndValue = genInfos[num]; if (infoTypeAndValue != 0) { } array[0] = infoTypeAndValue; asn1EncodableVector.Add(array); num++; } DerSequence derSequence = new DerSequence(asn1EncodableVector); } throw new ArrayTypeMismatchException(); } // Token: 0x0600CF09 RID: 53001 RVA: 0x002F1550 File Offset: 0x002EF750 [Token(Token = "0x600CF09")] [Address(RVA = "0x2FECCA0", Offset = "0x2FEBCA0", VA = "0x182FECCA0", Slot = "19")] public virtual PkiHeaderBuilder SetGeneralInfo(Asn1Sequence seqOfInfoTypeAndValue) { this.generalInfo = seqOfInfoTypeAndValue; return this; } // Token: 0x0600CF0A RID: 53002 RVA: 0x002F1568 File Offset: 0x002EF768 [Token(Token = "0x600CF0A")] [Address(RVA = "0x2FECA50", Offset = "0x2FEBA50", VA = "0x182FECA50")] private static Asn1Sequence MakeGeneralInfoSeq(InfoTypeAndValue generalInfo) { /* An exception occurred when decompiling this method (0600CF0A) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Sequence BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.PkiHeaderBuilder::MakeGeneralInfoSeq(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.InfoTypeAndValue) ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:DerSequence(var_0_06, newobj:DerSequence(DerSequence::.ctor, ldloc:InfoTypeAndValue[exp:Asn1Encodable](generalInfo))) } 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: 0x0600CF0B RID: 53003 RVA: 0x002F157C File Offset: 0x002EF77C [Token(Token = "0x600CF0B")] [Address(RVA = "0x2FEC900", Offset = "0x2FEB900", VA = "0x182FEC900")] private static Asn1Sequence MakeGeneralInfoSeq(InfoTypeAndValue[] generalInfos) { int num = 0; if (generalInfos != 0) { Asn1EncodableVector asn1EncodableVector; if (num < generalInfos.Length) { Asn1Encodable[] array = new Asn1Encodable[1]; InfoTypeAndValue infoTypeAndValue = generalInfos[num]; if (infoTypeAndValue != 0) { } array[0] = infoTypeAndValue; asn1EncodableVector.Add(array); num++; } DerSequence derSequence = new DerSequence(asn1EncodableVector); } throw new ArrayTypeMismatchException(); } // Token: 0x0600CF0C RID: 53004 RVA: 0x002F15CC File Offset: 0x002EF7CC [Token(Token = "0x600CF0C")] [Address(RVA = "0x2FEC650", Offset = "0x2FEB650", VA = "0x182FEC650", Slot = "20")] public virtual PkiHeader Build() { Asn1Encodable[] array = new Asn1Encodable[3]; DerInteger derInteger = this.pvno; if (derInteger != 0) { } array[0] = derInteger; GeneralName generalName = this.sender; if (generalName != 0) { } array[1] = generalName; GeneralName generalName2 = this.recipient; if (generalName2 != 0) { } array[2] = generalName2; Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array); DerGeneralizedTime derGeneralizedTime = this.messageTime; int num = 0; int num2 = 0; this.AddOptional(asn1EncodableVector, num2, derGeneralizedTime); AlgorithmIdentifier algorithmIdentifier = this.protectionAlg; this.AddOptional(asn1EncodableVector, 1, algorithmIdentifier); Asn1OctetString asn1OctetString = this.senderKID; this.AddOptional(asn1EncodableVector, 2, asn1OctetString); Asn1OctetString asn1OctetString2 = this.recipKID; this.AddOptional(asn1EncodableVector, 3, asn1OctetString2); Asn1OctetString asn1OctetString3 = this.transactionID; this.AddOptional(asn1EncodableVector, 4, asn1OctetString3); Asn1OctetString asn1OctetString4 = this.senderNonce; this.AddOptional(asn1EncodableVector, 5, asn1OctetString4); Asn1OctetString asn1OctetString5 = this.recipNonce; this.AddOptional(asn1EncodableVector, 6, asn1OctetString5); PkiFreeText pkiFreeText = this.freeText; this.AddOptional(asn1EncodableVector, 7, pkiFreeText); Asn1Sequence asn1Sequence = this.generalInfo; this.AddOptional(asn1EncodableVector, 8, asn1Sequence); this.messageTime = num; this.protectionAlg = num; this.senderKID = num; this.recipKID = num; this.transactionID = num; this.senderNonce = num; this.recipNonce = num; this.freeText = num; this.generalInfo = num; return PkiHeader.GetInstance(new DerSequence(asn1EncodableVector)); } // Token: 0x0600CF0D RID: 53005 RVA: 0x002F1730 File Offset: 0x002EF930 [Token(Token = "0x600CF0D")] [Address(RVA = "0x2FEC550", Offset = "0x2FEB550", VA = "0x182FEC550")] private void AddOptional(Asn1EncodableVector v, int tagNo, Asn1Encodable obj) { if (obj != 0) { Asn1Encodable[] array = new Asn1Encodable[1]; DerTaggedObject derTaggedObject = new DerTaggedObject(true, tagNo, obj); if (derTaggedObject != 0) { } array[0] = derTaggedObject; v.Add(array); } } // Token: 0x04008334 RID: 33588 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4008334")] private DerInteger pvno; // Token: 0x04008335 RID: 33589 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4008335")] private GeneralName sender; // Token: 0x04008336 RID: 33590 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4008336")] private GeneralName recipient; // Token: 0x04008337 RID: 33591 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4008337")] private DerGeneralizedTime messageTime; // Token: 0x04008338 RID: 33592 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4008338")] private AlgorithmIdentifier protectionAlg; // Token: 0x04008339 RID: 33593 [FieldOffset(Offset = "0x38")] [Token(Token = "0x4008339")] private Asn1OctetString senderKID; // Token: 0x0400833A RID: 33594 [FieldOffset(Offset = "0x40")] [Token(Token = "0x400833A")] private Asn1OctetString recipKID; // Token: 0x0400833B RID: 33595 [FieldOffset(Offset = "0x48")] [Token(Token = "0x400833B")] private Asn1OctetString transactionID; // Token: 0x0400833C RID: 33596 [FieldOffset(Offset = "0x50")] [Token(Token = "0x400833C")] private Asn1OctetString senderNonce; // Token: 0x0400833D RID: 33597 [FieldOffset(Offset = "0x58")] [Token(Token = "0x400833D")] private Asn1OctetString recipNonce; // Token: 0x0400833E RID: 33598 [FieldOffset(Offset = "0x60")] [Token(Token = "0x400833E")] private PkiFreeText freeText; // Token: 0x0400833F RID: 33599 [FieldOffset(Offset = "0x68")] [Token(Token = "0x400833F")] private Asn1Sequence generalInfo; } }