177 [CLSCompliant(
false)]
261 return base.InnerStream.CanRead;
267 public override bool CanTimeout => base.InnerStream.CanTimeout;
285 return base.InnerStream.ReadTimeout;
289 base.InnerStream.ReadTimeout =
value;
297 return base.InnerStream.WriteTimeout;
301 base.InnerStream.WriteTimeout =
value;
305 public override long Length => base.InnerStream.Length;
311 return base.InnerStream.Position;
324 : this(innerStream, leaveInnerStreamOpen: false, null, null)
333 public SslStream(
Stream innerStream,
bool leaveInnerStreamOpen, RemoteCertificateValidationCallback? userCertificateValidationCallback)
338 public SslStream(
Stream innerStream,
bool leaveInnerStreamOpen, RemoteCertificateValidationCallback? userCertificateValidationCallback, LocalCertificateSelectionCallback? userCertificateSelectionCallback)
343 public SslStream(
Stream innerStream,
bool leaveInnerStreamOpen, RemoteCertificateValidationCallback? userCertificateValidationCallback, LocalCertificateSelectionCallback? userCertificateSelectionCallback,
EncryptionPolicy encryptionPolicy)
344 : base(innerStream, leaveInnerStreamOpen)
411 return sslAuthenticationOptions;
428 TargetHost = targetHost,
429 ClientCertificates = clientCertificates,
430 EnabledSslProtocols = enabledSslProtocols,
431 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
461 ServerCertificate = serverCertificate,
462 ClientCertificateRequired = clientCertificateRequired,
463 EnabledSslProtocols = enabledSslProtocols,
464 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
499 TargetHost = targetHost,
500 ClientCertificates = clientCertificates,
501 EnabledSslProtocols = enabledSslProtocols,
502 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
510 if (sslClientAuthenticationOptions ==
null)
534 ServerCertificate = serverCertificate,
535 ClientCertificateRequired = clientCertificateRequired,
536 EnabledSslProtocols = enabledSslProtocols,
537 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
545 if (sslServerAuthenticationOptions ==
null)
568 TargetHost = targetHost,
569 ClientCertificates = clientCertificates,
570 EnabledSslProtocols = enabledSslProtocols,
571 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
579 if (sslClientAuthenticationOptions ==
null)
606 ServerCertificate = serverCertificate,
607 ClientCertificateRequired = clientCertificateRequired,
608 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
618 ServerCertificate = serverCertificate,
619 ClientCertificateRequired = clientCertificateRequired,
620 EnabledSslProtocols = enabledSslProtocols,
621 CertificateRevocationCheckMode = (checkCertificateRevocation ? X509RevocationMode.Online :
X509RevocationMode.NoCheck),
629 if (sslServerAuthenticationOptions ==
null)
656 return base.InnerStream.WriteAsync(protocolToken.
Payload).AsTask();
662 if (connectionInfo ==
null)
697 base.InnerStream.SetLength(
value);
707 base.InnerStream.Flush();
725 protected override void Dispose(
bool disposing)
733 base.Dispose(disposing);
745 await base.DisposeAsync().ConfigureAwait(continueOnCapturedContext:
false);
770 byte[]
array =
new byte[1];
895 ThrowAlreadyShutdown();
897 static void ThrowAlreadyShutdown()
919 if (sslClientAuthenticationOptions.
TargetHost ==
null)
974 if (internalBuffer !=
null)
1042 await ForceAuthenticationAsync(adapter, receiveFirst:
false,
buffer).ConfigureAwait(continueOnCapturedContext:
false);
1072 _sslAuthenticationOptions.RemoteCertRequired =
true;
1076 if (output !=
null && output.Length != 0)
1078 await adapter.WriteAsync(output, 0, output.Length).ConfigureAwait(continueOnCapturedContext:
false);
1079 await adapter.FlushAsync().ConfigureAwait(continueOnCapturedContext:
false);
1093 message = await ReceiveBlobAsync(adapter).ConfigureAwait(continueOnCapturedContext:
false);
1094 if (message.
Size > 0)
1096 await adapter.WriteAsync(message.
Payload, 0, message.
Size).ConfigureAwait(continueOnCapturedContext:
false);
1097 await adapter.FlushAsync().ConfigureAwait(continueOnCapturedContext:
false);
1119 bool handshakeCompleted =
false;
1129 if (message.
Size > 0)
1131 await adapter.WriteAsync(message.
Payload, 0, message.
Size).ConfigureAwait(continueOnCapturedContext:
false);
1132 await adapter.FlushAsync().ConfigureAwait(continueOnCapturedContext:
false);
1144 handshakeCompleted =
true;
1147 if (!handshakeCompleted)
1151 while (!handshakeCompleted)
1153 ProtocolToken message = await ReceiveBlobAsync(adapter).ConfigureAwait(continueOnCapturedContext:
false);
1154 byte[] payload =
null;
1156 if (message.
Size > 0)
1164 num = payload.Length;
1166 if (payload !=
null && num > 0)
1168 await adapter.WriteAsync(payload, 0, num).ConfigureAwait(continueOnCapturedContext:
false);
1169 await adapter.FlushAsync().ConfigureAwait(continueOnCapturedContext:
false);
1189 handshakeCompleted =
true;
1203 if (reAuthenticationData ==
null)
1217 if (await FillHandshakeBufferAsync(adapter, 5).ConfigureAwait(continueOnCapturedContext:
false) == 0)
1242 int frameSize = _lastFrame.Header.Length + 5;
1245 await FillHandshakeBufferAsync(adapter, frameSize).ConfigureAwait(continueOnCapturedContext:
false);
1270 _sslAuthenticationOptions.TargetHost =
_lastFrame.TargetName;
1296 int num = frameSize;
1308 frameSize = header.Length + 5;
1323 if (message ==
null || message.
Size == 0)
1327 base.InnerStream.Write(message.
Payload, 0, message.
Size);
1356 if (!
CompleteHandshake(ref alertToken, out var sslPolicyErrors, out var chainStatus))
1362 else if (sslPolicyErrors ==
SslPolicyErrors.RemoteCertificateChainErrors && chainStatus != 0)
1378 await WriteSingleChunk(writeAdapter,
buffer.Slice(0, chunkBytes)).ConfigureAwait(continueOnCapturedContext:
false);
1381 while (
buffer.Length != 0);
1387 byte[] outBuffer =
array;
1398 if (handshakeWaiter !=
null)
1401 if (!
task.IsCompletedSuccessfully)
1412 ValueTask valueTask = writeAdapter.WriteAsync(outBuffer, 0, outSize);
1418 return CompleteWriteAsync(valueTask,
array);
1419 static async
ValueTask CompleteWriteAsync(
ValueTask writeTask,
byte[] bufferToReturn)
1423 await writeTask.
ConfigureAwait(continueOnCapturedContext:
false);
1432 byte[] bufferToReturn2 = rentedBuffer;
1433 byte[] outBuffer2 = rentedBuffer;
1441 byte[] array2 = bufferToReturn2;
1442 bufferToReturn2 =
null;
1444 await WriteSingleChunk(writeAdapter,
buffer).ConfigureAwait(continueOnCapturedContext:
false);
1452 await writeAdapter.WriteAsync(outBuffer2, 0, outSize2).ConfigureAwait(continueOnCapturedContext:
false);
1457 if (bufferToReturn2 !=
null)
1490 frameSize =
int.MaxValue;
1534 if (outputCount > 0)
1554 int processedLength = 0;
1563 return processedLength;
1573 await adapter.ReadAsync(
Memory<byte>.
Empty).ConfigureAwait(continueOnCapturedContext:
false);
1577 frameSize = await EnsureFullTlsFrameAsync(adapter).ConfigureAwait(continueOnCapturedContext:
false);
1586 byte[]
array =
null;
1603 await ReplyOnReAuthenticationAsync(adapter,
array).ConfigureAwait(continueOnCapturedContext:
false);
1616 processedLength += num;
1617 if (num ==
buffer.Length)
1623 if (processedLength != 0)
1636 return processedLength;
1666 return InternalFillHandshakeBufferAsync(adapter, task2, minSize);
1668 int result = task2.
Result;
1706 await ((
buffer.Length <
MaxDataSize) ? WriteSingleChunk(writeAdapter,
buffer) : WriteAsyncChunked(writeAdapter,
buffer)).ConfigureAwait(continueOnCapturedContext:
false);
1766 if (
bytes.Length < 3)
1771 if (num < 768 || num >= 1280)
1777 if (
bytes.Length < 3)
1787 if (
bytes.Length >= 5)
1800 if (num != 2 && (num < 512 || num >= 1280))
1828 if ((
buffer[0] & 0x80u) != 0)
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
static ArrayPool< T > Shared
static void SuppressFinalize(object obj)
static void ValidateBufferArguments(byte[] buffer, int offset, int count)
static byte Min(byte val1, byte val2)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static readonly NetSecurityTelemetry Log
ProtocolToken CreateShutdownToken()
ChannelBinding GetChannelBinding(ChannelBindingKind kind)
bool IsRemoteCertificateAvailable
X509Certificate LocalClientCertificate
SecurityStatusPal Decrypt(Span< byte > buffer, out int outputOffset, out int outputCount)
void ProcessHandshakeSuccess()
SecurityStatusPal Encrypt(ReadOnlyMemory< byte > buffer, ref byte[] output, out int resultSize)
SecurityStatusPal Renegotiate(out byte[] output)
SslConnectionInfo ConnectionInfo
SslApplicationProtocol NegotiatedApplicationProtocol
bool VerifyRemoteCertificate(RemoteCertificateValidationCallback remoteCertValidationCallback, SslCertificateTrust trust, ref ProtocolToken alertToken, out SslPolicyErrors sslPolicyErrors, out X509ChainStatusFlags chainStatus)
ProtocolToken NextMessage(ReadOnlySpan< byte > incomingBuffer)
X509Certificate RemoteCertificate
X509Certificate LocalServerCertificate
ServerOptionsSelectionCallback ServerOptionDelegate
RemoteCertificateValidationCallback CertValidationDelegate
SslStreamCertificateContext CertificateContext
void UpdateOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
ServerCertSelectionCallback ServerCertSelectionDelegate
RemoteCertificateValidationCallback? RemoteCertificateValidationCallback
LocalCertificateSelectionCallback? LocalCertificateSelectionCallback
TlsCipherSuite TlsCipherSuite
SslStreamCertificateContext? ServerCertificateContext
X509Certificate? ServerCertificate
RemoteCertificateValidationCallback? RemoteCertificateValidationCallback
ServerCertificateSelectionCallback? ServerCertificateSelectionCallback
readonly SslCertificateTrust Trust
static Exception GetException(SecurityStatusPal status)
override int EndRead(IAsyncResult asyncResult)
async ValueTask< int > ReadAsyncInternal< TIOAdapter >(TIOAdapter adapter, Memory< byte > buffer)
int _connectionOpenedStatus
async Task ForceAuthenticationAsync< TIOAdapter >(TIOAdapter adapter, bool receiveFirst, byte[] reAuthenticationData, bool isApm=false)
SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback? userCertificateValidationCallback, LocalCertificateSelectionCallback? userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy)
ValueTask< int > FillHandshakeBufferAsync< TIOAdapter >(TIOAdapter adapter, int minSize)
virtual int CipherStrength
SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback? userCertificateValidationCallback)
SslApplicationProtocol NegotiatedApplicationProtocol
override ValueTask WriteAsync(ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
SslAuthenticationOptions CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
override ValueTask< int > ReadAsync(Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, object asyncState)
virtual bool CheckCertRevocationStatus
override void Dispose(bool disposing)
SecurityStatusPal DecryptData(int frameSize)
EncryptionPolicy _encryptionPolicy
ValueTask WriteSingleChunk< TIOAdapter >(TIOAdapter writeAdapter, ReadOnlyMemory< byte > buffer)
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
override Task FlushAsync(CancellationToken cancellationToken)
virtual ExchangeAlgorithmType KeyExchangeAlgorithm
virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, X509CertificateCollection? clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback? asyncCallback, object? asyncState)
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
virtual void AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
X509Certificate UserCertSelectionCallbackWrapper(string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers)
virtual Task AuthenticateAsClientAsync(string targetHost, X509CertificateCollection? clientCertificates, bool checkCertificateRevocation)
virtual Task NegotiateClientCertificateAsync(CancellationToken cancellationToken=default(CancellationToken))
override bool IsMutuallyAuthenticated
TlsFrameHelper.TlsFrameInfo _lastFrame
int GetFrameSize(ReadOnlySpan< byte > buffer)
static readonly ExceptionDispatchInfo s_disposedSentinel
virtual void AuthenticateAsServer(X509Certificate serverCertificate)
void SetAndVerifySelectionCallback(LocalCertificateSelectionCallback callback)
Task AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken=default(CancellationToken))
static void ThrowNotAuthenticated()
virtual ? X509Certificate LocalCertificate
virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
async Task ReplyOnReAuthenticationAsync< TIOAdapter >(TIOAdapter adapter, byte[] buffer)
void CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
ChannelBinding GetChannelBinding(ChannelBindingKind kind)
ExceptionDispatchInfo _exception
override int WriteTimeout
SslStream(Stream innerStream, bool leaveInnerStreamOpen)
virtual void AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation)
void AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions)
LocalCertSelectionCallback _certSelectionDelegate
virtual CipherAlgorithmType CipherAlgorithm
Task AuthenticateAsClientApm(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken=default(CancellationToken))
virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, AsyncCallback? asyncCallback, object? asyncState)
void ValidateCreateContext(SslClientAuthenticationOptions sslClientAuthenticationOptions, RemoteCertificateValidationCallback remoteCallback, LocalCertSelectionCallback localCallback)
virtual Task AuthenticateAsClientAsync(string targetHost)
void ThrowIfExceptionalOrNotAuthenticatedOrShutdown()
SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback? userCertificateValidationCallback, LocalCertificateSelectionCallback? userCertificateSelectionCallback)
void ConsumeBufferedBytes(int byteCount)
IAsyncResult BeginAuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, object asyncState)
Task AuthenticateAsServerAsync(ServerOptionsSelectionCallback optionsCallback, object? state, CancellationToken cancellationToken=default(CancellationToken))
SecurityStatusPal EncryptData(ReadOnlyMemory< byte > buffer, ref byte[] outBuffer, out int outSize)
ProtocolToken ProcessBlob(int frameSize)
virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, AsyncCallback? asyncCallback, object? asyncState)
override async ValueTask DisposeAsync()
volatile TaskCompletionSource< bool > _handshakeWaiter
Framing DetectFraming(ReadOnlySpan< byte > bytes)
void SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
async Task RenegotiateAsync< TIOAdapter >(TIOAdapter adapter)
virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, AsyncCallback? asyncCallback, object? asyncState)
override void EndWrite(IAsyncResult asyncResult)
virtual TlsCipherSuite NegotiatedCipherSuite
void ThrowIfExceptionalOrNotHandshake()
override long Seek(long offset, SeekOrigin origin)
async ValueTask< ProtocolToken > ReceiveBlobAsync< TIOAdapter >(TIOAdapter adapter)
async Task ProcessAuthenticationWithTelemetryAsync(bool isAsync, bool isApm, CancellationToken cancellationToken)
void ValidateCreateContext(SslAuthenticationOptions sslAuthenticationOptions)
ServerCertificateSelectionCallback _userServerCertificateSelectionCallback
SslProtocols GetSslProtocolInternal()
RemoteCertificateValidationCallback _userCertificateValidationCallback
void ReturnReadBufferIfEmpty()
virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, X509CertificateCollection? clientCertificates, bool checkCertificateRevocation, AsyncCallback? asyncCallback, object? asyncState)
virtual void EndAuthenticateAsServer(IAsyncResult asyncResult)
SslStream(Stream innerStream)
void SetException(Exception e)
async ValueTask WriteAsyncChunked< TIOAdapter >(TIOAdapter writeAdapter, ReadOnlyMemory< byte > buffer)
async ValueTask< int > EnsureFullTlsFrameAsync< TIOAdapter >(TIOAdapter adapter)
SslAuthenticationOptions _sslAuthenticationOptions
virtual ? X509Certificate RemoteCertificate
override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState)
virtual Task AuthenticateAsClientAsync(string targetHost, X509CertificateCollection? clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
void ThrowIfExceptional()
Task ProcessAuthenticationAsync(bool isAsync=false, bool isApm=false, CancellationToken cancellationToken=default(CancellationToken))
override bool IsEncrypted
Task AuthenticateAsClientAsync(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken=default(CancellationToken))
void AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback? asyncCallback, object? asyncState)
bool HaveFullTlsFrame(out int frameSize)
virtual int KeyExchangeStrength
virtual void AuthenticateAsClient(string targetHost, X509CertificateCollection? clientCertificates, bool checkCertificateRevocation)
virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation)
virtual void EndAuthenticateAsClient(IAsyncResult asyncResult)
void ThrowIfExceptionalOrNotAuthenticated()
override int Read(byte[] buffer, int offset, int count)
override bool IsAuthenticated
void Write(byte[] buffer)
async ValueTask WriteAsyncInternal< TIOAdapter >(TIOAdapter writeAdapter, ReadOnlyMemory< byte > buffer)
override void SetLength(long value)
void SetAndVerifyValidationCallback(RemoteCertificateValidationCallback callback)
virtual void AuthenticateAsClient(string targetHost)
readonly Stream _innerStream
int _decryptedBytesOffset
bool CompleteHandshake(ref ProtocolToken alertToken, out SslPolicyErrors sslPolicyErrors, out X509ChainStatusFlags chainStatus)
virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate)
LocalCertificateSelectionCallback _userCertificateSelectionCallback
virtual SslProtocols SslProtocol
virtual void AuthenticateAsClient(string targetHost, X509CertificateCollection? clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
Task AuthenticateAsServerApm(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken=default(CancellationToken))
virtual Task ShutdownAsync()
ArrayBuffer _handshakeBuffer
override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState)
X509Certificate ServerCertSelectionCallbackWrapper(string targetHost)
override void Write(byte[] buffer, int offset, int count)
int CopyDecryptedData(Memory< byte > buffer)
static byte[] CreateAlertFrame(SslProtocols version, TlsAlertDescription reason)
static bool TryGetFrameInfo(ReadOnlySpan< byte > frame, ref TlsFrameInfo info, ProcessingOptions options=ProcessingOptions.All, HelloExtensionCallback callback=null)
static bool TryGetFrameHeader(ReadOnlySpan< byte > frame, ref TlsFrameHeader header)
CancellationToken CancellationToken
static ExceptionDispatchInfo Capture(Exception source)
static Exception SetCurrentStackTrace(Exception source)
static string net_ssl_io_cert_validation
static string net_frame_read_size
static string net_ssl_renegotiate_buffer
static string net_io_invalidnestedcall
static string net_auth_client_server
static string net_invalid_enum
static string Format(string resourceFormat, object p1)
static string net_io_encrypt
static string net_auth_tls_alert
static string net_ssl_io_frame
static string net_auth_noauth
static string net_ssl_io_cert_custom_validation
static string net_auth_reauth
static string net_conflicting_options
static string net_ssl_io_cert_chain_validation
static string net_auth_SSPI
static string net_ssl_renegotiate_data
static string net_io_read
static string net_io_write
static string net_io_decrypt
static string net_ssl_io_renego
static string net_ssl_io_already_shutdown
static string net_ssl_certificate_exist
static int CompareExchange(ref int location1, int value, int comparand)
static int Exchange(ref int location1, int value)
static IAsyncResult Begin(Task task, AsyncCallback callback, object state)
static void End(IAsyncResult asyncResult)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
new Task< TResult > WaitAsync(CancellationToken cancellationToken)
new TaskAwaiter< TResult > GetAwaiter()
delegate ValueTask< SslServerAuthenticationOptions > ServerOptionsSelectionCallback(SslStream stream, SslClientHelloInfo clientHelloInfo, object? state, CancellationToken cancellationToken)
delegate X509Certificate ServerCertSelectionCallback(string hostName)
delegate X509Certificate LocalCertSelectionCallback(string targetHost, X509CertificateCollection localCertificates, X509Certificate2 remoteCertificate, string[] acceptableIssuers)
SecurityStatusPalErrorCode
static Microsoft.Extensions.Internal.ValueStopwatch StartNew()
Memory< byte > AvailableMemory
ReadOnlySpan< byte > ActiveReadOnlySpan
void Commit(int byteCount)
void Discard(int byteCount)
void EnsureAvailableSpace(int byteCount)
readonly System.Net.SecurityStatusPalErrorCode ErrorCode
void CopyTo(Span< T > destination)
ReadOnlySpan< T > Slice(int start)
void CopyTo(Span< T > destination)
bool IsCancellationRequested
static CancellationToken None
bool IsCompletedSuccessfully
ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)
static ValueTask FromException(Exception exception)