using System; using System.IO; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using BestHTTP.SecureProtocol.Org.BouncyCastle.Math; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs { // Token: 0x02001F77 RID: 8055 [Token(Token = "0x2001F77")] public class PrivateKeyInfo : Asn1Encodable { // Token: 0x0600C9AA RID: 51626 RVA: 0x002DB7FC File Offset: 0x002D99FC [Token(Token = "0x600C9AA")] [Address(RVA = "0x2F8A3D0", Offset = "0x2F893D0", VA = "0x182F8A3D0")] public static PrivateKeyInfo GetInstance(Asn1TaggedObject obj, bool explicitly) { Asn1Sequence instance; Asn1Sequence instance2; for (;;) { instance = Asn1Sequence.GetInstance(obj, explicitly); if (instance == 0) { return; } if (instance == 0) { break; } if (instance2 != 0) { return; } } instance2 = Asn1Sequence.GetInstance(instance); return new PrivateKeyInfo(instance2); } // Token: 0x0600C9AB RID: 51627 RVA: 0x002DB838 File Offset: 0x002D9A38 [Token(Token = "0x600C9AB")] [Address(RVA = "0x2F8A2D0", Offset = "0x2F892D0", VA = "0x182F8A2D0")] public static PrivateKeyInfo GetInstance(object obj) { while (obj != 0) { Asn1Sequence instance; if (obj == 0) { instance = Asn1Sequence.GetInstance(obj); return new PrivateKeyInfo(instance); } if (instance != 0) { return; } } } // Token: 0x0600C9AC RID: 51628 RVA: 0x002DB86C File Offset: 0x002D9A6C [Token(Token = "0x600C9AC")] [Address(RVA = "0x2F8A4D0", Offset = "0x2F894D0", VA = "0x182F8A4D0")] private static int GetVersionValue(DerInteger version) { BigInteger value = version.Value; BigInteger zero = BigInteger.Zero; int num = value.CompareTo(zero); BigInteger one = BigInteger.One; int num2 = value.CompareTo(one); return value.IntValue; } // Token: 0x0600C9AD RID: 51629 RVA: 0x002DB8AC File Offset: 0x002D9AAC [Token(Token = "0x600C9AD")] [Address(RVA = "0x2F8AE70", Offset = "0x2F89E70", VA = "0x182F8AE70")] public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, Asn1Encodable privateKey) { DerInteger derInteger = new DerInteger(BigInteger.Zero); this.version = derInteger; this.privateKeyAlgorithm = privateKeyAlgorithm; DerOctetString derOctetString = new DerOctetString(privateKey); int num = 0; this.privateKey = derOctetString; this.attributes = num; this.publicKey = num; } // Token: 0x0600C9AE RID: 51630 RVA: 0x002DB8FC File Offset: 0x002D9AFC [Token(Token = "0x600C9AE")] [Address(RVA = "0x2F8A970", Offset = "0x2F89970", VA = "0x182F8A970")] public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, Asn1Encodable privateKey, Asn1Set attributes) { } // Token: 0x0600C9AF RID: 51631 RVA: 0x002DB90C File Offset: 0x002D9B0C [Token(Token = "0x600C9AF")] [Address(RVA = "0x2F8AD10", Offset = "0x2F89D10", VA = "0x182F8AD10")] public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, Asn1Encodable privateKey, Asn1Set attributes, byte[] publicKey) { DerInteger derInteger = new DerInteger(BigInteger.Zero); this.version = derInteger; this.privateKeyAlgorithm = privateKeyAlgorithm; DerOctetString derOctetString = new DerOctetString(privateKey); this.privateKey = derOctetString; this.attributes = attributes; DerBitString derBitString; this.publicKey = derBitString; } // Token: 0x0600C9B0 RID: 51632 RVA: 0x002DB95C File Offset: 0x002D9B5C [Token(Token = "0x600C9B0")] [Address(RVA = "0x2F8A990", Offset = "0x2F89990", VA = "0x182F8A990")] private PrivateKeyInfo(Asn1Sequence seq) { /* An exception occurred when decompiling this method (0600C9B0) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs.PrivateKeyInfo::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Sequence) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_C9: stloc:ArgumentException(var_15_D8, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("unknown optional field in private key info"), ldstr:string("seq"))) } 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: 0x17001F55 RID: 8021 // (get) Token: 0x0600C9B1 RID: 51633 RVA: 0x002DBA44 File Offset: 0x002D9C44 [Token(Token = "0x17001F55")] public virtual Asn1Set Attributes { [Token(Token = "0x600C9B1")] [Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0", Slot = "6")] get { return this.attributes; } } // Token: 0x17001F56 RID: 8022 // (get) Token: 0x0600C9B2 RID: 51634 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x17001F56")] public virtual bool HasPublicKey { [Token(Token = "0x600C9B2")] [Address(RVA = "0xABDDD0", Offset = "0xABCDD0", VA = "0x180ABDDD0", Slot = "7")] get { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x17001F57 RID: 8023 // (get) Token: 0x0600C9B3 RID: 51635 RVA: 0x002DBA58 File Offset: 0x002D9C58 [Token(Token = "0x17001F57")] public virtual AlgorithmIdentifier PrivateKeyAlgorithm { [Token(Token = "0x600C9B3")] [Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "8")] get { return this.privateKeyAlgorithm; } } // Token: 0x0600C9B4 RID: 51636 RVA: 0x002DBA6C File Offset: 0x002D9C6C [Token(Token = "0x600C9B4")] [Address(RVA = "0x2F8A5E0", Offset = "0x2F895E0", VA = "0x182F8A5E0", Slot = "9")] public virtual Asn1Object ParsePrivateKey() { Stream octetStream = this.privateKey.GetOctetStream(); Asn1Object asn1Object; return asn1Object; } // Token: 0x0600C9B5 RID: 51637 RVA: 0x002DBA8C File Offset: 0x002D9C8C [Token(Token = "0x600C9B5")] [Address(RVA = "0x2F8A620", Offset = "0x2F89620", VA = "0x182F8A620", Slot = "10")] public virtual Asn1Object ParsePublicKey() { DerBitString derBitString = this.publicKey; if (derBitString == 0) { } string @string = derBitString.GetString(); Asn1Object asn1Object; return asn1Object; } // Token: 0x17001F58 RID: 8024 // (get) Token: 0x0600C9B6 RID: 51638 RVA: 0x002DBAB0 File Offset: 0x002D9CB0 [Token(Token = "0x17001F58")] public virtual DerBitString PublicKeyData { [Token(Token = "0x600C9B6")] [Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0", Slot = "11")] get { return this.publicKey; } } // Token: 0x0600C9B7 RID: 51639 RVA: 0x002DBAC4 File Offset: 0x002D9CC4 [Token(Token = "0x600C9B7")] [Address(RVA = "0x2F8A660", Offset = "0x2F89660", VA = "0x182F8A660", Slot = "5")] public override Asn1Object ToAsn1Object() { Asn1Encodable[] array = new Asn1Encodable[3]; DerInteger derInteger = this.version; if (derInteger != 0) { } array[0] = derInteger; AlgorithmIdentifier algorithmIdentifier = this.privateKeyAlgorithm; if (algorithmIdentifier != 0) { } array[1] = algorithmIdentifier; Asn1OctetString asn1OctetString = this.privateKey; if (asn1OctetString != 0) { } array[2] = asn1OctetString; Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array); if (this.attributes != (ulong)0L) { Asn1Encodable[] array2 = new Asn1Encodable[1]; Asn1Set asn1Set = this.attributes; int num; int num2; DerTaggedObject derTaggedObject = new DerTaggedObject(num != 0, num2, asn1Set); num2 = 0; num = 0; if (derTaggedObject != 0) { } array2[0] = derTaggedObject; asn1EncodableVector.Add(array2); } if (this.publicKey != (ulong)0L) { Asn1Encodable[] array3 = new Asn1Encodable[1]; DerBitString derBitString = this.publicKey; int num3; DerTaggedObject derTaggedObject2 = new DerTaggedObject(num3 != 0, 1, derBitString); num3 = 0; if (derTaggedObject2 != 0) { } array3[0] = derTaggedObject2; asn1EncodableVector.Add(array3); } DerSequence derSequence = new DerSequence(asn1EncodableVector); throw new NullReferenceException(); } // Token: 0x04007F67 RID: 32615 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007F67")] private readonly DerInteger version; // Token: 0x04007F68 RID: 32616 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007F68")] private readonly AlgorithmIdentifier privateKeyAlgorithm; // Token: 0x04007F69 RID: 32617 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4007F69")] private readonly Asn1OctetString privateKey; // Token: 0x04007F6A RID: 32618 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4007F6A")] private readonly Asn1Set attributes; // Token: 0x04007F6B RID: 32619 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4007F6B")] private readonly DerBitString publicKey; } }