Add DefaultMutualHandshakeContext* benchmarks#4277
Conversation
|
CI Failures seem to be unrelated. |
| { | ||
| await Task.WhenAll( | ||
| sslClient.AuthenticateAsClientAsync("localhost", null, SslProtocols.None, checkCertificateRevocation: false), | ||
| sslClient.AuthenticateAsClientAsync("localhost", requireClientCert ? new X509CertificateCollection() { _clientCert } : null, SslProtocols.None, checkCertificateRevocation: false), |
There was a problem hiding this comment.
just for my education: Why do you want to create a new instance of X509CertificateCollection every time the benchmark is called? Does this reflect typical real-life scenario?
There was a problem hiding this comment.
I wanted to mirror what we do in non-context benchmarks for SslStream.
Typical real-world scenarios would probably always use the overload accepting Ssl(Client|Server)AuthenticationOptions and reuse a single instance of it for multiple connections, or always create new instance entirely from scratch (as we do in linked source code).
|
@adamsitnik I can't merge this PR because of a failed GH check on |
I don't have such permissions anymore. But @caaavik-msft or @LoopedBard3 or @DrewScoggins should be able to do that. |
This PR adds microbenchmarks for mutually authenticated SslStream pair which uses SslStreamCertificateContext on the server side. This allows benchmarking TLS resume with client certificates (supported on Windows, newly supported on Linux in .NET 9 via dotnet/runtime#102656)