X509RevocationMode X509RevocationMode X509RevocationMode X509RevocationMode Enum

Definizione

Specifica la modalità utilizzata per eseguire un controllo di revoca dei certificati X509.Specifies the mode used to check for X509 certificate revocation.

public enum class X509RevocationMode
public enum X509RevocationMode
type X509RevocationMode = 
Public Enum X509RevocationMode
Ereditarietà
X509RevocationModeX509RevocationModeX509RevocationModeX509RevocationMode

Campi

NoCheck NoCheck NoCheck NoCheck 0

Non viene eseguito alcun controllo di revoca sul certificato.No revocation check is performed on the certificate.

Offline Offline Offline Offline 2

Viene eseguito un controllo di revoca mediante un elenco certificati revocati (CRL, Certificate Revocation List) memorizzato nella cache.A revocation check is made using a cached certificate revocation list (CRL).

Online Online Online Online 1

Viene eseguito un controllo di revoca mediante un elenco certificati revocati online.A revocation check is made using an online certificate revocation list (CRL).

Esempi

Nell'esempio seguente viene aperto l'archivio certificati personale dell'utente corrente, viene consentito all'utente di selezionare un certificato, quindi vengono scritte informazioni sulla catena di certificati e certificati nella console di.The following example opens the current user's personal certificate store, allows the user to select a certificate, then writes certificate and certificate chain information to the console. L'output dipende dal certificato selezionato.The output depends on the certificate you select.

//Output chain information of the selected certificate.
X509Chain ^ ch = gcnew X509Chain;
ch->ChainPolicy->RevocationMode = X509RevocationMode::Online;
ch->Build( certificate );
Console::WriteLine( "Chain Information" );
Console::WriteLine( "Chain revocation flag: {0}", ch->ChainPolicy->RevocationFlag );
Console::WriteLine( "Chain revocation mode: {0}", ch->ChainPolicy->RevocationMode );
Console::WriteLine( "Chain verification flag: {0}", ch->ChainPolicy->VerificationFlags );
Console::WriteLine( "Chain verification time: {0}", ch->ChainPolicy->VerificationTime );
Console::WriteLine( "Chain status length: {0}", ch->ChainStatus->Length );
Console::WriteLine( "Chain application policy count: {0}", ch->ChainPolicy->ApplicationPolicy->Count );
Console::WriteLine( "Chain certificate policy count: {0} {1}", ch->ChainPolicy->CertificatePolicy->Count, Environment::NewLine );
//Output chain information of the selected certificate.
X509Chain ch = new X509Chain();
ch.ChainPolicy.RevocationMode = X509RevocationMode.Online;
ch.Build (certificate);
Console.WriteLine ("Chain Information");
Console.WriteLine ("Chain revocation flag: {0}", ch.ChainPolicy.RevocationFlag);
Console.WriteLine ("Chain revocation mode: {0}", ch.ChainPolicy.RevocationMode);
Console.WriteLine ("Chain verification flag: {0}", ch.ChainPolicy.VerificationFlags);
Console.WriteLine ("Chain verification time: {0}", ch.ChainPolicy.VerificationTime);
Console.WriteLine ("Chain status length: {0}", ch.ChainStatus.Length);
Console.WriteLine ("Chain application policy count: {0}", ch.ChainPolicy.ApplicationPolicy.Count);
Console.WriteLine ("Chain certificate policy count: {0} {1}", ch.ChainPolicy.CertificatePolicy.Count, Environment.NewLine);
'Output chain information of the selected certificate.
Dim ch As New X509Chain()
ch.ChainPolicy.RevocationMode = X509RevocationMode.Online
ch.Build(certificate)
Console.WriteLine("Chain Information")
Console.WriteLine("Chain revocation flag: {0}", ch.ChainPolicy.RevocationFlag)
Console.WriteLine("Chain revocation mode: {0}", ch.ChainPolicy.RevocationMode)
Console.WriteLine("Chain verification flag: {0}", ch.ChainPolicy.VerificationFlags)
Console.WriteLine("Chain verification time: {0}", ch.ChainPolicy.VerificationTime)
Console.WriteLine("Chain status length: {0}", ch.ChainStatus.Length)
Console.WriteLine("Chain application policy count: {0}", ch.ChainPolicy.ApplicationPolicy.Count)
Console.WriteLine("Chain certificate policy count: {0} {1}", ch.ChainPolicy.CertificatePolicy.Count, Environment.NewLine)

Commenti

Questa enumerazione viene utilizzata per specificare se viene eseguito un controllo di revoca e se viene eseguito online o offline.This enumeration is used to specify whether a revocation check occurs and if it is performed online or offline.

Nota

La specifica di un controllo online può comportare un ritardo prolungato mentre viene contattata l'autorità di certificazione.Specifying an online check can result in a long delay while the certificate authority is contacted.

Si applica a