mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-23 03:46:10 +00:00
58 lines
2.4 KiB
C#
58 lines
2.4 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Microsoft.InfoCards.RequestSecurityTokenForGetBrowserToken
|
|||
|
// 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 Microsoft.InfoCards.Diagnostics;
|
|||
|
using System.Xml;
|
|||
|
|
|||
|
namespace Microsoft.InfoCards
|
|||
|
{
|
|||
|
internal class RequestSecurityTokenForGetBrowserToken : RequestSecurityToken
|
|||
|
{
|
|||
|
public RequestSecurityTokenForGetBrowserToken(RequestSecurityTokenParameters rstParams)
|
|||
|
: base(rstParams)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
protected override void WriteKeyTypeElement()
|
|||
|
{
|
|||
|
InfoCardTrace.Assert(this.ProtocolVersionProfile.WSTrust.KeyTypeBearer.ToString() == this.Policy.GetKeyTypeString(), "Only no proof key allowed in browser case");
|
|||
|
this.Serializer.WriteKeyTypeElement(this.Policy.GetKeyTypeString());
|
|||
|
}
|
|||
|
|
|||
|
protected override void WriteRequestTypeElement() => this.Serializer.WriteRequestTypeElement(this.ProtocolVersionProfile.WSTrust.IssueRequestType);
|
|||
|
|
|||
|
protected override void WriteAppliesToElement() => GetBrowserTokenRequest.WriteSourceUrlAppliesTo((XmlWriter) this.Writer, this.m_rstParams.BrowserTokenParams, this.ProtocolVersionProfile);
|
|||
|
|
|||
|
protected override void WriteSecondaryParametersElement()
|
|||
|
{
|
|||
|
if (XmlNames.WSSpecificationVersion.WSTrustOasis2007 != this.ProtocolVersionProfile.WSTrust.Version)
|
|||
|
return;
|
|||
|
bool flag = true;
|
|||
|
if (this.Policy.OptionalClaims.Length > 0)
|
|||
|
flag = this.m_rstParams.DiscloseOptionalClaims;
|
|||
|
if (!flag)
|
|||
|
return;
|
|||
|
if (this.Policy.RelyingPartyPolicy != null)
|
|||
|
this.Serializer.WriteSecondaryParametersElement(this.Policy.RelyingPartyPolicy.PolicyXml);
|
|||
|
else
|
|||
|
this.Serializer.WriteSecondaryParametersElement(this.Policy.ClientPolicy.PolicyXml);
|
|||
|
}
|
|||
|
|
|||
|
protected override void CustomWriteBodyContents(XmlDictionaryWriter writer)
|
|||
|
{
|
|||
|
this.InitializeWriters(writer);
|
|||
|
this.WriteRSTOpeningElement();
|
|||
|
this.WriteKeyTypeElement();
|
|||
|
this.WriteRequestTypeElement();
|
|||
|
this.WriteAppliesToElement();
|
|||
|
this.WriteClaimsElement();
|
|||
|
this.WriteTokenTypeElement();
|
|||
|
this.WriteSecondaryParametersElement();
|
|||
|
this.WriteEndElement();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|