Sdílet prostřednictvím


SslCertificateTrust.CreateForX509Collection Metoda

Definice

Vytvoří nový objekt 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

Parametry

trustList
X509Certificate2Collection

Kolekce obsahující důvěryhodné certifikáty.

sendTrustInHandshake
Boolean

true aby server během metody handshake protokolu TLS odeslal seznam důvěryhodných certifikačních autorit; false seznam neodešlete.

Návraty

Představuje zásadu důvěryhodnosti.

Atributy

Výjimky

sendTrustInHandshake je true a aktuální platforma nepodporuje odesílání seznamu důvěryhodných vystavitelů metodou handshake.

Poznámky

sendTrustInHandshake Pokud je trueargumentem , klient může použít seznam důvěryhodných certifikačních autorit ze serveru k výběru příslušného klientského certifikátu. Odesílání seznamu důvěryhodných vystavitelů se nepodporuje u SslCertificateTrust instancí vytvořených pomocí SslCertificaetTrust.CreateForX509Collection rozhraní .NET 6.

Od verze .NET 7 se seznam odesílacích důvěryhodných vystavitelů podporuje na platformách Linux a OSX.

Upozornění

Seznam důvěryhodných certifikačních autorit zvyšuje velikost zprávy handshake. Může se také považovat za únik informací o konfiguraci systému. Z těchto důvodů doporučujeme nastavit sendTrustInHandshake hodnotu .false

Platí pro