mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 19:36:11 +00:00
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Microsoft.InfoCards.RemoteCryptoTokenProvider
|
|||
|
// 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.IdentityModel.Selectors;
|
|||
|
using System.IdentityModel.Tokens;
|
|||
|
using System.Security.Cryptography.X509Certificates;
|
|||
|
|
|||
|
namespace Microsoft.InfoCards
|
|||
|
{
|
|||
|
internal sealed class RemoteCryptoTokenProvider : SecurityTokenProvider, IDisposable
|
|||
|
{
|
|||
|
private RemoteX509Token m_token;
|
|||
|
private X509Certificate2 m_certificate;
|
|||
|
private object m_sync;
|
|||
|
|
|||
|
public RemoteCryptoTokenProvider(X509Certificate2 cert)
|
|||
|
{
|
|||
|
this.m_sync = new object();
|
|||
|
this.m_certificate = cert;
|
|||
|
}
|
|||
|
|
|||
|
public void Dispose()
|
|||
|
{
|
|||
|
IDisposable token = (IDisposable) this.m_token;
|
|||
|
if (token == null)
|
|||
|
return;
|
|||
|
token.Dispose();
|
|||
|
this.m_token = (RemoteX509Token) null;
|
|||
|
}
|
|||
|
|
|||
|
protected override SecurityToken GetTokenCore(TimeSpan timeout) => (SecurityToken) this.InnerGetToken();
|
|||
|
|
|||
|
private X509SecurityToken InnerGetToken()
|
|||
|
{
|
|||
|
if (this.m_token == null)
|
|||
|
{
|
|||
|
lock (this.m_sync)
|
|||
|
{
|
|||
|
if (this.m_token == null)
|
|||
|
this.m_token = new RemoteX509Token(this.m_certificate);
|
|||
|
}
|
|||
|
}
|
|||
|
return (X509SecurityToken) this.m_token;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|