SslStream.SslProtocol Właściwość

Definicja

Pobiera wartość wskazującą protokół zabezpieczeń używany do uwierzytelniania tego połączenia.

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

Wartość właściwości

SslProtocols

SslProtocols Wartość reprezentująca protokoły używane do uwierzytelniania.

Przykłady

Poniższy przykład przedstawia właściwości zabezpieczeń określonego strumienia.

static void DisplaySecurityLevel( SslStream^ stream )
{
   Console::WriteLine( L"Cipher: {0} strength {1}", stream->CipherAlgorithm, stream->CipherStrength );
   Console::WriteLine( L"Hash: {0} strength {1}", stream->HashAlgorithm, stream->HashStrength );
   Console::WriteLine( L"Key exchange: {0} strength {1}", stream->KeyExchangeAlgorithm, stream->KeyExchangeStrength );
   Console::WriteLine( L"Protocol: {0}", stream->SslProtocol );
}
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

Uwagi

Obsługiwane protokoły zabezpieczeń są określane podczas SslStream tworzenia. Jeśli żaden protokół zabezpieczeń nie został przekazany do konstruktora, wystąpienie zostanie utworzone przy użyciu polecenia Default. Rzeczywisty protokół używany do uwierzytelniania jest wybierany na podstawie protokołów obsługiwanych przez klienta i serwer.

Dotyczy