mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-21 02:46:10 +00:00
f2ac1ece55
add
65 lines
2.9 KiB
C#
65 lines
2.9 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Microsoft.InfoCards.ProtocolProfile
|
|
// 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 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<Type>) 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;
|
|
}
|
|
}
|
|
}
|
|
}
|