SslStream.SslProtocol Propiedad

Definición

Obtiene un valor que indica el protocolo de seguridad utilizado para autenticar esta conexión.

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 propiedad

Valor SslProtocols que representa el protocolo que se usa para la autenticación.

Ejemplos

En el ejemplo siguiente se muestran las propiedades de seguridad de la secuencia especificada.

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

Comentarios

Los protocolos de seguridad habilitados se pueden especificar en AuthenticateAsClient o a través EnabledSslProtocols de y AuthenticateAsServer o EnabledSslProtocols. Si no se ha especificado explícitamente ningún protocolo de seguridad, se usa el Default valor .

El protocolo real que se usa para la autenticación se selecciona en función de los admitidos por el cliente y el servidor.

Se aplica a