Share via


SslCertificateTrust.CreateForX509Collection メソッド

定義

新しい SslCertificateTrust を作成します。

[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public static System.Net.Security.SslCertificateTrust CreateForX509Collection (System.Security.Cryptography.X509Certificates.X509Certificate2Collection trustList, bool sendTrustInHandshake = false);
public static System.Net.Security.SslCertificateTrust CreateForX509Collection (System.Security.Cryptography.X509Certificates.X509Certificate2Collection trustList, bool sendTrustInHandshake = false);
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
static member CreateForX509Collection : System.Security.Cryptography.X509Certificates.X509Certificate2Collection * bool -> System.Net.Security.SslCertificateTrust
static member CreateForX509Collection : System.Security.Cryptography.X509Certificates.X509Certificate2Collection * bool -> System.Net.Security.SslCertificateTrust
Public Shared Function CreateForX509Collection (trustList As X509Certificate2Collection, Optional sendTrustInHandshake As Boolean = false) As SslCertificateTrust

パラメーター

trustList
X509Certificate2Collection

信頼された証明書を含むコレクション。

sendTrustInHandshake
Boolean

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

戻り値

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

属性

例外

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

注釈

引数 が sendTrustInHandshake の場合、クライアントは trueサーバーからの信頼された証明機関の一覧を使用して、適切なクライアント証明書を選択できます。 信頼された発行者リストの送信は、.NET 6 で をSslCertificaetTrust.CreateForX509Collection使用して作成されたインスタンスではサポートされていませんSslCertificateTrust

.NET 7 以降、送信側の信頼された発行者の一覧は、Linux および OSX プラットフォームでサポートされています。

警告

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

適用対象