-
Notifications
You must be signed in to change notification settings - Fork 10.4k
feat(HTTP.SYS): on-demand TLS client hello retrieval #62209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(HTTP.SYS): on-demand TLS client hello retrieval #62209
Conversation
public interface IHttpSysRequestPropertyFeature | ||
{ | ||
/// <summary> | ||
/// Reads the TLS client hello from HTTP.SYS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tdykstra for docs pass?
src/Servers/HttpSys/samples/TlsFeaturesObserve/TlsFeaturesObserve.csproj
Show resolved
Hide resolved
src/Servers/HttpSys/src/RequestProcessing/RequestContext.FeatureCollection.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just A few nits.
/// <summary> | ||
/// Reads the TLS client hello from HTTP.SYS | ||
/// </summary> | ||
/// <param name="tlsClientHelloBytesDestination">Where the raw bytes of the TLS Client Hello message will be written.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid future tense per the style guide.
/// <param name="tlsClientHelloBytesDestination">Where the raw bytes of the TLS Client Hello message will be written.</param> | |
/// <param name="tlsClientHelloBytesDestination">Where the raw bytes of the TLS Client Hello message are written.</param> |
} | ||
finally | ||
|
||
// if buffer supplied is too small, `bytesReturned` will have proper size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if buffer supplied is too small, `bytesReturned` will have proper size | |
// if buffer supplied is too small, `bytesReturned` has proper size |
/// </remarks> | ||
/// <returns> | ||
/// True, if fetching TLS client hello was successful, false if <paramref name="tlsClientHelloBytesDestination"/> size is not large enough. | ||
/// If non-successful for other reason throws an exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// If non-successful for other reason throws an exception. | |
/// If unsuccessful for other reason throws an exception. |
HTTP.SYS only on-demand TLS client hello
As discussed in api proposal we are doing 2 things here:
HttpSysOptions.TlsClientHelloBytesCallback
IHttpSysRequestPropertiesFeature
:IHttpSysRequestPropertiesFeature.TryGetTlsClientHello
.TlsFeaturesObserve.Program
sample shows the usage of that feature and this API in particular:Implements #61625