119 lines
3.7 KiB
C#
119 lines
3.7 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.IO;
|
|
|
|
namespace Mono.Security.X509
|
|
{
|
|
// Token: 0x020000C4 RID: 196
|
|
internal sealed class X509StoreManager
|
|
{
|
|
// Token: 0x06000AAD RID: 2733 RVA: 0x0002F7C0 File Offset: 0x0002D9C0
|
|
private X509StoreManager()
|
|
{
|
|
}
|
|
|
|
// Token: 0x17000160 RID: 352
|
|
// (get) Token: 0x06000AAE RID: 2734 RVA: 0x0002F7C8 File Offset: 0x0002D9C8
|
|
public static X509Stores CurrentUser
|
|
{
|
|
get
|
|
{
|
|
if (X509StoreManager._userStore == null)
|
|
{
|
|
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), ".mono");
|
|
text = Path.Combine(text, "certs");
|
|
X509StoreManager._userStore = new X509Stores(text);
|
|
}
|
|
return X509StoreManager._userStore;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000161 RID: 353
|
|
// (get) Token: 0x06000AAF RID: 2735 RVA: 0x0002F810 File Offset: 0x0002DA10
|
|
public static X509Stores LocalMachine
|
|
{
|
|
get
|
|
{
|
|
if (X509StoreManager._machineStore == null)
|
|
{
|
|
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), ".mono");
|
|
text = Path.Combine(text, "certs");
|
|
X509StoreManager._machineStore = new X509Stores(text);
|
|
}
|
|
return X509StoreManager._machineStore;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000162 RID: 354
|
|
// (get) Token: 0x06000AB0 RID: 2736 RVA: 0x0002F858 File Offset: 0x0002DA58
|
|
public static X509CertificateCollection IntermediateCACertificates
|
|
{
|
|
get
|
|
{
|
|
X509CertificateCollection x509CertificateCollection = new X509CertificateCollection();
|
|
x509CertificateCollection.AddRange(X509StoreManager.CurrentUser.IntermediateCA.Certificates);
|
|
x509CertificateCollection.AddRange(X509StoreManager.LocalMachine.IntermediateCA.Certificates);
|
|
return x509CertificateCollection;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000163 RID: 355
|
|
// (get) Token: 0x06000AB1 RID: 2737 RVA: 0x0002F898 File Offset: 0x0002DA98
|
|
public static ArrayList IntermediateCACrls
|
|
{
|
|
get
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
arrayList.AddRange(X509StoreManager.CurrentUser.IntermediateCA.Crls);
|
|
arrayList.AddRange(X509StoreManager.LocalMachine.IntermediateCA.Crls);
|
|
return arrayList;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000164 RID: 356
|
|
// (get) Token: 0x06000AB2 RID: 2738 RVA: 0x0002F8D8 File Offset: 0x0002DAD8
|
|
public static X509CertificateCollection TrustedRootCertificates
|
|
{
|
|
get
|
|
{
|
|
X509CertificateCollection x509CertificateCollection = new X509CertificateCollection();
|
|
x509CertificateCollection.AddRange(X509StoreManager.CurrentUser.TrustedRoot.Certificates);
|
|
x509CertificateCollection.AddRange(X509StoreManager.LocalMachine.TrustedRoot.Certificates);
|
|
return x509CertificateCollection;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000165 RID: 357
|
|
// (get) Token: 0x06000AB3 RID: 2739 RVA: 0x0002F918 File Offset: 0x0002DB18
|
|
public static ArrayList TrustedRootCACrls
|
|
{
|
|
get
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
arrayList.AddRange(X509StoreManager.CurrentUser.TrustedRoot.Crls);
|
|
arrayList.AddRange(X509StoreManager.LocalMachine.TrustedRoot.Crls);
|
|
return arrayList;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000166 RID: 358
|
|
// (get) Token: 0x06000AB4 RID: 2740 RVA: 0x0002F958 File Offset: 0x0002DB58
|
|
public static X509CertificateCollection UntrustedCertificates
|
|
{
|
|
get
|
|
{
|
|
X509CertificateCollection x509CertificateCollection = new X509CertificateCollection();
|
|
x509CertificateCollection.AddRange(X509StoreManager.CurrentUser.Untrusted.Certificates);
|
|
x509CertificateCollection.AddRange(X509StoreManager.LocalMachine.Untrusted.Certificates);
|
|
return x509CertificateCollection;
|
|
}
|
|
}
|
|
|
|
// Token: 0x040002C3 RID: 707
|
|
private static X509Stores _userStore;
|
|
|
|
// Token: 0x040002C4 RID: 708
|
|
private static X509Stores _machineStore;
|
|
}
|
|
}
|