Partager via


SslStream.IsMutuallyAuthenticated Propriété

Définition

Obtient une valeur Boolean qui indique si le serveur et le client ont tous les deux été authentifiés.

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

Valeur de propriété

true si le serveur et le client ont été authentifiés ; sinon false, .

Exemples

L’exemple de code suivant illustre l’affichage de la valeur de cette propriété.

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

Remarques

L’authentification mutuelle est spécifiée par le serveur lorsque le serveur souhaite que le client fournisse un certificat pour l’authentification.

S’applique à

Voir aussi