SslStream クラス
アセンブリ: System (system.dll 内)


SSL プロトコルを使用すると、SslStream を使用して送信されたメッセージの機密性と整合性をチェックできます。クライアントとサーバー間で機密情報をやり取りする場合には、SslStream によって提供されるような SSL 接続を使用する必要があります。SslStream を使用すると、ネットワーク上での送信中に、第三者が情報を読み取ったり改変したりするのを防ぐことができます。
SslStream インスタンスは、SslStream の作成時にユーザーが指定するストリームを使用してデータを送信します。この基になるストリームを指定するときには、SslStream を閉じたときに基になるストリームも閉じるかどうかを指定するオプションがあります。通常、SslStream クラスは、TcpClient クラスと TcpListener クラスで使用されます。GetStream メソッドには、SslStream クラスでの使用に適した NetworkStream が用意されています。
SslStream を作成したら、サーバーとオプションでクライアントを認証する必要があります。サーバーは、その ID を証明する X509 証明書を提供する必要があり、クライアントにもこれを提供することを要求できます。SslStream を使用して情報を送信する前に、認証を行う必要があります。クライアントは、認証が完了するまでブロックする同期 AuthenticateAsClient メソッド、または認証が完了するまでブロックせずに待機する非同期 BeginAuthenticateAsClient メソッドを使用して、認証を開始します。サーバーは、同期 AuthenticateAsServer メソッドまたは非同期 BeginAuthenticateAsServer メソッドを使用して、認証を開始します。クライアントとサーバーの両方が認証を行う必要があります。
認証は、SSPI (Security Support Provider) チャネル プロバイダによって処理されます。SslStream の作成時に RemoteCertificateValidationCallback デリゲートを指定することによって、クライアントはサーバーの証明書の検証を制御できるようになります。CertificateValidationCallback デリゲートを指定すると、サーバーも検証を制御できます。デリゲートによって参照されるメソッドには、リモート側の証明書と、証明書の検証時に SSPI が検出したエラーが含まれます。サーバーがデリゲートを指定した場合、サーバーがクライアント認証を要求したかどうかに関係なく、そのデリゲートのメソッドが呼び出されます。サーバーがクライアント認証を要求しなかった場合、サーバーのデリゲートのメソッドは、null 証明書と証明書エラーの空の配列を受け取ります。
サーバーがクライアント認証を必要とする場合、クライアントは認証に使用する 1 つ以上の証明書を指定する必要があります。クライアントに複数の証明書がある場合には、クライアントは LocalCertificateSelectionCallback デリゲートを提供して、サーバーに対する適切な証明書を選択できます。クライアントの証明書は、現在のユーザーの "My" 証明書ストアに格納する必要があります。証明書によるクライアント認証は、Ssl2 (SSL Version 2) プロトコルではサポートされていません。
認証に失敗した場合、AuthenticationException が発生し、その SslStream は使用できなくなります。ガベージ コレクタが収集できるように、このオブジェクトを閉じ、オブジェクトへのすべての参照を削除する必要があります。
SSL ハンドシェイクとも呼ばれる認証プロセスが成功すると、サーバーの ID (およびオプションでクライアントの ID) が確立され、クライアントとサーバーは SslStream を使用してメッセージを交換できます。情報を送受信する前に、クライアントとサーバーは、SslStream によって提供されるセキュリティ サービスとセキュリティ レベルをチェックし、選択されているプロトコル、アルゴリズム、および強度が、整合性と機密性の要件を満たしているかどうかを確認する必要があります。現在の設定が不十分な場合は、ストリームを閉じる必要があります。IsEncrypted プロパティと IsSigned プロパティを使用すると、SslStream によって提供されるセキュリティ サービスをチェックできます。認証、暗号化、およびデータ署名に使用する暗号化設定を報告する要素を次の表に示します。
KeyExchangeAlgorithm プロパティおよび関連付けられた ExchangeAlgorithmType 列挙体 | |
KeyExchangeStrength、HashStrength、および CipherStrength の各プロパティ |
認証が成功したら、同期 Write メソッドまたは非同期 BeginWrite メソッドを使用して、データを送信できます。データを受信するには、同期 Read メソッドまたは非同期 BeginRead メソッドを使用します。
基になるストリームを開いたままにしておくように SslStream に指定している場合は、ストリームを使い終わったときに、ユーザーがストリームを閉じる必要があります。

