Adding client certificates to a typed HttpClient works in .net 3.1 linux docker container but fails in .net 5. I see that there is a breaking change in .net 5 to use TLS 1.3 and restricted Ciphersuites, how can I override that in .net 5 with a typed HttpClient ? How can I use the SocketsHttpHandler.SslOptions with a typed HttpClient to specify a wider set of Ciphersuites.
This is a sample of my code
services.AddHttpClient<ISwishpayService, SwishpayService>()
.ConfigurePrimaryHttpMessageHandler<SwishpayHandler>();
public class SwishpayHandler: HttpClientHandler
{
private readonly IConfiguration _config;
private readonly ILogger<SwishpayHandler> _logger;
public SwishpayHandler(IConfiguration config, ILogger<SwishpayHandler> logger)
{
_config = config;
_logger = logger;
SslProtocols = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls13;
ClientCertificateOptions = ClientCertificateOption.Manual;
}
......