191 lines
6.6 KiB
C#
191 lines
6.6 KiB
C#
using System;
|
|
|
|
namespace System.Security.Cryptography.X509Certificates
|
|
{
|
|
/// <summary>Represents the chain policy to be applied when building an X509 certificate chain. This class cannot be inherited.</summary>
|
|
// Token: 0x02000291 RID: 657
|
|
public sealed class X509ChainPolicy
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509ChainPolicy" /> class. </summary>
|
|
// Token: 0x06001842 RID: 6210 RVA: 0x000527A8 File Offset: 0x000509A8
|
|
public X509ChainPolicy()
|
|
{
|
|
this.Reset();
|
|
}
|
|
|
|
/// <summary>Gets a collection of object identifiers (OIDs) specifying which application policies or enhanced key usages (EKUs) the certificate supports.</summary>
|
|
/// <returns>An <see cref="T:System.Security.Cryptography.OidCollection" /> object.</returns>
|
|
// Token: 0x1700079E RID: 1950
|
|
// (get) Token: 0x06001843 RID: 6211 RVA: 0x000527B8 File Offset: 0x000509B8
|
|
public OidCollection ApplicationPolicy
|
|
{
|
|
get
|
|
{
|
|
return this.apps;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a collection of object identifiers (OIDs) specifying which certificate policies the certificate supports.</summary>
|
|
/// <returns>An <see cref="T:System.Security.Cryptography.OidCollection" /> object.</returns>
|
|
// Token: 0x1700079F RID: 1951
|
|
// (get) Token: 0x06001844 RID: 6212 RVA: 0x000527C0 File Offset: 0x000509C0
|
|
public OidCollection CertificatePolicy
|
|
{
|
|
get
|
|
{
|
|
return this.cert;
|
|
}
|
|
}
|
|
|
|
/// <summary>Represents an additional collection of certificates that can be searched by the chaining engine when validating a certificate chain.</summary>
|
|
/// <returns>An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2Collection" /> object.</returns>
|
|
// Token: 0x170007A0 RID: 1952
|
|
// (get) Token: 0x06001845 RID: 6213 RVA: 0x000527C8 File Offset: 0x000509C8
|
|
public X509Certificate2Collection ExtraStore
|
|
{
|
|
get
|
|
{
|
|
return this.store;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets values for X509 revocation flags.</summary>
|
|
/// <returns>An <see cref="T:System.Security.Cryptography.X509Certificates.X509RevocationFlag" /> object.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="T:System.Security.Cryptography.X509Certificates.X509RevocationFlag" /> value supplied is not a valid flag. </exception>
|
|
// Token: 0x170007A1 RID: 1953
|
|
// (get) Token: 0x06001846 RID: 6214 RVA: 0x000527D0 File Offset: 0x000509D0
|
|
// (set) Token: 0x06001847 RID: 6215 RVA: 0x000527D8 File Offset: 0x000509D8
|
|
public X509RevocationFlag RevocationFlag
|
|
{
|
|
get
|
|
{
|
|
return this.rflag;
|
|
}
|
|
set
|
|
{
|
|
if (value < X509RevocationFlag.EndCertificateOnly || value > X509RevocationFlag.ExcludeRoot)
|
|
{
|
|
throw new ArgumentException("RevocationFlag");
|
|
}
|
|
this.rflag = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets values for X509 certificate revocation mode.</summary>
|
|
/// <returns>An <see cref="T:System.Security.Cryptography.X509Certificates.X509RevocationMode" /> object.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="T:System.Security.Cryptography.X509Certificates.X509RevocationMode" /> value supplied is not a valid flag. </exception>
|
|
// Token: 0x170007A2 RID: 1954
|
|
// (get) Token: 0x06001848 RID: 6216 RVA: 0x00052808 File Offset: 0x00050A08
|
|
// (set) Token: 0x06001849 RID: 6217 RVA: 0x00052810 File Offset: 0x00050A10
|
|
public X509RevocationMode RevocationMode
|
|
{
|
|
get
|
|
{
|
|
return this.mode;
|
|
}
|
|
set
|
|
{
|
|
if (value < X509RevocationMode.NoCheck || value > X509RevocationMode.Offline)
|
|
{
|
|
throw new ArgumentException("RevocationMode");
|
|
}
|
|
this.mode = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the time span that elapsed during online revocation verification or downloading the certificate revocation list (CRL).</summary>
|
|
/// <returns>A <see cref="T:System.TimeSpan" /> object.</returns>
|
|
// Token: 0x170007A3 RID: 1955
|
|
// (get) Token: 0x0600184A RID: 6218 RVA: 0x00052840 File Offset: 0x00050A40
|
|
// (set) Token: 0x0600184B RID: 6219 RVA: 0x00052848 File Offset: 0x00050A48
|
|
public TimeSpan UrlRetrievalTimeout
|
|
{
|
|
get
|
|
{
|
|
return this.timeout;
|
|
}
|
|
set
|
|
{
|
|
this.timeout = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets verification flags for the certificate.</summary>
|
|
/// <returns>A value from the <see cref="T:System.Security.Cryptography.X509Certificates.X509VerificationFlags" /> enumeration.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <see cref="T:System.Security.Cryptography.X509Certificates.X509VerificationFlags" /> value supplied is not a valid flag. <see cref="F:System.Security.Cryptography.X509Certificates.X509VerificationFlags.NoFlag" /> is the default value. </exception>
|
|
// Token: 0x170007A4 RID: 1956
|
|
// (get) Token: 0x0600184C RID: 6220 RVA: 0x00052854 File Offset: 0x00050A54
|
|
// (set) Token: 0x0600184D RID: 6221 RVA: 0x0005285C File Offset: 0x00050A5C
|
|
public X509VerificationFlags VerificationFlags
|
|
{
|
|
get
|
|
{
|
|
return this.vflags;
|
|
}
|
|
set
|
|
{
|
|
if ((value | X509VerificationFlags.AllFlags) != X509VerificationFlags.AllFlags)
|
|
{
|
|
throw new ArgumentException("VerificationFlags");
|
|
}
|
|
this.vflags = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>The time that the certificate was verified expressed in local time.</summary>
|
|
/// <returns>A <see cref="T:System.DateTime" /> object.</returns>
|
|
// Token: 0x170007A5 RID: 1957
|
|
// (get) Token: 0x0600184E RID: 6222 RVA: 0x00052884 File Offset: 0x00050A84
|
|
// (set) Token: 0x0600184F RID: 6223 RVA: 0x0005288C File Offset: 0x00050A8C
|
|
public DateTime VerificationTime
|
|
{
|
|
get
|
|
{
|
|
return this.vtime;
|
|
}
|
|
set
|
|
{
|
|
this.vtime = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Resets the <see cref="T:System.Security.Cryptography.X509Certificates.X509ChainPolicy" /> members to their default values.</summary>
|
|
// Token: 0x06001850 RID: 6224 RVA: 0x00052898 File Offset: 0x00050A98
|
|
public void Reset()
|
|
{
|
|
this.apps = new OidCollection();
|
|
this.cert = new OidCollection();
|
|
this.store = new X509Certificate2Collection();
|
|
this.rflag = X509RevocationFlag.ExcludeRoot;
|
|
this.mode = X509RevocationMode.Online;
|
|
this.timeout = TimeSpan.Zero;
|
|
this.vflags = X509VerificationFlags.NoFlag;
|
|
this.vtime = DateTime.Now;
|
|
}
|
|
|
|
// Token: 0x0400131C RID: 4892
|
|
private OidCollection apps;
|
|
|
|
// Token: 0x0400131D RID: 4893
|
|
private OidCollection cert;
|
|
|
|
// Token: 0x0400131E RID: 4894
|
|
private X509Certificate2Collection store;
|
|
|
|
// Token: 0x0400131F RID: 4895
|
|
private X509RevocationFlag rflag;
|
|
|
|
// Token: 0x04001320 RID: 4896
|
|
private X509RevocationMode mode;
|
|
|
|
// Token: 0x04001321 RID: 4897
|
|
private TimeSpan timeout;
|
|
|
|
// Token: 0x04001322 RID: 4898
|
|
private X509VerificationFlags vflags;
|
|
|
|
// Token: 0x04001323 RID: 4899
|
|
private DateTime vtime;
|
|
}
|
|
}
|