C# Class GSF.Security.SecureStreamClientBase

Creates a secure stream that connects to a server.
Inheritance: GSF.Diagnostics.DisposableLoggingClassBase
显示文件 Open project: GridProtectionAlliance/openHistorian

Public Methods

Method Description
Authenticate ( Stream stream, bool useSsl = true ) : Stream

Authenticates the supplied stream. Returns the secure stream.

TryAuthenticate ( Stream stream, bool useSsl = true ) : bool

Attempts to authenticate the provided stream, disposing the secure stream upon completion.

TryAuthenticate ( Stream stream, bool useSsl, Stream &secureStream ) : bool

Attempts to authenticate the supplied stream.

Protected Methods

Method Description
InternalTryAuthenticate ( Stream stream, byte certSignatures ) : bool

Private Methods

Method Description
SecureStreamClientBase ( ) : System
TryConnectSsl ( Stream stream, SslStream &ssl ) : bool
TryResumeSession ( Stream &secureStream, Stream stream2, byte certSignatures ) : bool
UserCertificateSelectionCallback ( object sender, string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string acceptableIssuers ) : X509Certificate
UserCertificateValidationCallback ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Method Details

Authenticate() public method

Authenticates the supplied stream. Returns the secure stream.
public Authenticate ( Stream stream, bool useSsl = true ) : Stream
stream Stream the stream to authenticate
useSsl bool gets if SSL will be used to authenticate
return Stream

InternalTryAuthenticate() protected abstract method

protected abstract InternalTryAuthenticate ( Stream stream, byte certSignatures ) : bool
stream Stream
certSignatures byte
return bool

TryAuthenticate() public method

Attempts to authenticate the provided stream, disposing the secure stream upon completion.
public TryAuthenticate ( Stream stream, bool useSsl = true ) : bool
stream Stream the stream to authenticate
useSsl bool gets if SSL will be used to authenticate
return bool

TryAuthenticate() public method

Attempts to authenticate the supplied stream.
public TryAuthenticate ( Stream stream, bool useSsl, Stream &secureStream ) : bool
stream Stream The stream to authenticate
useSsl bool
secureStream Stream the secure stream if the authentication was successful.
return bool