다음을 통해 공유


X509ChainStatus.StatusInformation 속성

정의

ChainStatus 값에 대한 설명을 지정합니다.

public:
 property System::String ^ StatusInformation { System::String ^ get(); void set(System::String ^ value); };
public string StatusInformation { get; set; }
member this.StatusInformation : string with get, set
Public Property StatusInformation As String

속성 값

지역화할 수 있는 문자열입니다.

예제

다음 예제에서는 현재 사용자의 개인 인증서 저장소를 열고 사용자가 인증서를 선택할 수 있도록 한 다음, 인증서 및 인증서 체인 정보를 콘솔에 씁니다. 출력은 선택한 인증서에 따라 달라집니다.

//Output chain element information.
Console::WriteLine( "Chain Element Information" );
Console::WriteLine( "Number of chain elements: {0}", ch->ChainElements->Count );
Console::WriteLine( "Chain elements synchronized? {0} {1}", ch->ChainElements->IsSynchronized, Environment::NewLine );
System::Collections::IEnumerator^ myEnum = ch->ChainElements->GetEnumerator();
while ( myEnum->MoveNext() )
{
   X509ChainElement ^ element = safe_cast<X509ChainElement ^>(myEnum->Current);
   Console::WriteLine( "Element issuer name: {0}", element->Certificate->Issuer );
   Console::WriteLine( "Element certificate valid until: {0}", element->Certificate->NotAfter );
   Console::WriteLine( "Element certificate is valid: {0}", element->Certificate->Verify() );
   Console::WriteLine( "Element error status length: {0}", element->ChainElementStatus->Length );
   Console::WriteLine( "Element information: {0}", element->Information );
   Console::WriteLine( "Number of element extensions: {0}{1}", element->Certificate->Extensions->Count, Environment::NewLine );
   if ( ch->ChainStatus->Length > 1 )
   {
      for ( int index = 0; index < element->ChainElementStatus->Length; index++ )
      {
         Console::WriteLine( element->ChainElementStatus[ index ].Status );
         Console::WriteLine( element->ChainElementStatus[ index ].StatusInformation );
      }
   }
}

store->Close();
    //Output chain element information.
    Console.WriteLine ("Chain Element Information");
    Console.WriteLine ("Number of chain elements: {0}", ch.ChainElements.Count);
    Console.WriteLine ("Chain elements synchronized? {0} {1}", ch.ChainElements.IsSynchronized, Environment.NewLine);

    foreach (X509ChainElement element in ch.ChainElements)
    {
        Console.WriteLine ("Element issuer name: {0}", element.Certificate.Issuer);
        Console.WriteLine ("Element certificate valid until: {0}", element.Certificate.NotAfter);
        Console.WriteLine ("Element certificate is valid: {0}", element.Certificate.Verify ());
        Console.WriteLine ("Element error status length: {0}", element.ChainElementStatus.Length);
        Console.WriteLine ("Element information: {0}", element.Information);
        Console.WriteLine ("Number of element extensions: {0}{1}", element.Certificate.Extensions.Count, Environment.NewLine);

        if (ch.ChainStatus.Length > 1)
        {
            for (int index = 0; index < element.ChainElementStatus.Length; index++)
            {
                Console.WriteLine (element.ChainElementStatus[index].Status);
                Console.WriteLine (element.ChainElementStatus[index].StatusInformation);
            }
        }
    }
    store.Close();
'Output chain element information.
Console.WriteLine("Chain Element Information")
Console.WriteLine("Number of chain elements: {0}", ch.ChainElements.Count)
Console.WriteLine("Chain elements synchronized? {0} {1}", ch.ChainElements.IsSynchronized, Environment.NewLine)

Dim element As X509ChainElement
For Each element In ch.ChainElements
    Console.WriteLine("Element issuer name: {0}", element.Certificate.Issuer)
    Console.WriteLine("Element certificate valid until: {0}", element.Certificate.NotAfter)
    Console.WriteLine("Element certificate is valid: {0}", element.Certificate.Verify())
    Console.WriteLine("Element error status length: {0}", element.ChainElementStatus.Length)
    Console.WriteLine("Element information: {0}", element.Information)
    Console.WriteLine("Number of element extensions: {0}{1}", element.Certificate.Extensions.Count, Environment.NewLine)

    If ch.ChainStatus.Length > 1 Then
        Dim index As Integer
        For index = 0 To element.ChainElementStatus.Length
            Console.WriteLine(element.ChainElementStatus(index).Status)
            Console.WriteLine(element.ChainElementStatus(index).StatusInformation)
        Next index
    End If
Next element
store.Close()

설명

이 속성은 열거형에 ChainStatus 대한 설명을 제공하는 지역화된 문자열입니다.

적용 대상