// Decompiled with JetBrains decompiler // Type: Microsoft.InfoCards.GetPolicyDetailsRequest // Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MVID: ADE0A079-11DB-4A46-8BDE-D2A592CA8DEA // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-67b630ead60119692b9abbdfd8717c96904ef041127c2cae033c86b718eaa61e.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); } } }