TLS version in NFe 4.0 urls

0

I'm implementing the NFe 4.0 webservices and would like to ask a question about what defines the security protocol that is used in communication. The behavior of the connection is different for some machines and is causing problems. Both machines have .NET 4.7 installed and Windows 10.

For NFe 3.10 services like this url:

link

In both my internal tests and on that other machine, it displays in the Properties of TLS 1.2 connection page. For the NFe 4.0 service:

link

On my machine and most of the others we implement, it also features 1.2. But for two machines in particular it is connecting with TLS 1.0.

In the application that we use to access web services, in .NET 4.5, the security protocols are configured as follows:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

As the service supports the 3 versions of TLS, I imagine you use the most secure version by default to make the connection. So the error occurs: "The underlying connection was closed". On the other hand, if I specify that TLS 1.0 is used it connects normally:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;

On internet explorer, if you configure Internet Options to use only TLS 1.2, the url does not open:

I think this may be some windows / .net configuration, some hint of the reason for this behavior and how to make it 1.2 used?

On one of these machines, a3 certificate is used, and the certificate issuer recommends that TLS1.0 / SSL3.0 be used for the requests. Is there any way to force a security protocol to be used for a given url via windows registry or something like that that might have been done by the software that manages the certificate?

Thank you!

    
asked by anonymous 12.04.2018 / 15:03

0 answers