using System; using System.IO; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms { // Token: 0x02001D24 RID: 7460 [Token(Token = "0x2001D24")] internal class CmsAuthEnvelopedData { // Token: 0x0600BCE5 RID: 48357 RVA: 0x002AF8C0 File Offset: 0x002ADAC0 [Token(Token = "0x600BCE5")] [Address(RVA = "0x165EDE0", Offset = "0x165DBE0", VA = "0x18165EDE0")] public CmsAuthEnvelopedData(byte[] authEnvData) { ContentInfo contentInfo = CmsUtilities.ReadContentInfo(authEnvData); } // Token: 0x0600BCE6 RID: 48358 RVA: 0x002AF8D4 File Offset: 0x002ADAD4 [Token(Token = "0x600BCE6")] [Address(RVA = "0x165EE10", Offset = "0x165DC10", VA = "0x18165EE10")] public CmsAuthEnvelopedData(Stream authEnvData) { ContentInfo contentInfo = CmsUtilities.ReadContentInfo(authEnvData); } // Token: 0x0600BCE7 RID: 48359 RVA: 0x002AF8E8 File Offset: 0x002ADAE8 [Token(Token = "0x600BCE7")] [Address(RVA = "0x165EE40", Offset = "0x165DC40", VA = "0x18165EE40")] public CmsAuthEnvelopedData(ContentInfo contentInfo) { this.contentInfo = contentInfo; AuthEnvelopedData instance = AuthEnvelopedData.GetInstance(contentInfo.content); OriginatorInfo originatorInfo = instance.originatorInfo; this.originator = originatorInfo; EncryptedContentInfo authEncryptedContentInfo = instance.authEncryptedContentInfo; Asn1Set recipientInfos = instance.recipientInfos; AlgorithmIdentifier contentEncryptionAlgorithm = authEncryptedContentInfo.contentEncryptionAlgorithm; this.authEncAlg = contentEncryptionAlgorithm; CmsAuthEnvelopedData.AuthEnvelopedSecureReadable authEnvelopedSecureReadable; authEnvelopedSecureReadable.parent = this; RecipientInformationStore recipientInformationStore = CmsEnvelopedHelper.BuildRecipientInformationStore(recipientInfos, authEnvelopedSecureReadable); this.recipientInfoStore = recipientInformationStore; Asn1Set asn1Set = instance.authAttrs; this.authAttrs = asn1Set; Stream octetStream = instance.mac.GetOctetStream(); this.mac = octetStream; Asn1Set asn1Set2 = instance.unauthAttrs; this.unauthAttrs = asn1Set2; } // Token: 0x04007849 RID: 30793 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007849")] internal RecipientInformationStore recipientInfoStore; // Token: 0x0400784A RID: 30794 [FieldOffset(Offset = "0x18")] [Token(Token = "0x400784A")] internal ContentInfo contentInfo; // Token: 0x0400784B RID: 30795 [FieldOffset(Offset = "0x20")] [Token(Token = "0x400784B")] private OriginatorInfo originator; // Token: 0x0400784C RID: 30796 [FieldOffset(Offset = "0x28")] [Token(Token = "0x400784C")] private AlgorithmIdentifier authEncAlg; // Token: 0x0400784D RID: 30797 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400784D")] private Asn1Set authAttrs; // Token: 0x0400784E RID: 30798 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400784E")] private byte[] mac; // Token: 0x0400784F RID: 30799 [FieldOffset(Offset = "0x40")] [Token(Token = "0x400784F")] private Asn1Set unauthAttrs; // Token: 0x02001D25 RID: 7461 [Token(Token = "0x2001D25")] private class AuthEnvelopedSecureReadable : CmsSecureReadable { // Token: 0x0600BCE8 RID: 48360 RVA: 0x002AF990 File Offset: 0x002ADB90 [Token(Token = "0x600BCE8")] [Address(RVA = "0x3FFB80", Offset = "0x3FE980", VA = "0x1803FFB80")] internal AuthEnvelopedSecureReadable(CmsAuthEnvelopedData parent) { this.parent = parent; } // Token: 0x17001D45 RID: 7493 // (get) Token: 0x0600BCE9 RID: 48361 RVA: 0x002AF9AC File Offset: 0x002ADBAC [Token(Token = "0x17001D45")] public AlgorithmIdentifier Algorithm { [Token(Token = "0x600BCE9")] [Address(RVA = "0x407190", Offset = "0x405F90", VA = "0x180407190", Slot = "4")] get { return this.parent.authEncAlg; } } // Token: 0x17001D46 RID: 7494 // (get) Token: 0x0600BCEA RID: 48362 RVA: 0x002AF9CC File Offset: 0x002ADBCC [Token(Token = "0x17001D46")] public object CryptoObject { [Token(Token = "0x600BCEA")] [Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "5")] get { } } // Token: 0x0600BCEB RID: 48363 RVA: 0x002AF9DC File Offset: 0x002ADBDC [Token(Token = "0x600BCEB")] [Address(RVA = "0x165CA20", Offset = "0x165B820", VA = "0x18165CA20", Slot = "6")] public CmsReadable GetReadable(KeyParameter key) { /* An exception occurred when decompiling this method (0600BCEB) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Cms.CmsReadable BestHTTP.SecureProtocol.Org.BouncyCastle.Cms.CmsAuthEnvelopedData/AuthEnvelopedSecureReadable::GetReadable(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.KeyParameter) ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:CmsException(var_0_0A, newobj:CmsException(CmsException::.ctor, ldstr:string("AuthEnveloped data decryption not yet implemented"))) } 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: 0x04007850 RID: 30800 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007850")] private readonly CmsAuthEnvelopedData parent; } } }