Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the TLS handshake size in .NET?

I'm experiencing connection negotiations failure while trying to establish two way authentication with .NET clients.

This happens after the remote server increased significantly the list of authorized CA.

While this issue can be easily resolved in any java clients by setting jdk.tls.maxHandshakeMessageSize to a higher value, I can't find the same workaround for .NET.

This issue happens with System.Net.HttpClient, System.Net.Security.SslStream (.NET Framework 4.7.2) and Internet Explorer 11 .

like image 589
Perfect28 Avatar asked Aug 30 '21 15:08

Perfect28


1 Answers

For API that relies on Windows TLS SCHANNEL, this value can be changed by setting the following DWORD value on registry.

MessageLimitClient : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Messaging

Credit for lextm on MSDN.

like image 82
Perfect28 Avatar answered Oct 15 '22 23:10

Perfect28