Force HttpClient or WebRequest to use TLS 1.0 for negative test

118 Views Asked by At

With the trend to disable TLS 1.0 at server side, I need a negative test in C#. This should be a single test method among many others that will test other features, and we have parallel tests. Therefore, the global setting at ServicePointManager does not work for me.

Is there a way to force TLS 1.0 just for the connection of a single request?

Perhaps there is a low-level solution that involves creating a SslStream or NegotiateStream?

0

There are 0 best solutions below