using System; namespace System.Security.Cryptography.X509Certificates { /// Represents an element of an X.509 chain. // Token: 0x0200028E RID: 654 public class X509ChainElement { // Token: 0x06001828 RID: 6184 RVA: 0x00052330 File Offset: 0x00050530 internal X509ChainElement(X509Certificate2 certificate) { this.certificate = certificate; this.info = string.Empty; } /// Gets the X.509 certificate at a particular chain element. /// An object. // Token: 0x17000794 RID: 1940 // (get) Token: 0x06001829 RID: 6185 RVA: 0x0005234C File Offset: 0x0005054C public X509Certificate2 Certificate { get { return this.certificate; } } /// Gets the error status of the current X.509 certificate in a chain. /// An array of objects. /// /// /// // Token: 0x17000795 RID: 1941 // (get) Token: 0x0600182A RID: 6186 RVA: 0x00052354 File Offset: 0x00050554 public X509ChainStatus[] ChainElementStatus { get { return this.status; } } /// Gets additional error information from an unmanaged certificate chain structure. /// A string representing the pwszExtendedErrorInfo member of the unmanaged CERT_CHAIN_ELEMENT structure in the Crypto API. // Token: 0x17000796 RID: 1942 // (get) Token: 0x0600182B RID: 6187 RVA: 0x0005235C File Offset: 0x0005055C public string Information { get { return this.info; } } // Token: 0x17000797 RID: 1943 // (get) Token: 0x0600182C RID: 6188 RVA: 0x00052364 File Offset: 0x00050564 // (set) Token: 0x0600182D RID: 6189 RVA: 0x0005236C File Offset: 0x0005056C internal X509ChainStatusFlags StatusFlags { get { return this.compressed_status_flags; } set { this.compressed_status_flags = value; } } // Token: 0x0600182E RID: 6190 RVA: 0x00052378 File Offset: 0x00050578 private int Count(X509ChainStatusFlags flags) { int num = 0; int num2 = 0; int num3 = 1; while (num2++ < 32) { if ((flags & (X509ChainStatusFlags)num3) == (X509ChainStatusFlags)num3) { num++; } num3 <<= 1; } return num; } // Token: 0x0600182F RID: 6191 RVA: 0x000523B0 File Offset: 0x000505B0 private void Set(X509ChainStatus[] status, ref int position, X509ChainStatusFlags flags, X509ChainStatusFlags mask) { if ((flags & mask) != X509ChainStatusFlags.NoError) { status[position].Status = mask; status[position].StatusInformation = X509ChainStatus.GetInformation(mask); position++; } } // Token: 0x06001830 RID: 6192 RVA: 0x000523F0 File Offset: 0x000505F0 internal void UncompressFlags() { if (this.compressed_status_flags == X509ChainStatusFlags.NoError) { this.status = new X509ChainStatus[0]; } else { int num = this.Count(this.compressed_status_flags); this.status = new X509ChainStatus[num]; int num2 = 0; this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.UntrustedRoot); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.NotTimeValid); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.NotTimeNested); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.Revoked); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.NotSignatureValid); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.NotValidForUsage); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.RevocationStatusUnknown); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.Cyclic); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.InvalidExtension); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.InvalidPolicyConstraints); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.InvalidBasicConstraints); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.InvalidNameConstraints); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.HasNotSupportedNameConstraint); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.HasNotDefinedNameConstraint); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.HasNotPermittedNameConstraint); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.HasExcludedNameConstraint); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.PartialChain); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.CtlNotTimeValid); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.CtlNotSignatureValid); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.CtlNotValidForUsage); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.OfflineRevocation); this.Set(this.status, ref num2, this.compressed_status_flags, X509ChainStatusFlags.NoIssuanceChainPolicy); } } // Token: 0x04001316 RID: 4886 private X509Certificate2 certificate; // Token: 0x04001317 RID: 4887 private X509ChainStatus[] status; // Token: 0x04001318 RID: 4888 private string info; // Token: 0x04001319 RID: 4889 private X509ChainStatusFlags compressed_status_flags; } }