Interface ISslStreamWrapperFactory
Interface to wrap an unencrypted stream in an SslStream.
Namespace: FubarDev.FtpServer.Authentication
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public interface ISslStreamWrapperFactory
  Methods
| Improve this Doc View SourceCloseStreamAsync(Stream, CancellationToken)
Close the SslStream gracefully (if possible).
Declaration
Task CloseStreamAsync(Stream sslStream, CancellationToken cancellationToken)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | sslStream | The SslStream to close.  | 
      
| CancellationToken | cancellationToken | The cancellation token.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | The task.  | 
      
WrapStreamAsync(Stream, Boolean, X509Certificate, CancellationToken)
Wraps the unencrypted stream in an SslStream.
Declaration
Task<Stream> WrapStreamAsync(Stream unencryptedStream, bool keepOpen, X509Certificate certificate, CancellationToken cancellationToken)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | unencryptedStream | The unencrypted stream.  | 
      
| Boolean | keepOpen | Keep the   | 
      
| X509Certificate | certificate | The certificate to be used to authenticate as server.  | 
      
| CancellationToken | cancellationToken | The cancellation token.  | 
      
Returns
| Type | Description | 
|---|---|
| Task<Stream> | The SslStream that wraps the   |