C# Class System.Net.Security.SslStream

Inheritance: AuthenticatedStream
Datei anzeigen Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
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

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
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

Method Details

AuthenticateAsClient() public method

public AuthenticateAsClient ( string targetHost ) : void
targetHost string
return void

AuthenticateAsClient() public method

public AuthenticateAsClient ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System
enabledSslProtocols System
checkCertificateRevocation bool
return void

AuthenticateAsClient() public method

public AuthenticateAsClient ( string targetHost, System clientCertificates, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System
checkCertificateRevocation bool
return void

AuthenticateAsClient() public method

public AuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
return void

AuthenticateAsClient() public method

public AuthenticateAsClient ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation ) : void
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
checkCertificateRevocation bool
return void

AuthenticateAsClientAsync() public method

public AuthenticateAsClientAsync ( string targetHost ) : System.Threading.Tasks.Task
targetHost string
return System.Threading.Tasks.Task

AuthenticateAsClientAsync() public method

public AuthenticateAsClientAsync ( string targetHost, System clientCertificates, System enabledSslProtocols, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
targetHost string
clientCertificates System
enabledSslProtocols System
checkCertificateRevocation bool
return System.Threading.Tasks.Task

AuthenticateAsClientAsync() public method

public AuthenticateAsClientAsync ( string targetHost, System clientCertificates, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
targetHost string
clientCertificates System
checkCertificateRevocation bool
return System.Threading.Tasks.Task

AuthenticateAsClientAsync() public method

public AuthenticateAsClientAsync ( string targetHost ) : Task
targetHost string
return Task

AuthenticateAsClientAsync() public method

public AuthenticateAsClientAsync ( string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : Task
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
return Task

AuthenticateAsClientAsync() public method

public AuthenticateAsClientAsync ( string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation ) : Task
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
checkCertificateRevocation bool
return Task

AuthenticateAsServer() public method

public AuthenticateAsServer ( System serverCertificate ) : void
serverCertificate System
return void

AuthenticateAsServer() public method

public AuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation ) : void
serverCertificate System
clientCertificateRequired bool
enabledSslProtocols System
checkCertificateRevocation bool
return void

AuthenticateAsServer() public method

public AuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : void
serverCertificate System
clientCertificateRequired bool
checkCertificateRevocation bool
return void

AuthenticateAsServer() public method

public AuthenticateAsServer ( X509Certificate serverCertificate ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
return void

AuthenticateAsServer() public method

public AuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
return void

AuthenticateAsServer() public method

public AuthenticateAsServer ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
checkCertificateRevocation bool
return void

AuthenticateAsServerAsync() public method

public AuthenticateAsServerAsync ( System serverCertificate ) : System.Threading.Tasks.Task
serverCertificate System
return System.Threading.Tasks.Task

AuthenticateAsServerAsync() public method

public AuthenticateAsServerAsync ( System serverCertificate, bool clientCertificateRequired, System enabledSslProtocols, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
serverCertificate System
clientCertificateRequired bool
enabledSslProtocols System
checkCertificateRevocation bool
return System.Threading.Tasks.Task

AuthenticateAsServerAsync() public method

public AuthenticateAsServerAsync ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : System.Threading.Tasks.Task
serverCertificate System
clientCertificateRequired bool
checkCertificateRevocation bool
return System.Threading.Tasks.Task

AuthenticateAsServerAsync() public method

public AuthenticateAsServerAsync ( X509Certificate serverCertificate ) : Task
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
return Task

AuthenticateAsServerAsync() public method

public AuthenticateAsServerAsync ( X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : Task
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
return Task

AuthenticateAsServerAsync() public method

public AuthenticateAsServerAsync ( X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation ) : Task
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
clientCertificateRequired bool
checkCertificateRevocation bool
return Task

BeginAuthenticateAsClient() public method

public BeginAuthenticateAsClient ( string targetHost, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
targetHost string
asyncCallback AsyncCallback
asyncState object
return IAsyncResult

BeginAuthenticateAsClient() public method

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
return IAsyncResult

BeginAuthenticateAsClient() public method

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
return IAsyncResult

BeginAuthenticateAsClient() public method

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
return System.IAsyncResult

BeginAuthenticateAsClient() public method

public BeginAuthenticateAsClient ( string targetHost, System clientCertificates, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
targetHost string
clientCertificates System
checkCertificateRevocation bool
asyncCallback System
asyncState object
return System.IAsyncResult

BeginAuthenticateAsClient() public method

public BeginAuthenticateAsClient ( string targetHost, System asyncCallback, object asyncState ) : System.IAsyncResult
targetHost string
asyncCallback System
asyncState object
return System.IAsyncResult

BeginAuthenticateAsServer() public method

public BeginAuthenticateAsServer ( X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
asyncCallback AsyncCallback
asyncState object
return IAsyncResult

BeginAuthenticateAsServer() public method

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
return IAsyncResult

BeginAuthenticateAsServer() public method

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
return IAsyncResult

BeginAuthenticateAsServer() public method

public BeginAuthenticateAsServer ( System serverCertificate, System asyncCallback, object asyncState ) : System.IAsyncResult
serverCertificate System
asyncCallback System
asyncState object
return System.IAsyncResult

BeginAuthenticateAsServer() public method

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
return System.IAsyncResult

BeginAuthenticateAsServer() public method

public BeginAuthenticateAsServer ( System serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, System asyncCallback, object asyncState ) : System.IAsyncResult
serverCertificate System
clientCertificateRequired bool
checkCertificateRevocation bool
asyncCallback System
asyncState object
return System.IAsyncResult

BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
return IAsyncResult

BeginWrite() public method

public BeginWrite ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
return IAsyncResult

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndAuthenticateAsClient() public method

public EndAuthenticateAsClient ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

EndAuthenticateAsServer() public method

public EndAuthenticateAsServer ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

EndRead() public method

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

EndWrite() public method

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

Flush() public method

public Flush ( ) : void
return void

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

ReadByte() public method

public ReadByte ( ) : int
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

Seek() public method

public Seek ( long offset, System origin ) : long
offset long
origin System
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

ShutdownAsync() public method

public ShutdownAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

ShutdownAsync() public method

public ShutdownAsync ( ) : Task
return Task

SslStream() public method

public SslStream ( System innerStream )
innerStream System

SslStream() public method

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

SslStream() public method

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

SslStream() public method

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

SslStream() public method

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

SslStream() public method

public SslStream ( Stream innerStream ) : System.IO
innerStream Stream
return System.IO

SslStream() public method

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
return System.IO

SslStream() public method

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
userCertificateValidationCallback RemoteCertificateValidationCallback
return System.IO

SslStream() public method

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
userCertificateValidationCallback RemoteCertificateValidationCallback
userCertificateSelectionCallback LocalCertificateSelectionCallback
return System.IO

SslStream() public method

public SslStream ( Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy ) : System.IO
innerStream Stream
leaveInnerStreamOpen bool
userCertificateValidationCallback RemoteCertificateValidationCallback
userCertificateSelectionCallback LocalCertificateSelectionCallback
encryptionPolicy EncryptionPolicy
return System.IO

Write() public method

public Write ( byte buffer ) : void
buffer byte
return void

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void