Files
Dec2017-Script-Dump/mscorlib/Mono/Security/X509/X509Stores.cs
T
2026-06-04 11:42:34 +02:00

173 lines
3.7 KiB
C#

using System;
using System.IO;
namespace Mono.Security.X509
{
// Token: 0x020000C5 RID: 197
internal class X509Stores
{
// Token: 0x06000AB5 RID: 2741 RVA: 0x0002F998 File Offset: 0x0002DB98
internal X509Stores(string path)
{
this._storePath = path;
}
// Token: 0x17000167 RID: 359
// (get) Token: 0x06000AB6 RID: 2742 RVA: 0x0002F9A8 File Offset: 0x0002DBA8
public X509Store Personal
{
get
{
if (this._personal == null)
{
string text = Path.Combine(this._storePath, "My");
this._personal = new X509Store(text, false);
}
return this._personal;
}
}
// Token: 0x17000168 RID: 360
// (get) Token: 0x06000AB7 RID: 2743 RVA: 0x0002F9E4 File Offset: 0x0002DBE4
public X509Store OtherPeople
{
get
{
if (this._other == null)
{
string text = Path.Combine(this._storePath, "AddressBook");
this._other = new X509Store(text, false);
}
return this._other;
}
}
// Token: 0x17000169 RID: 361
// (get) Token: 0x06000AB8 RID: 2744 RVA: 0x0002FA20 File Offset: 0x0002DC20
public X509Store IntermediateCA
{
get
{
if (this._intermediate == null)
{
string text = Path.Combine(this._storePath, "CA");
this._intermediate = new X509Store(text, true);
}
return this._intermediate;
}
}
// Token: 0x1700016A RID: 362
// (get) Token: 0x06000AB9 RID: 2745 RVA: 0x0002FA5C File Offset: 0x0002DC5C
public X509Store TrustedRoot
{
get
{
if (this._trusted == null)
{
string text = Path.Combine(this._storePath, "Trust");
this._trusted = new X509Store(text, true);
}
return this._trusted;
}
}
// Token: 0x1700016B RID: 363
// (get) Token: 0x06000ABA RID: 2746 RVA: 0x0002FA98 File Offset: 0x0002DC98
public X509Store Untrusted
{
get
{
if (this._untrusted == null)
{
string text = Path.Combine(this._storePath, "Disallowed");
this._untrusted = new X509Store(text, false);
}
return this._untrusted;
}
}
// Token: 0x06000ABB RID: 2747 RVA: 0x0002FAD4 File Offset: 0x0002DCD4
public void Clear()
{
if (this._personal != null)
{
this._personal.Clear();
}
this._personal = null;
if (this._other != null)
{
this._other.Clear();
}
this._other = null;
if (this._intermediate != null)
{
this._intermediate.Clear();
}
this._intermediate = null;
if (this._trusted != null)
{
this._trusted.Clear();
}
this._trusted = null;
if (this._untrusted != null)
{
this._untrusted.Clear();
}
this._untrusted = null;
}
// Token: 0x06000ABC RID: 2748 RVA: 0x0002FB74 File Offset: 0x0002DD74
public X509Store Open(string storeName, bool create)
{
if (storeName == null)
{
throw new ArgumentNullException("storeName");
}
string text = Path.Combine(this._storePath, storeName);
if (!create && !Directory.Exists(text))
{
return null;
}
return new X509Store(text, true);
}
// Token: 0x040002C5 RID: 709
private string _storePath;
// Token: 0x040002C6 RID: 710
private X509Store _personal;
// Token: 0x040002C7 RID: 711
private X509Store _other;
// Token: 0x040002C8 RID: 712
private X509Store _intermediate;
// Token: 0x040002C9 RID: 713
private X509Store _trusted;
// Token: 0x040002CA RID: 714
private X509Store _untrusted;
// Token: 0x020000C6 RID: 198
public class Names
{
// Token: 0x040002CB RID: 715
public const string Personal = "My";
// Token: 0x040002CC RID: 716
public const string OtherPeople = "AddressBook";
// Token: 0x040002CD RID: 717
public const string IntermediateCA = "CA";
// Token: 0x040002CE RID: 718
public const string TrustedRoot = "Trust";
// Token: 0x040002CF RID: 719
public const string Untrusted = "Disallowed";
}
}
}