SslStream.SslProtocol Proprietà

Definizione

Ottiene un valore che indica il certificato di sicurezza utilizzato per autenticare questa connessione.

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

Valore della proprietà

Valore SslProtocols che rappresenta i protocolli usato per l'autenticazione.

Esempio

Nell'esempio seguente vengono visualizzate le proprietà di sicurezza del flusso specificato.

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

Commenti

I protocolli di sicurezza abilitati possono essere specificati in AuthenticateAsClient o tramite EnabledSslProtocols e AuthenticateAsServer o EnabledSslProtocols. Se non è stato specificato in modo esplicito alcun protocollo di sicurezza, viene utilizzato il Default valore .

Il protocollo effettivo usato per l'autenticazione viene selezionato in base a quelli supportati dal client e dal server.

Si applica a