SslStream クラスを使用してクライアントと通信する TcpListener を作成するコード例を次に示します。
using System; using System.Collections; using System.Net; using System.Net.Sockets; using System.Net.Security; using System.Security.Authentication; using System.Text; using System.Security.Cryptography.X509Certificates; using System.IO; namespace Examples.System.Net { public sealed class SslTcpServer { static X509Certificate serverCertificate = null; // The certificate parameter specifies the name of the file // containing the machine certificate. public static void RunServer(string certificate) { serverCertificate = X509Certificate.CreateFromCertFile(certificate); // Create a TCP/IP (IPv4) socket and listen for incoming connections. TcpListener listener = new TcpListener(IPAddress.Any, 8080); listener.Start(); while (true) { Console.WriteLine("Waiting for a client to connect..."); // Application blocks while waiting for an incoming connection. // Type CNTL-C to terminate the server. TcpClient client = listener.AcceptTcpClient(); ProcessClient(client); } } static void ProcessClient (TcpClient client) { // A client has connected. Create the // SslStream using the client's network stream. SslStream sslStream = new SslStream( client.GetStream(), false); // Authenticate the server but don't require the client to authenticate. try { sslStream.AuthenticateAsServer(serverCertificate, false, SslProtocols.Tls, true); // Display the properties and settings for the authenticated stream. DisplaySecurityLevel(sslStream); DisplaySecurityServices(sslStream); DisplayCertificateInformation(sslStream); DisplayStreamProperties(sslStream); // Set timeouts for the read and write to 5 seconds. sslStream.ReadTimeout = 5000; sslStream.WriteTimeout = 5000; // Read a message from the client. Console.WriteLine("Waiting for client message..."); string messageData = ReadMessage(sslStream); Console.WriteLine("Received: {0}", messageData); // Write a message to the client. byte[] message = Encoding.UTF8.GetBytes("Hello from the server.<EOF>"); Console.WriteLine("Sending hello message."); sslStream.Write(message); } catch (AuthenticationException e) { Console.WriteLine("Exception: {0}", e.Message); if (e.InnerException != null) { Console.WriteLine("Inner exception: {0}", e.InnerException.Message); } Console.WriteLine ("Authentication failed - closing the connection."); sslStream.Close(); client.Close(); return; } finally { // The client stream will be closed with the sslStream // because we specified this behavior when creating // the sslStream. sslStream.Close(); client.Close(); } } static string ReadMessage(SslStream sslStream) { // Read the message sent by the client. // The client signals the end of the message using the // "<EOF>" marker. byte [] buffer = new byte[2048]; StringBuilder messageData = new StringBuilder(); int bytes = -1; do { // Read the client's test message. bytes = sslStream.Read(buffer, 0, buffer.Length); // Use Decoder class to convert from bytes to UTF8 // in case a character spans two buffers. Decoder decoder = Encoding.UTF8.GetDecoder(); char[] chars = new char[decoder.GetCharCount(buffer ,0,bytes)]; decoder.GetChars(buffer, 0, bytes, chars,0); messageData.Append (chars); // Check for EOF or an empty message. if (messageData.ToString().IndexOf("<EOF>") != -1) { break; } } while (bytes !=0); return messageData.ToString(); } 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); } 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); } static void DisplayStreamProperties(SslStream stream) { Console.WriteLine("Can read: {0}, write {1}", stream.CanRead, stream.CanWrite); Console.WriteLine("Can timeout: {0}", stream.CanTimeout); } static void DisplayCertificateInformation(SslStream stream) { Console.WriteLine("Certificate revocation list checked: {0}", stream.CheckCertRevocationStatus); X509Certificate localCertificate = stream.LocalCertificate; if (stream.LocalCertificate != null) { Console.WriteLine("Local cert was issued to {0} and is valid from {1} until {2}.", localCertificate.Subject, localCertificate.GetEffectiveDateString(), localCertificate.GetExpirationDateString()); } else { Console.WriteLine("Local certificate is null."); } // Display the properties of the client's certificate. X509Certificate remoteCertificate = stream.RemoteCertificate; if (stream.RemoteCertificate != null) { Console.WriteLine("Remote cert was issued to {0} and is valid from {1} until {2}.", remoteCertificate.Subject, remoteCertificate.GetEffectiveDateString(), remoteCertificate.GetExpirationDateString()); } else { Console.WriteLine("Remote certificate is null."); } } private static void DisplayUsage() { Console.WriteLine("To start the server specify:"); Console.WriteLine("serverSync certificateFile.cer"); Environment.Exit(1); } public static int Main(string[] args) { string certificate = null; if (args == null ||args.Length < 1 ) { DisplayUsage(); } certificate = args[0]; SslTcpServer.RunServer (certificate); return 0; } } }
SslStream クラスを使用してサーバーと通信する TcpClient を作成するコード例を次に示します。
using System; using System.Collections; using System.Net; using System.Net.Security; using System.Net.Sockets; using System.Security.Authentication; using System.Text; using System.Security.Cryptography.X509Certificates; using System.IO; namespace Examples.System.Net { public class SslTcpClient { private static Hashtable certificateErrors = new Hashtable(); // The following method is invoked by the RemoteCertificateValidationDelegate. public static bool ValidateServerCertificate( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { if (sslPolicyErrors == SslPolicyErrors.None) return true; Console.WriteLine("Certificate error: {0}", sslPolicyErrors); // Do not allow this client to communicate with unauthenticated servers. return false; } public static void RunClient(string machineName, string serverName) { // Create a TCP/IP client socket. // machineName is the host running the server application. TcpClient client = new TcpClient(machineName,443); Console.WriteLine("Client connected."); // Create an SSL stream that will close the client's stream. SslStream sslStream = new SslStream( client.GetStream(), false, new RemoteCertificateValidationCallback (ValidateServerCertificate), null ); // The server name must match the name on the server certificate. try { sslStream.AuthenticateAsClient(serverName); } catch (AuthenticationException e) { Console.WriteLine("Exception: {0}", e.Message); if (e.InnerException != null) { Console.WriteLine("Inner exception: {0}", e.InnerException.Message); } Console.WriteLine ("Authentication failed - closing the connection."); client.Close(); return; } // Encode a test message into a byte array. // Signal the end of the message using the "<EOF>". byte[] messsage = Encoding.UTF8.GetBytes("Hello from the client.<EOF>"); // Send hello message to the server. sslStream.Write(messsage); sslStream.Flush(); // Read message from the server. string serverMessage = ReadMessage(sslStream); Console.WriteLine("Server says: {0}", serverMessage); // Close the client connection. client.Close(); Console.WriteLine("Client closed."); } static string ReadMessage(SslStream sslStream) { // Read the message sent by the server. // The end of the message is signaled using the // "<EOF>" marker. byte [] buffer = new byte[2048]; StringBuilder messageData = new StringBuilder(); int bytes = -1; do { bytes = sslStream.Read(buffer, 0, buffer.Length); // Use Decoder class to convert from bytes to UTF8 // in case a character spans two buffers. Decoder decoder = Encoding.UTF8.GetDecoder(); char[] chars = new char[decoder.GetCharCount(buffer ,0,bytes)]; decoder.GetChars(buffer, 0, bytes, chars,0); messageData.Append (chars); // Check for EOF. if (messageData.ToString().IndexOf("<EOF>") != -1) { break; } } while (bytes != 0); return messageData.ToString(); } private static void DisplayUsage() { Console.WriteLine("To start the client specify:"); Console.WriteLine("clientSync machineName [serverName]"); Environment.Exit(1); } public static int Main(string[] args) { string serverCertificateName = null; string machineName = null; if (args == null ||args.Length <1 ) { DisplayUsage(); } // User can specify the machine name and server name. // Server name must match the name on the server's certificate. machineName = args[0]; if (args.Length <2 ) { serverCertificateName = machineName; } else { serverCertificateName = args[1]; } SslTcpClient.RunClient (machineName, serverCertificateName); return 0; } } }

System.MarshalByRefObject
System.IO.Stream
System.Net.Security.AuthenticatedStream
System.Net.Security.SslStream


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SslStream コンストラクタ (Stream, Boolean)
アセンブリ: System (system.dll 内)

Dim innerStream As Stream Dim leaveInnerStreamOpen As Boolean Dim instance As New SslStream(innerStream, leaveInnerStreamOpen)


leaveStreamOpen パラメータに true を指定すると、SslStream を閉じても innerStream ストリームには影響しません。innerStream が不要になった場合は、明示的に閉じる必要があります。

static void ProcessClient (TcpClient client) { // A client has connected. Create the // SslStream using the client's network stream. SslStream sslStream = new SslStream( client.GetStream(), false); // Authenticate the server but don't require the client to authenticate. try { sslStream.AuthenticateAsServer(serverCertificate, false, SslProtocols.Tls, true); // Display the properties and settings for the authenticated stream. DisplaySecurityLevel(sslStream); DisplaySecurityServices(sslStream); DisplayCertificateInformation(sslStream); DisplayStreamProperties(sslStream); // Set timeouts for the read and write to 5 seconds. sslStream.ReadTimeout = 5000; sslStream.WriteTimeout = 5000; // Read a message from the client. Console.WriteLine("Waiting for client message..."); string messageData = ReadMessage(sslStream); Console.WriteLine("Received: {0}", messageData); // Write a message to the client. byte[] message = Encoding.UTF8.GetBytes("Hello from the server.<EOF>"); Console.WriteLine("Sending hello message."); sslStream.Write(message); } catch (AuthenticationException e) { Console.WriteLine("Exception: {0}", e.Message); if (e.InnerException != null) { Console.WriteLine("Inner exception: {0}", e.InnerException.Message); } Console.WriteLine ("Authentication failed - closing the connection."); sslStream.Close(); client.Close(); return; } finally { // The client stream will be closed with the sslStream // because we specified this behavior when creating // the sslStream. sslStream.Close(); client.Close(); } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SslStream コンストラクタ (Stream)
アセンブリ: System (system.dll 内)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SslStream コンストラクタ (Stream, Boolean, RemoteCertificateValidationCallback)
アセンブリ: System (system.dll 内)

Public Sub New ( _ innerStream As Stream, _ leaveInnerStreamOpen As Boolean, _ userCertificateValidationCallback As RemoteCertificateValidationCallback _ )
Dim innerStream As Stream Dim leaveInnerStreamOpen As Boolean Dim userCertificateValidationCallback As RemoteCertificateValidationCallback Dim instance As New SslStream(innerStream, leaveInnerStreamOpen, userCertificateValidationCallback)
public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback )
public: SslStream ( Stream^ innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback^ userCertificateValidationCallback )
public SslStream ( Stream innerStream, boolean leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback )
public function SslStream ( innerStream : Stream, leaveInnerStreamOpen : boolean, userCertificateValidationCallback : RemoteCertificateValidationCallback )


leaveStreamOpen パラメータに true を指定すると、SslStream を閉じても innerStream ストリームには影響しません。innerStream が不要になった場合は、明示的に閉じる必要があります。
userCertificateValidationCallback デリゲートの引数 certificateErrors には、チャネル SSPI (Security Support Provider Interface) によって返されるすべての Windows エラー コードが含まれます。userCertificateValidationCallback デリゲートによって呼び出されるメソッドの戻り値によって、認証が成功したかどうかを判断します。
userCertificateValidationCallback デリゲートのメソッドが呼び出されたときには、セキュリティ プロトコルと暗号化アルゴリズムは既に選択されています。このメソッドを使用すると、選択されている暗号化アルゴリズムと強度がアプリケーションにとって十分であるかどうかを確認できます。不十分な場合には、このメソッドは false を返し、SslStream が作成されないようにします。
![]() |
---|
.NET Framework は、作成された SSL セッションをキャッシュし、可能な場合にはキャッシュされているセッションを新しい要求に再利用しようとします。SSL セッションの再利用を試みる場合、.NET Framework は、ClientCertificates が存在すればその最初の要素を使用し、ClientCertificates が空であれば匿名セッションの再利用を試みます。 |
Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition プラットフォームメモ : .NET Framework は、クライアント証明書が必要でない場合にだけ SSL セッションの再利用を試みます。

SslStream を作成し、認証のクライアント部分を開始するコード例を次に示します。
// Create a TCP/IP client socket. // machineName is the host running the server application. TcpClient client = new TcpClient(machineName,443); Console.WriteLine("Client connected."); // Create an SSL stream that will close the client's stream. SslStream sslStream = new SslStream( client.GetStream(), false, new RemoteCertificateValidationCallback (ValidateServerCertificate), null ); // The server name must match the name on the server certificate. try { sslStream.AuthenticateAsClient(serverName); } catch (AuthenticationException e) { Console.WriteLine("Exception: {0}", e.Message); if (e.InnerException != null) { Console.WriteLine("Inner exception: {0}", e.InnerException.Message); } Console.WriteLine ("Authentication failed - closing the connection."); client.Close(); return; }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SslStream コンストラクタ (Stream, Boolean, RemoteCertificateValidationCallback, LocalCertificateSelectionCallback)
アセンブリ: System (system.dll 内)

Public Sub New ( _ innerStream As Stream, _ leaveInnerStreamOpen As Boolean, _ userCertificateValidationCallback As RemoteCertificateValidationCallback, _ userCertificateSelectionCallback As LocalCertificateSelectionCallback _ )
Dim innerStream As Stream Dim leaveInnerStreamOpen As Boolean Dim userCertificateValidationCallback As RemoteCertificateValidationCallback Dim userCertificateSelectionCallback As LocalCertificateSelectionCallback Dim instance As New SslStream(innerStream, leaveInnerStreamOpen, userCertificateValidationCallback, userCertificateSelectionCallback)
public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback )
public: SslStream ( Stream^ innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback^ userCertificateValidationCallback, LocalCertificateSelectionCallback^ userCertificateSelectionCallback )
public SslStream ( Stream innerStream, boolean leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback )
public function SslStream ( innerStream : Stream, leaveInnerStreamOpen : boolean, userCertificateValidationCallback : RemoteCertificateValidationCallback, userCertificateSelectionCallback : LocalCertificateSelectionCallback )


leaveStreamOpen パラメータに true を指定すると、SslStream を閉じても innerStream ストリームには影響しません。innerStream が不要になった場合は、明示的に閉じる必要があります。
userCertificateValidationCallback デリゲートの引数 certificateErrors には、チャネル SSPI (Security Support Provider Interface) によって返されるすべての Windows エラー コードが含まれます。userCertificateValidationCallback デリゲートによって呼び出されるメソッドの戻り値によって、認証が成功したかどうかを判断します。
userCertificateValidationCallback デリゲートのメソッドが呼び出されたときには、セキュリティ プロトコルと暗号化アルゴリズムは既に選択されています。このメソッドを使用すると、選択されている暗号化アルゴリズムと強度がアプリケーションにとって十分であるかどうかを確認できます。不十分な場合には、このメソッドは false を返し、SslStream が作成されないようにします。
userCertificateSelectionCallback デリゲートは、アプリケーションに複数の証明書があり、証明書を動的に選択する必要がある場合に役立ちます。"MY" ストアの証明書は、デリゲートによって呼び出されるメソッドに渡されます。
![]() |
---|
.NET Framework は、作成された SSL セッションをキャッシュし、可能な場合にはキャッシュされているセッションを新しい要求に再利用しようとします。SSL セッションの再利用を試みるときに、.NET Framework は P:System.Net.HttpWebRequest.ClientCertificates が存在する場合はその最初の要素を使用し、P:System.Net.HttpWebRequest.ClientCertificates が空の場合は、匿名セッションの再利用を試みます。 |
Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition プラットフォームメモ : .NET Framework は、クライアント証明書が必要でない場合にだけ SSL セッションの再利用を試みます。

このコンストラクタを実際に呼び出すコード例を次に示します。このコード例は、SslStream クラスのトピックで取り上げているコード例の一部分です。
// Server name must match the host name and the name on the host's certificate. serverName = args[0]; // Create a TCP/IP client socket. TcpClient client = new TcpClient(serverName,80); Console.WriteLine("Client connected."); // Create an SSL stream that will close the client's stream. SslStream sslStream = new SslStream( client.GetStream(), false, new RemoteCertificateValidationCallback (ValidateServerCertificate), new LocalCertificateSelectionCallback(SelectLocalCertificate) );

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SslStream コンストラクタ
ユーザーが指定するストリームを SslStream が閉じないようにするには、SslStream コンストラクタを使用します。

名前 | 説明 |
---|---|
SslStream (Stream) | Stream を指定して、SslStream クラスの新しいインスタンスを初期化します。 |
SslStream (Stream, Boolean) | 指定した Stream とストリームを閉じる動作を使用して、SslStream クラスの新しいインスタンスを初期化します。 |
SslStream (Stream, Boolean, RemoteCertificateValidationCallback) | 指定した Stream、ストリームを閉じる動作、および証明書検証デリゲートを使用して、SslStream クラスの新しいインスタンスを初期化します。 |
SslStream (Stream, Boolean, RemoteCertificateValidationCallback, LocalCertificateSelectionCallback) | 指定した Stream、ストリームを閉じる動作、証明書検証デリゲート、および証明書選択デリゲートを使用して、SslStream クラスの新しいインスタンスを初期化します。 |

SslStream プロパティ



SslStream メソッド


名前 | 説明 | |
---|---|---|
![]() | CreateWaitHandle | WaitHandle オブジェクトを割り当てます。 ( Stream から継承されます。) |
![]() | Dispose | オーバーロードされます。 オーバーライドされます。 |
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |

SslStream メンバ
クライアントとサーバー間の通信に使用するストリームを提供します。このクライアントとサーバー間の通信では、SSL (Secure Socket Layer) セキュリティ プロトコルを使用して、サーバーとオプションでクライアントを認証します。
SslStream データ型で公開されるメンバを以下の表に示します。





名前 | 説明 | |
---|---|---|
![]() | CreateWaitHandle | WaitHandle オブジェクトを割り当てます。 (Stream から継承されます。) |
![]() | Dispose | オーバーロードされます。 オーバーライドされます。 |
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |

- SslStreamのページへのリンク