Share via


SslCertificateTrust.CreateForX509Store(X509Store, Boolean) メソッド

定義

新しい SslCertificateTrust を作成します。

public static System.Net.Security.SslCertificateTrust CreateForX509Store (System.Security.Cryptography.X509Certificates.X509Store store, bool sendTrustInHandshake = false);
static member CreateForX509Store : System.Security.Cryptography.X509Certificates.X509Store * bool -> System.Net.Security.SslCertificateTrust
Public Shared Function CreateForX509Store (store As X509Store, Optional sendTrustInHandshake As Boolean = false) As SslCertificateTrust

パラメーター

store
X509Store

信頼された証明書を含むストア。

sendTrustInHandshake
Boolean

true サーバーが TLS ハンドシェイク中に信頼された証明機関の一覧を送信する。 false リストを送信しません。

戻り値

信頼ポリシーを表します。

例外

sendTrustInHandshaketrue であり、現在のプラットフォームではハンドシェイクでの信頼された発行者リストの送信はサポートされていません。または (Windows では) storeの場所は ではありません LocalMachine

注釈

引数 が の sendTrustInHandshake 場合、クライアントは trueサーバーからの信頼された証明機関の一覧を使用して、適切なクライアント証明書を選択できます。 .NET 6 では、リストは Windows でのみ送信され、1 に設定されている "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\SendTrustedIssuerList" レジストリ設定によって異なります。 .NET 7 以降、リストは Linux および OSX プラットフォームでも送信されます。

警告

信頼できる CA の一覧により、ハンドシェイク メッセージのサイズが大きくなります。 また、システムの構成に関する情報リークと見なすこともできます。 このような理由から、 を にfalse設定sendTrustInHandshakeすることをお勧めします。

適用対象