// Decompiled with JetBrains decompiler // Type: Microsoft.InfoCards.ProtocolProfile // Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MVID: 1D4D5564-A025-490C-AF1D-DF4FBB709D1F // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-f8f9f26e940480624825f6bddbea86e70fc4aa746c4dd8efa7d98dcb477000ed.exe using System; using System.Collections.Generic; using System.IdentityModel.Tokens; using System.ServiceModel; using System.ServiceModel.Security; namespace Microsoft.InfoCards { internal class ProtocolProfile { private XmlNames.IWSTrust m_iWSTrust = (XmlNames.IWSTrust) XmlNames.WSTrustXmlSoap2005.Instance; private XmlNames.IWSPolicy m_iWSPolicy = (XmlNames.IWSPolicy) XmlNames.WSPolicyXmlSoap2004.Instance; private static WSSecurityTokenSerializer s_tokenSerializerDefault = new WSSecurityTokenSerializer(MessageSecurityVersion.Default.SecurityVersion, true); private static WSSecurityTokenSerializer s_tokenSerializerWSTrust13 = new WSSecurityTokenSerializer(SecurityVersion.WSSecurity11, TrustVersion.WSTrust13, SecureConversationVersion.WSSecureConversation13, false, (SamlSerializer) null, (SecurityStateEncoder) null, (IEnumerable) null); public XmlNames.IWSTrust WSTrust { get => this.m_iWSTrust; set => this.m_iWSTrust = value; } public XmlNames.IWSPolicy WSPolicy => this.m_iWSPolicy; public MessageSecurityVersion MsgSecurityVersion { get { if (XmlNames.WSSpecificationVersion.WSTrustXmlSoap2005 == this.WSTrust.Version) return MessageSecurityVersion.WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11; return XmlNames.WSSpecificationVersion.WSTrustOasis2007 == this.WSTrust.Version ? MessageSecurityVersion.WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12 : MessageSecurityVersion.Default; } } public WSSecurityTokenSerializer TokenSerializer => XmlNames.WSSpecificationVersion.WSTrustOasis2007 == this.WSTrust.Version ? ProtocolProfile.s_tokenSerializerWSTrust13 : ProtocolProfile.s_tokenSerializerDefault; public ProtocolProfile() { } public ProtocolProfile(string policyXml) { if (policyXml.Contains(XmlNames.WSTrustXmlSoap2005.Instance.Namespace)) this.m_iWSTrust = (XmlNames.IWSTrust) XmlNames.WSTrustXmlSoap2005.Instance; else if (policyXml.Contains(XmlNames.WSTrustOasis2007.Instance.Namespace)) this.m_iWSTrust = (XmlNames.IWSTrust) XmlNames.WSTrustOasis2007.Instance; if (policyXml.Contains(XmlNames.WSPolicyXmlSoap2004.Instance.Namespace)) { this.m_iWSPolicy = (XmlNames.IWSPolicy) XmlNames.WSPolicyXmlSoap2004.Instance; } else { if (!policyXml.Contains(XmlNames.WSPolicyW32007.Instance.Namespace)) return; this.m_iWSPolicy = (XmlNames.IWSPolicy) XmlNames.WSPolicyW32007.Instance; } } } }