SslStream.IsMutuallyAuthenticated Proprietà

Definizione

Ottiene un valore Boolean che indica se il client e il server sono stati entrambi autenticati.

public:
 virtual property bool IsMutuallyAuthenticated { bool get(); };
public override bool IsMutuallyAuthenticated { get; }
member this.IsMutuallyAuthenticated : bool
Public Overrides ReadOnly Property IsMutuallyAuthenticated As Boolean

Valore della proprietà

true se sia il server che il client sono stati autenticati; in caso contrario false, .

Esempio

Nell'esempio di codice seguente viene illustrato il valore di questa proprietà.

static void DisplaySecurityServices( SslStream^ stream )
{
   Console::WriteLine( L"Is authenticated: {0} as server? {1}", stream->IsAuthenticated, stream->IsServer );
   Console::WriteLine( L"IsSigned: {0}", stream->IsSigned );
   Console::WriteLine( L"Is Encrypted: {0}", stream->IsEncrypted );
   Console::WriteLine( L"Is mutually authenticated: {0}", stream->IsMutuallyAuthenticated );
}
static void DisplaySecurityServices(SslStream stream)
{
   Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer);
   Console.WriteLine("IsSigned: {0}", stream.IsSigned);
   Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted);
   Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated);
}
Private Shared Sub DisplaySecurityServices(stream As SslStream)
    Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer)
    Console.WriteLine("IsSigned: {0}", stream.IsSigned)
    Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted)
    Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated)
End Sub

Commenti

L'autenticazione reciproca viene specificata dal server quando il server vuole che il client fornisca un certificato per l'autenticazione.

Si applica a

Vedi anche