Certificate.CertificateChainInformation Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of CertificateInfo for the certificate chain.
public virtual System.Collections.Generic.IList<Microsoft.Media.Drm.CertificateInfo> CertificateChainInformation { get; }
member this.CertificateChainInformation : System.Collections.Generic.IList<Microsoft.Media.Drm.CertificateInfo>
Public Overridable ReadOnly Property CertificateChainInformation As IList(Of CertificateInfo)
Property Value
The collection of CertificateInfo for the certificate chain.
Examples
The following sample demonstrates how to get the manufacturer information by using CertificateChainInformation.
if (challengeData.ClientCertificate != null && challengeData.ClientCertificate.Type == CertificateType.Device)
{
IList<CertificateInfo>certinfos = challengeData.ClientCertificate.CertificateChainInformation;
if (certinfos.Count > 0)
{
//
// Verify that the root certificate is issued by Microsoft.
//
CertificateInfo certinfo = certinfos[certinfos.Count - 1];
if ((certinfo.ManufacturerName == null)
|| (string.Compare("Microsoft", certinfo.ManufacturerName,
StringComparison.OrdinalIgnoreCase) != 0))
{
throw new ServiceSpecificException("Root CA is not issued by Microsoft");
}
}
}
Remarks
The list is sorted from leaf certificate to root certificate. For example, index 0 contains the manufacturer information from the leaf certificate; index max-1 contains the manufacturer information from the root certificate.