SslStream.SslProtocol Propriedade

Definição

Recebe um valor que indica o protocolo de segurança usado para autenticar esta ligação.

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

Valor de Propriedade

O SslProtocols valor que representa protocolos usados para autenticação.

Exemplos

O exemplo seguinte mostra as propriedades de segurança do fluxo especificado.

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

Observações

Os protocolos de segurança ativados podem ser especificados em AuthenticateAsClient ou via EnabledSslProtocols e AuthenticateAsServer ou EnabledSslProtocols. Se não for especificado explicitamente nenhum protocolo de segurança, o Default valor é utilizado.

O protocolo real utilizado para autenticação é selecionado com base nos suportes pelo cliente e pelo servidor.

Aplica-se a