简体   繁体   中英

Can I use TLS 1.2 or 1.1 (if 1.2 is not available) in .net when calling a web servivce?

I would like to be able to use TLS 1.2, if a web service requires it, but also (for the time being) make calls using TLS 1.1 to services that do not support it.

Currently we are using ServicePointManager.SecurityProtocol to set this in our code. (.net 4.0) Is this already backwards compatible? Or is it an all or nothing thing? And if so, is there some way to OR things together?

您可以使用按位或作为SecurityProtocolType是flag attribute来指定多个TLS。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM