// Decompiled with JetBrains decompiler // Type: Microsoft.InfoCards.GetPolicyDetailsRequest // Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MVID: 516D8B44-4448-4D2C-8B8E-FFBB3FFE472B // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-69bb73081eac86b8cf86f45e33515d0095855636967076e2b593d7a30cd80a07.exe using Microsoft.InfoCards.Diagnostics; using System; using System.Collections.Generic; using System.IO; using System.Text; namespace Microsoft.InfoCards { internal class GetPolicyDetailsRequest : UIAgentRequest { private InfoCardPolicy m_policy; private Recipient m_recipient; private string m_privacyPolicyLink = string.Empty; public GetPolicyDetailsRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent) : base(rpcHandle, inArgs, outArgs, parent) { } protected override void OnInitializeAsSystem() { base.OnInitializeAsSystem(); this.m_policy = this.GetPolicy(); } protected override void OnMarshalInArgs() { } protected override void OnProcess() { InfoCardTrace.Assert(null != this.m_policy, "Null policy"); StoreConnection connection = StoreConnection.GetConnection(); try { DataRow singleRow = connection.GetSingleRow(new List() { new QueryParameter("ix_objecttype", new object[1] { (object) -3 }), new QueryParameter("ix_name", new object[1] { (object) this.m_policy.Recipient.GetIdentifier() }) }.ToArray()); if (this.m_policy.Recipient is X509RecipientIdentity recipient) this.ParentRequest.CertCacheAdd(this.m_policy.Recipient.GetIdentifier(), recipient.LeafCertificate); if (singleRow != null) { this.m_recipient = new Recipient((Stream) new MemoryStream(singleRow.GetDataField()), this.m_policy.Recipient, true); if (this.m_recipient.Trust == Recipient.TrustDecision.IsTrusted && (int) this.m_recipient.PrivacyPolicyVersion != (int) this.m_policy.PrivacyPolicyVersion) this.m_recipient.Trust = Recipient.TrustDecision.PolicyVersionChange; this.m_recipient.PrivacyPolicyVersion = this.m_policy.PrivacyPolicyVersion; } else { this.m_recipient = new Recipient(this.m_policy.Recipient, true, this.m_policy.PrivacyPolicyVersion); this.m_recipient.Trust = Recipient.TrustDecision.NoTrustDecision; } this.m_privacyPolicyLink = this.m_policy.PrivacyPolicyLink; } finally { connection.Close(); } } protected override void OnMarshalOutArgs() { InfoCardTrace.Assert(null != this.m_policy, "Null policy"); BinaryWriter writer = new BinaryWriter(this.OutArgs, Encoding.Unicode); writer.Write(this.m_policy.RequiresManagedCard); writer.Write(this.m_policy.RequiresSelfIssuedCard); writer.Write(this.ParentRequest is GetBrowserTokenRequest); this.m_recipient.Serialize(writer); Utility.SerializeString(writer, this.m_privacyPolicyLink); if (this.m_policy.RequiredClaims != null) { writer.Write(this.m_policy.RequiredClaims.Length); for (int index = 0; index < this.m_policy.RequiredClaims.Length; ++index) Utility.SerializeString(writer, this.m_policy.RequiredClaims[index]); } else writer.Write(0); if (this.m_policy.OptionalClaims != null) { writer.Write(this.m_policy.OptionalClaims.Length); for (int index = 0; index < this.m_policy.OptionalClaims.Length; ++index) Utility.SerializeString(writer, this.m_policy.OptionalClaims[index]); } else writer.Write(0); } } }