C# Класс System.Net.Security.SslStream

Наследование: AuthenticatedStream
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AuthenticateAsClient ( string targetHost ) : void
AuthenticateAsClient ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation ) : void
AuthenticateAsClient ( string targetHost, System clientCertificates, bool checkCertificateRevocation ) : void
AuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
AuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation ) : void
AuthenticateAsClientAsync ( string targetHost ) : System.Threading.Tasks.Task
AuthenticateAsClientAsync ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
AuthenticateAsClientAsync ( string targetHost, System clientCertificates, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
AuthenticateAsClientAsync ( string targetHost ) : Task
AuthenticateAsClientAsync ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : Task
AuthenticateAsClientAsync ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation ) : Task
AuthenticateAsServer ( System serverCertificate ) : void
AuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation ) : void
AuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : void
AuthenticateAsServer ( X509Certificate serverCertificate ) : void
AuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
AuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : void
AuthenticateAsServerAsync ( System serverCertificate ) : System.Threading.Tasks.Task
AuthenticateAsServerAsync ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
AuthenticateAsServerAsync ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
AuthenticateAsServerAsync ( X509Certificate serverCertificate ) : Task
AuthenticateAsServerAsync ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : Task
AuthenticateAsServerAsync ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : Task
BeginAuthenticateAsClient ( string targetHost, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginAuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginAuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginAuthenticateAsClient ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
BeginAuthenticateAsClient ( string targetHost, System clientCertificates, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
BeginAuthenticateAsClient ( string targetHost, System asyncCallback, object asyncState ) : System.IAsyncResult
BeginAuthenticateAsServer ( X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginAuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginAuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginAuthenticateAsServer ( System serverCertificate, System asyncCallback, object asyncState ) : System.IAsyncResult
BeginAuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
BeginAuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginWrite ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
EndAuthenticateAsClient ( IAsyncResult asyncResult ) : void
EndAuthenticateAsServer ( IAsyncResult asyncResult ) : void
EndRead ( IAsyncResult asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
Flush ( ) : void
Read ( byte buffer, int offset, int count ) : int
ReadByte ( ) : int
Seek ( long offset, SeekOrigin origin ) : long
Seek ( long offset, System origin ) : long
SetLength ( long value ) : void
ShutdownAsync ( ) : System.Threading.Tasks.Task
ShutdownAsync ( ) : Task
SslStream ( System innerStream )
SslStream ( System innerStream, bool leaveInnerStreamOpen )
SslStream ( System innerStream, bool leaveInnerStreamOpen, System userCertificateValidationCallback )
SslStream ( System innerStream, bool leaveInnerStreamOpen, System userCertificateValidationCallback, System userCertificateSelectionCallback )
SslStream ( System innerStream, bool leaveInnerStreamOpen, System userCertificateValidationCallback, System userCertificateSelectionCallback, System encryptionPolicy )
SslStream ( Stream innerStream ) : System.IO
SslStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System.IO
SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback ) : System.IO
SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback ) : System.IO
SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy ) : System.IO
Write ( byte buffer ) : void
Write ( byte buffer, int offset, int count ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
BeginShutdown ( AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
EndShutdown ( IAsyncResult asyncResult ) : void
GetChannelBinding ( ChannelBindingKind kind ) : ChannelBinding
UserCertSelectionCallbackWrapper ( string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string acceptableIssuers ) : X509Certificate
UserCertValidationCallbackWrapper ( string hostName, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Описание методов

AuthenticateAsClient() публичный Метод

public AuthenticateAsClient ( string targetHost ) : void
targetHost string
Результат void

AuthenticateAsClient() публичный Метод

public AuthenticateAsClient ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System
enabledSslProtocols System
checkCertificateRevocation bool
Результат void

AuthenticateAsClient() публичный Метод

public AuthenticateAsClient ( string targetHost, System clientCertificates, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System
checkCertificateRevocation bool
Результат void

AuthenticateAsClient() публичный Метод

public AuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
Результат void

AuthenticateAsClient() публичный Метод

public AuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
checkCertificateRevocation bool
Результат void

AuthenticateAsClientAsync() публичный Метод

public AuthenticateAsClientAsync ( string targetHost ) : System.Threading.Tasks.Task
targetHost string
Результат System.Threading.Tasks.Task

AuthenticateAsClientAsync() публичный Метод

public AuthenticateAsClientAsync ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
targetHost string
clientCertificates System
enabledSslProtocols System
checkCertificateRevocation bool
Результат System.Threading.Tasks.Task

AuthenticateAsClientAsync() публичный Метод

public AuthenticateAsClientAsync ( string targetHost, System clientCertificates, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
targetHost string
clientCertificates System
checkCertificateRevocation bool
Результат System.Threading.Tasks.Task

AuthenticateAsClientAsync() публичный Метод

public AuthenticateAsClientAsync ( string targetHost ) : Task
targetHost string
Результат Task

AuthenticateAsClientAsync() публичный Метод

public AuthenticateAsClientAsync ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : Task
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
Результат Task

AuthenticateAsClientAsync() публичный Метод

public AuthenticateAsClientAsync ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation ) : Task
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
checkCertificateRevocation bool
Результат Task

AuthenticateAsServer() публичный Метод

public AuthenticateAsServer ( System serverCertificate ) : void
serverCertificate System
Результат void

AuthenticateAsServer() публичный Метод

public AuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation ) : void
serverCertificate System
clientCertificateRequired bool
enabledSslProtocols System
checkCertificateRevocation bool
Результат void

AuthenticateAsServer() публичный Метод

public AuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : void
serverCertificate System
clientCertificateRequired bool
checkCertificateRevocation bool
Результат void

AuthenticateAsServer() публичный Метод

public AuthenticateAsServer ( X509Certificate serverCertificate ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
Результат void

AuthenticateAsServer() публичный Метод

public AuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
Результат void

AuthenticateAsServer() публичный Метод

public AuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
checkCertificateRevocation bool
Результат void

AuthenticateAsServerAsync() публичный Метод

public AuthenticateAsServerAsync ( System serverCertificate ) : System.Threading.Tasks.Task
serverCertificate System
Результат System.Threading.Tasks.Task

AuthenticateAsServerAsync() публичный Метод

public AuthenticateAsServerAsync ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
serverCertificate System
clientCertificateRequired bool
enabledSslProtocols System
checkCertificateRevocation bool
Результат System.Threading.Tasks.Task

AuthenticateAsServerAsync() публичный Метод

public AuthenticateAsServerAsync ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
serverCertificate System
clientCertificateRequired bool
checkCertificateRevocation bool
Результат System.Threading.Tasks.Task

AuthenticateAsServerAsync() публичный Метод

public AuthenticateAsServerAsync ( X509Certificate serverCertificate ) : Task
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
Результат Task

AuthenticateAsServerAsync() публичный Метод

public AuthenticateAsServerAsync ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : Task
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
Результат Task

AuthenticateAsServerAsync() публичный Метод

public AuthenticateAsServerAsync ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : Task
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
checkCertificateRevocation bool
Результат Task

BeginAuthenticateAsClient() публичный Метод

public BeginAuthenticateAsClient ( string targetHost, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
targetHost string
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginAuthenticateAsClient() публичный Метод

public BeginAuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginAuthenticateAsClient() публичный Метод

public BeginAuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
checkCertificateRevocation bool
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginAuthenticateAsClient() публичный Метод

public BeginAuthenticateAsClient ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
targetHost string
clientCertificates System
enabledSslProtocols System
checkCertificateRevocation bool
asyncCallback System
asyncState object
Результат System.IAsyncResult

BeginAuthenticateAsClient() публичный Метод

public BeginAuthenticateAsClient ( string targetHost, System clientCertificates, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
targetHost string
clientCertificates System
checkCertificateRevocation bool
asyncCallback System
asyncState object
Результат System.IAsyncResult

BeginAuthenticateAsClient() публичный Метод

public BeginAuthenticateAsClient ( string targetHost, System asyncCallback, object asyncState ) : System.IAsyncResult
targetHost string
asyncCallback System
asyncState object
Результат System.IAsyncResult

BeginAuthenticateAsServer() публичный Метод

public BeginAuthenticateAsServer ( X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginAuthenticateAsServer() публичный Метод

public BeginAuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginAuthenticateAsServer() публичный Метод

public BeginAuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
checkCertificateRevocation bool
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginAuthenticateAsServer() публичный Метод

public BeginAuthenticateAsServer ( System serverCertificate, System asyncCallback, object asyncState ) : System.IAsyncResult
serverCertificate System
asyncCallback System
asyncState object
Результат System.IAsyncResult

BeginAuthenticateAsServer() публичный Метод

public BeginAuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
serverCertificate System
clientCertificateRequired bool
enabledSslProtocols System
checkCertificateRevocation bool
asyncCallback System
asyncState object
Результат System.IAsyncResult

BeginAuthenticateAsServer() публичный Метод

public BeginAuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
serverCertificate System
clientCertificateRequired bool
checkCertificateRevocation bool
asyncCallback System
asyncState object
Результат System.IAsyncResult

BeginRead() публичный Метод

public BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

BeginWrite() публичный Метод

public BeginWrite ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EndAuthenticateAsClient() публичный Метод

public EndAuthenticateAsClient ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
Результат void

EndAuthenticateAsServer() публичный Метод

public EndAuthenticateAsServer ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
Результат void

EndRead() публичный Метод

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
Результат int

EndWrite() публичный Метод

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
Результат void

Flush() публичный Метод

public Flush ( ) : void
Результат void

Read() публичный Метод

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Результат int

ReadByte() публичный Метод

public ReadByte ( ) : int
Результат int

Seek() публичный Метод

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Результат long

Seek() публичный Метод

public Seek ( long offset, System origin ) : long
offset long
origin System
Результат long

SetLength() публичный Метод

public SetLength ( long value ) : void
value long
Результат void

ShutdownAsync() публичный Метод

public ShutdownAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

ShutdownAsync() публичный Метод

public ShutdownAsync ( ) : Task
Результат Task

SslStream() публичный Метод

public SslStream ( System innerStream )
innerStream System

SslStream() публичный Метод

public SslStream ( System innerStream, bool leaveInnerStreamOpen )
innerStream System
leaveInnerStreamOpen bool

SslStream() публичный Метод

public SslStream ( System innerStream, bool leaveInnerStreamOpen, System userCertificateValidationCallback )
innerStream System
leaveInnerStreamOpen bool
userCertificateValidationCallback System

SslStream() публичный Метод

public SslStream ( System innerStream, bool leaveInnerStreamOpen, System userCertificateValidationCallback, System userCertificateSelectionCallback )
innerStream System
leaveInnerStreamOpen bool
userCertificateValidationCallback System
userCertificateSelectionCallback System

SslStream() публичный Метод

public SslStream ( System innerStream, bool leaveInnerStreamOpen, System userCertificateValidationCallback, System userCertificateSelectionCallback, System encryptionPolicy )
innerStream System
leaveInnerStreamOpen bool
userCertificateValidationCallback System
userCertificateSelectionCallback System
encryptionPolicy System

SslStream() публичный Метод

public SslStream ( Stream innerStream ) : System.IO
innerStream Stream
Результат System.IO

SslStream() публичный Метод

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
Результат System.IO

SslStream() публичный Метод

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
userCertificateValidationCallback RemoteCertificateValidationCallback
Результат System.IO

SslStream() публичный Метод

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
userCertificateValidationCallback RemoteCertificateValidationCallback
userCertificateSelectionCallback LocalCertificateSelectionCallback
Результат System.IO

SslStream() публичный Метод

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
userCertificateValidationCallback RemoteCertificateValidationCallback
userCertificateSelectionCallback LocalCertificateSelectionCallback
encryptionPolicy EncryptionPolicy
Результат System.IO

Write() публичный Метод

public Write ( byte buffer ) : void
buffer byte
Результат void

Write() публичный Метод

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Результат void