IssuedTokenServiceCredential.RevocationMode プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
失効モードを取得または設定します。
public:
property System::Security::Cryptography::X509Certificates::X509RevocationMode RevocationMode { System::Security::Cryptography::X509Certificates::X509RevocationMode get(); void set(System::Security::Cryptography::X509Certificates::X509RevocationMode value); };
public System.Security.Cryptography.X509Certificates.X509RevocationMode RevocationMode { get; set; }
member this.RevocationMode : System.Security.Cryptography.X509Certificates.X509RevocationMode with get, set
Public Property RevocationMode As X509RevocationMode
プロパティ値
失効モード。
例
このプロパティにアクセスして設定する方法を次のコードに示します。
// This method configures the IssuedTokenAuthentication property of a ServiceHost.
public static void ConfigureIssuedTokenServiceCredentials(
ServiceHost sh, bool allowCardspaceTokens, IList<X509Certificate2> knownissuers,
X509CertificateValidationMode certMode, X509RevocationMode revocationMode, SamlSerializer ser )
{
// Allow CardSpace tokens.
sh.Credentials.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = allowCardspaceTokens;
// Set up known issuer certificates.
foreach(X509Certificate2 cert in knownissuers)
sh.Credentials.IssuedTokenAuthentication.KnownCertificates.Add ( cert );
// Set issuer certificate validation and revocation checking modes.
sh.Credentials.IssuedTokenAuthentication.CertificateValidationMode =
X509CertificateValidationMode.PeerOrChainTrust;
sh.Credentials.IssuedTokenAuthentication.RevocationMode = X509RevocationMode.Online;
sh.Credentials.IssuedTokenAuthentication.TrustedStoreLocation = StoreLocation.LocalMachine;
// Set the SamlSerializer, if one is specified.
if ( ser != null )
sh.Credentials.IssuedTokenAuthentication.SamlSerializer = ser;
}
' This method configures the IssuedTokenAuthentication property of a ServiceHost.
Public Shared Sub ConfigureIssuedTokenServiceCredentials( _
ByVal sh As ServiceHost, _
ByVal allowCardspaceTokens As Boolean, _
ByVal knownissuers As IList(Of X509Certificate2), _
ByVal certMode As X509CertificateValidationMode, _
ByVal revocationMode As X509RevocationMode, _
ByVal ser As SamlSerializer _
)
' Allow CardSpace tokens.
sh.Credentials.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = _
allowCardspaceTokens
' Set up known issuer certificates.
Dim cert As X509Certificate2
For Each cert In knownissuers
sh.Credentials.IssuedTokenAuthentication.KnownCertificates.Add(cert)
Next cert
' Set issuer certificate validation and revocation checking modes.
sh.Credentials.IssuedTokenAuthentication.CertificateValidationMode = _
X509CertificateValidationMode.PeerOrChainTrust
sh.Credentials.IssuedTokenAuthentication.RevocationMode = _
X509RevocationMode.Online
' Set the SamlSerializer, if one is specified.
If Not (ser Is Nothing) Then
sh.Credentials.IssuedTokenAuthentication.SamlSerializer = ser
End If
End Sub
注釈
X509RevocationMode では、失効状態の検証を行うかどうかに加え、検証をオンラインで実行するか、オフラインで実行するかが指定されます。
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET