SslStream.SslProtocol Eigenschap

Definitie

Hiermee wordt een waarde opgehaald die aangeeft welk beveiligingsprotocol wordt gebruikt om deze verbinding te verifiëren.

public:
 virtual property System::Security::Authentication::SslProtocols SslProtocol { System::Security::Authentication::SslProtocols get(); };
public virtual System.Security.Authentication.SslProtocols SslProtocol { get; }
member this.SslProtocol : System.Security.Authentication.SslProtocols
Public Overridable ReadOnly Property SslProtocol As SslProtocols

Waarde van eigenschap

De SslProtocols waarde die protocollen vertegenwoordigt die worden gebruikt voor verificatie.

Voorbeelden

In het volgende voorbeeld worden de beveiligingseigenschappen van de opgegeven stream weergegeven.

static void DisplaySecurityLevel(SslStream stream)
{
   Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength);
   Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength);
   Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength);
   Console.WriteLine("Protocol: {0}", stream.SslProtocol);
}
Private Shared Sub DisplaySecurityLevel(stream As SslStream)
    Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength)
    Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength)
    Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength)
    Console.WriteLine("Protocol: {0}", stream.SslProtocol)
End Sub

Opmerkingen

De ingeschakelde beveiligingsprotocollen kunnen worden opgegeven in AuthenticateAsClient of via EnabledSslProtocols en AuthenticateAsServer of EnabledSslProtocols. Als er geen beveiligingsprotocol expliciet is opgegeven, wordt de Default waarde gebruikt.

Het werkelijke protocol dat wordt gebruikt voor verificatie wordt geselecteerd op basis van de protocollen die door de client en server worden ondersteund.

Van toepassing op