SslStream.SslProtocol Tulajdonság

Definíció

Lekéri a kapcsolat hitelesítéséhez használt biztonsági protokollt jelző értéket.

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

Tulajdonság értéke

A SslProtocols hitelesítéshez használt protokollokat képviselő érték.

Példák

Az alábbi példa a megadott stream biztonsági tulajdonságait jeleníti meg.

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

Megjegyzések

Az engedélyezett biztonsági protokollok megadhatóak a következő helyenAuthenticateAsClient:AuthenticateAsServerEnabledSslProtocolsEnabledSslProtocols Ha nincs explicit módon megadva biztonsági protokoll, a rendszer az Default értéket használja.

A hitelesítéshez használt tényleges protokoll az ügyfél és a kiszolgáló által támogatottak alapján van kiválasztva.

A következőre érvényes: