25 lines
944 B
C#
25 lines
944 B
C#
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using System.IO.Pipelines;
|
|
using System.Net.Security;
|
|
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
|
|
|
|
namespace Microsoft.AspNetCore.Server.Kestrel.Https.Internal
|
|
{
|
|
internal class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream>
|
|
{
|
|
public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions)
|
|
: this(transport, readerOptions, writerOptions, s => new SslStream(s))
|
|
{
|
|
}
|
|
|
|
public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
|
|
base(transport, readerOptions, writerOptions, factory)
|
|
{
|
|
}
|
|
}
|
|
}
|