You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft.AspNetCore.Http.Features.IHttpSysRequestPropertyFeature.TryGetTlsClientHello(System.Span<byte> tlsClientHelloBytesDestination, out int bytesReturned) -> bool
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
-
namespaceMicrosoft.AspNetCore.Http.Features;
4
+
namespaceMicrosoft.AspNetCore.Server.HttpSys;
5
5
6
6
/// <summary>
7
7
/// Provides API to read HTTP_REQUEST_PROPERTY value from the HTTP.SYS request.
@@ -12,23 +12,25 @@ public interface IHttpSysRequestPropertyFeature
12
12
/// <summary>
13
13
/// Reads the TLS client hello from HTTP.SYS
14
14
/// </summary>
15
-
/// <param name="tlsClientHelloBytesDestination">where raw bytes of tls client hello message will be written</param>
15
+
/// <param name="tlsClientHelloBytesDestination">Where the raw bytes of the TLS Client Hello message will be written.</param>
16
16
/// <param name="bytesReturned">
17
17
/// Returns the number of bytes written to <paramref name="tlsClientHelloBytesDestination"/>.
18
-
/// Or can return the size of buffer needed if <paramref name="tlsClientHelloBytesDestination"/> wasn't large enough.
18
+
/// Or can return the size of the buffer needed if <paramref name="tlsClientHelloBytesDestination"/> wasn't large enough.
19
19
/// </param>
20
20
/// <remarks>
21
21
/// Works only if <c>HTTP_SERVICE_CONFIG_SSL_FLAG_ENABLE_CACHE_CLIENT_HELLO</c> flag is set on http.sys service configuration.
22
22
/// See <see href="https://learn.microsoft.com/windows/win32/api/http/nf-http-httpsetserviceconfiguration"/>
23
23
/// and <see href="https://learn.microsoft.com/windows/win32/api/http/ne-http-http_service_config_id"/>
24
24
/// <br/><br/>
25
-
/// If you don't want to guess required <paramref name="tlsClientHelloBytesDestination"/> size before first invocation,
26
-
/// you should call first with <paramref name="tlsClientHelloBytesDestination"/> set to empty size, so that you can retrieve through <paramref name="bytesReturned"/> the buffer size you need,
27
-
/// then allocate that amount of memory, then retry the query.
25
+
/// If you don't want to guess the required <paramref name="tlsClientHelloBytesDestination"/> size before first invocation,
26
+
/// you should first call with <paramref name="tlsClientHelloBytesDestination"/> set to empty size, so that you can retrieve the required buffer size from <paramref name="bytesReturned"/>,
27
+
/// then allocate that amount of memory and retry the query.
28
28
/// </remarks>
29
29
/// <returns>
30
30
/// True, if fetching TLS client hello was successful, false if <paramref name="tlsClientHelloBytesDestination"/> size is not large enough.
31
31
/// If non-successful for other reason throws an exception.
32
32
/// </returns>
33
+
/// <exception cref="HttpSysException">Any HttpSys error except for ERROR_INSUFFICIENT_BUFFER or ERROR_MORE_DATA.</exception>
34
+
/// <exception cref="InvalidOperationException">If HttpSys does not support querying the TLS Client Hello.</exception>
Microsoft.AspNetCore.Server.HttpSys.IHttpSysRequestPropertyFeature.TryGetTlsClientHello(System.Span<byte> tlsClientHelloBytesDestination, out int bytesReturned) -> bool
0 commit comments