12 private string m_description;
32 CAPIBase.CERT_CHAIN_ELEMENT cERT_CHAIN_ELEMENT =
new CAPIBase.CERT_CHAIN_ELEMENT(
Marshal.
SizeOf(typeof(CAPIBase.CERT_CHAIN_ELEMENT)));
39 m_certificate =
new X509Certificate2(cERT_CHAIN_ELEMENT.pCertContext);
40 if (cERT_CHAIN_ELEMENT.pwszExtendedErrorInfo ==
IntPtr.
Zero)
42 m_description =
string.Empty;
48 if (cERT_CHAIN_ELEMENT.dwErrorStatus == 0)
50 m_chainStatus =
new X509ChainStatus[0];
54 m_chainStatus = X509Chain.GetChainStatusInformation(cERT_CHAIN_ELEMENT.dwErrorStatus);
static int ReadInt32([In] [MarshalAs(UnmanagedType.AsAny)] object ptr, int ofs)
Reads a 32-bit signed integer at a given offset from unmanaged memory.
Provides a simple structure for storing X509 chain status and error information.
X509ChainStatus [] ChainElementStatus
Gets the error status of the current X.509 certificate in a chain.
static int SizeOf(object structure)
Returns the unmanaged size of an object in bytes.
X509Certificate2 Certificate
Gets the X.509 certificate at a particular chain element.
string Information
Gets additional error information from an unmanaged certificate chain structure.
Represents an element of an X.509 chain.
A platform-specific type that is used to represent a pointer or a handle.
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks,...
static unsafe string PtrToStringUni(IntPtr ptr, int len)
Allocates a managed T:System.String and copies a specified number of characters from an unmanaged Uni...
static readonly IntPtr Zero
A read-only field that represents a pointer or handle that has been initialized to zero.
Represents an X.509 certificate.